Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use
parse_opts
instead to read the settings from TOML like other services?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because this is not a service like the other ones, it's a Flask application. There might be things we can do to try to make it look like a service but I made the design decision to rely directly on the YAML config and TOML settings as it seemed like the best choice in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I am aware it's a Flask app but I was wondering if we could use
kernelci
package somehow to read settings. But it seems not. Looks fine otherwise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's just not very practical to run a Flask service which already has its own "main" function or WSGI connector as a kernelci-core command line tool. Also it's very straightforward to just read the settings and YAML config, I think a real improvement would be to help separate that logic from the helpers to run command line tools in kernelci-core. But that's really not a blocking issue at the moment, probably something to revisit once the old tools have been completely deprecated.