fix: Avoid Python import race condition for Kubernetes executor stacklets - #844
Merged
Conversation
5 tasks
sweb
reviewed
Aug 13, 2026
sweb
left a comment
Member
There was a problem hiding this comment.
Do we need to change the existing gitsync test to catch this? If I see correctly, right now we just look for the config map - I am not sure whether that is enough to catch e.g. slow network. Does it make sense to add a check there to the statefulset or something like that, that we actually load the dags?
adwk67
reviewed
Aug 13, 2026
sweb
approved these changes
Aug 13, 2026
sweb
left a comment
Member
There was a problem hiding this comment.
lgtm - I'd still say the real approval has to be done by Andrew
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Part of #732
I noticed this while looking into SUP-396. We already have code in place to prevent Python import race-conditions by pre-cloning the git repo contents before starting the Python processes.
However, that was only done for celery-based stacklets:
While being still on SDP 25.3 (so before our platform fix), the customer in SUP-396 correctly reported that they are using Kubernetes executors, which have the same problem [for anything except executors].
This PR fixes the mechanism to also run on Kubernetes executor-based stacklets
Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features trackerRelease notes
Fixed
Avoid Python import race conditions by pre-cloning the git repo not only for Celery-based stacklets, but also for Kubernetes executor-based stacklets