-
Notifications
You must be signed in to change notification settings - Fork 2
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 pod template envvars #372
Conversation
I'm curious: Can you explain why the unpredictable ordering causes restarts? I'm not sure I understand yet. Also: Would this affect other operators as well? |
Also: Good find! |
Before this change the configMap gets written up to three times (same UID but different resource versions) - to be honest, I'm not sure why - and the ordering was not consistent. But it's one of the few cases where we write env-vars to the config map as it is for the executor template. As airflow (and superset) both have restarts annotated this causes the phenomenon: we should probably change this for common_config.env-overrides so that any callout gets an ordered map. Props go to @nightkr, who suggested the HashMap could be the cause! |
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.
Nice, and I appreciate the PR description :)
awesome find Andrew, thanks! |
Description
See #371.
The
envOverrides
entries are added to the config-map for thekubernetesExecutor
pod template by iterating over aHashMap
: this leads to a unpredictable order and unnecessary restarts of airflow components. TheHashMap
is converted to aBTreeMap
to avoid this happening.🟢 https://ci.stackable.tech/view/02%20Operator%20Tests%20(custom)/job/airflow-operator-it-custom/121/
Definition of Done Checklist
Author
Reviewer
Acceptance