Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GalaxyReportsService crash and remove config_type #116

Merged
merged 16 commits into from
Feb 6, 2024

Conversation

jvanbraekel
Copy link
Contributor

Hello,

This fix #115.

In addition it also make the ConfigFile class more robust by catching exceptions in the constructor; they were ignored previously.
Finally, it delete the config_type in both ConfigFile and Service classes. Firstly because it wasn't copied properly in the Service class constructor (the error was silent due to the previous issue), secondly because it has no current use.

I tested the supervisor configuration locally but not the systemd one.

@jvanbraekel
Copy link
Contributor Author

Someone for a review & merge , please ?

@natefoo
Copy link
Member

natefoo commented Feb 2, 2024

Was it necessary to drop config_type? It's a remnant from when Gravity was designed to handle reports and tool sheds as separate "config types" which we don't need anymore, but it could cause service name changes in existing deployments.

EDIT: Actually, I'll do some testing, maybe it's ok.

@natefoo
Copy link
Member

natefoo commented Feb 5, 2024

I'm not sure how to reproduce the test failure, it works for me locally.

@natefoo
Copy link
Member

natefoo commented Feb 5, 2024

It is the trailing slash on the prefix /galaxypf/. Prior to galaxyproject/galaxy@0c0da9c this was stripped/collapsed, but now if it is included then it has to be in the request, e.g. http://localhost:8080/galaxypf//api/version.

jvanbraekel and others added 16 commits February 6, 2024 13:40
1) Line 156 : self.config_type = self.Config.config_type  is throwing: "type object 'BaseConfig' has no attribute 'config_type'" , but is ignored by gravity. Thus config file type is not assigned for services but its silent.
   
2) If any exception occurs in the Service class constructor those are hidden by a  not subscriptable  exception.

Fix 1) by removing config_type form ConfigFile and Service classes, 2) by re-throwing exception in the class constructor.
Dedicated function for absolute path update,  check for undefined values and use the property access.
@natefoo
Copy link
Member

natefoo commented Feb 6, 2024

Thanks @jvanbraekel and sorry for the wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception ConfigFile object is not subscriptable when activating the report.
2 participants