-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix Compatibility of Celery Worker Sets with Workers Separation #60420
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 Compatibility of Celery Worker Sets with Workers Separation #60420
Conversation
|
The previous behaviour of |
|
Converting to draft - I think more things are broken, but I need to verify it more. Maybe I'm not seeing something, but I think that it would be the easiest to have fully ready |
|
Oh, sorry I missed to review all details, the PR was pending a longer time and all the rework you invested in moving parameters came-in in parallel. so we generated a semantic conflict in the parameter rework vs. this extension :-( |
|
No worries. Personally, I really wanted the worker sets to be merged too. I will let you know when something meaningful will happen in this PR, as I think it might not be today or tomorrow, but we will see :D |
fa4a2e7 to
1e3e75d
Compare
|
Hi @Miretpl we are opting to get Helm Chart 1.19 release rolling next Monday. Do you think we can get this PR in until then (and maybe some other parameter renamings if there are more pending)? |
|
Hi @jscheffl, regarding this PR - maybe. I have core working locally (there are some edge cases that I'm working on now - I'm unsure how long they will take to resolve tho). There is a chance that we will need to revert #52357 change. I'm not sure now how it should work with Also, the current version on main doesn't work, and I mean not only Regarding further renaming - I planned to get back to them after this PR, but if 1.19 is close to the release, I will probably add tests for the added |
|
Currently, falling tests are due to 2 reasons:
|
|
Hi @jscheffl, I think we will manage till Monday with it. I pushed the latest version (which is working locally), and I updated the description here. I didn't try deployment of the environment with this version yet, but looking at the generated yamls and test cases, it looks correct. Unfortunately, we will need to revert #52357 after all (PR for it #60721). Do you think it would be possible to postpone the cut-off by a week? I would want to finish adding test cases and properly check everything before it, and I will probably not finish that before Monday :( |
e5d8a8d to
eb27346
Compare
|
+ service account related - the rest should pass now |
|
@jedcunningham As of the engagement of @Miretpl and as some logical conflicts exists from the different reworks... I'd also propose to push the Helm release for a few days to get this cleaned. Would it be OK for you? |
20b7e50 to
f55ed08
Compare
f55ed08 to
93763c3
Compare
60fcebb to
e1dc1c3
Compare
|
It is now ready to review. Most of the changes are just test additions (I added around 160 test cases). I moved the sections that were newly added in the previous PR to I deployed a couple of times manually environment with different configurations and it worked correctly, but I would appreciate any additional tests done by someone else |
d47fbde to
6c6bac9
Compare
6c6bac9 to
7c87b66
Compare
jscheffl
left a comment
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.
Wow - impressive. Have atm no option to deploy something but coverage of unit tests looks exhaustive. Was attempting to find more than a nit but looks really good.
I'd propose a second pair of eyes == @jedcunningham prior merge
Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
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.
Pull request overview
This PR fixes compatibility issues between Celery Worker Sets (introduced in #58547) and the separated workers section to kubernetes/celery. It rewrites the worker set configuration merge logic to properly handle value overrides and null value fallback behavior.
Changes:
- Moved
enableDefaultandqueuefromworkerstoworkers.celerysection - Implemented custom merge function
workersMergeValuesto handle configuration inheritance and overrides between worker sets - Updated all worker-related templates to use the new merge logic
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| helm-tests/tests/helm_tests/security/test_security_context.py | Added test cases for worker sets with security context configurations |
| helm-tests/tests/helm_tests/other/test_keda.py | Fixed queue configuration path from workers.queue to workers.celery.queue |
| helm-tests/tests/helm_tests/airflow_core/test_worker_sets.py | New comprehensive test file for worker sets functionality (2580 lines) |
| helm-tests/tests/helm_tests/airflow_core/test_worker.py | Fixed test case for replicas inheritance and removed old worker sets tests |
| chart/values.yaml | Moved enableDefault and queue configuration to workers.celery section |
| chart/values.schema.json | Updated schema to reflect configuration structure changes |
| chart/templates/workers/*.yaml | Updated all worker templates to use new merge logic and configuration paths |
| chart/templates/_helpers.yaml | Added workersMergeValues and removeNilFields helper functions |
| chart/templates/NOTES.txt | Updated deprecation warning to include queue in workers.args |
| chart/newsfragments/58547.significant.rst | Updated documentation with corrections and clarifications |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Merged, cool! Thanks for the fix @Miretpl ! Then we would be ready to kick 1.19 release? |
|
@jscheffl yes, I think we should be good now |
The goal of this PR is to fix the compatibility of:
workerssection separation tokubernetes/celery, which is done for Can't configure Kubernetes and Celery workers in Helm Chart #28880Current state
In the current state of the main branch, both features do not work together. It means that:
workers.celery.setsfor worker pools creation cannot overwrite values different from null set inworkers.celerysection (despiteworkers.celery.replicas)workers.celery.replicaswithworkers.replicasis broken (unsetting theworkers.celery.replicasvalue does not fall back toworkers.replicas)workers.celery.persistence.enabledwithworkers.persistence.enabledis broken (to disable it, the change of two fields is required) - because of that, all related features like HPA/KEDA do not work properlyFurthermore, the current implementation of Workers Sets does not allow for:
Changes
Rewrite the whole logic of #58547. The idea of updating the definition of workers per worker set stayed, but the logic of how it is done was changed. To make it work, I needed to implement a custom merge function, whose working is described in the
_helpers.yamlfile next to its definition.All fields are overwritten fully by settings in
workers.celery.setsif specified.Future PRs
workers.logGroomerSidecarvalues by Worker Sets:Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.