-
Notifications
You must be signed in to change notification settings - Fork 29
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
feat: add k8s client wrapper and constants #201
Conversation
Reviewer's Guide by SourceryThis pull request introduces a Kubernetes client wrapper, new constants, and several new services and models for the Task Execution Service (TES) API. It also includes significant updates to the documentation and Helm chart configurations, adding resource limits, security contexts, and updated ingress settings. Additionally, new unit tests and example input JSON files have been added. File-Level Changes
Tips
|
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.
Aligning with my comments on #203, I would focus one PR on config params/constants. Make sure that everything is streamlined and let's merge that first.
Then focus this PR on the k8s client only.
@uniqueg If you still think its a better idea to merge consts first then sure, thoughts? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #201 +/- ##
=======================================
Coverage 98.21% 98.21%
=======================================
Files 8 8
Lines 561 561
=======================================
Hits 551 551
Misses 10 10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@uniqueg can you please checkout this error due to which for the past month I haven't been able to update deps and ignore safety or bandits errors.
To recreate:
Notice if you hadn;t updated the deps the server will run fine but if you do it will fail. I suspect |
My guess is that either or all of Flask, werkzeug, pydantic or Connexion are updated beyond a supported major version when you run |
I'm of course perfectly fine with adding things iteratively, if and when they are needed. My issue was not with config params and constants being added here, but rather with the structuring and convolution of config params and constants (mixing up consts and params, not exposing params via |
Yes its werkzeug, but it needs to be updated because its causing issues in vulnerebility CI and Im ignoring them. Its not just because I wanna update that dep but when I install otherdeps too, poetry usually ups a minor version of deps that can be and this breaks the server. I will revert changes and force install from a working locked dependency but this needs to be fixed in FOCA! |
@uniqueg I think i should push the docs in this one itself?? Else I think this PR is done, please review as soon as pos. |
Yes, it's a known issue and I absolutely agree with you. Unfortunately, using Werkzeug and/or Flask v3 requires us to migrate FOCA to Connexion 3 - and that isn't a piece of cake. I have started with this but I'm afraid that realistically I may not be able to finish that up before October. |
Forgot to answer this. I generally think it's important to follow Continuous Documentation practices, i.e., making sure that the docs are always as complete and up-to-date as possible by updating docs in every PR where necessary/applicable. But exceptionally I'm okay with not doing it here - if you plan to push a docs PR very soon :) |
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.
Two minor issues I still see:
- Please remove the type definitions from the models'
Attributes
sections. We don't want to define types in two different places, because sooner or later they will diverge. And it's best to keep only the type hints from function signature or - in this case - the model definition, because they are closer to being code. - Consider defining a root class
ConfigModel
that extendsBaseModel
and setsfrozen
toTrue
. Then have all constants classes inherit fromConfigModel
. That way, we don't need to add a config class to each constant class. I'm not insisting on this though, so if you wanna skip this, fine.
I don't think it will need a re-review from me afterwards, so just go ahead and merge when you are done with this.
@uniqueg There are two on my concerns with this PR which I would llike your thoughts on:
|
For both issues: Consider merging the PR as is, then opening new PRs for these changes. At least for the second issue, I think that would make sense. |
Summary by Sourcery
Introduce a Kubernetes client wrapper, add a new OpenAPI specification for the TES API, and implement a new
Filer
service for handling file transfers. Enhance documentation and configuration files, and add unit tests for job handling.New Features:
Filer
service for handling file transfers, including support for FTP, HTTP, and S3 protocols.Enhancements:
README.md
to include new badges for code coverage, documentation status, license, Python version, development status, contributors, and security tools.taskmaster
service to improve job handling and PVC management.values.yaml
configuration to include resource limits and security context settings for Kubernetes deployments.Documentation:
local_ftp.md
documentation for better readability and formatting.README.md
to reflect the new structure and additional badges.inputHelloWorld.json
for demonstrating task execution.Tests:
Job
class intest_services/test_job.py
to cover various job states and error conditions.