Repository navigation
Stop git-sync v4 from silently overriding chart's ref value - #73415
Closed
mallesh-bot wants to merge 1 commit into
Closed
mallesh-bot wants to merge 1 commit into
mallesh-bot wants to merge 1 commit into
Conversation
In git-sync v4 the deprecated GIT_SYNC_BRANCH and GIT_SYNC_REV env vars take precedence over GITSYNC_REF, so the chart's git-sync container ignored dags.gitSync.ref (e.g. pinning to a tag like v1.2.3) and kept tracking the branch at rev. Emit GITSYNC_REF only when dags.gitSync.ref is set, and only emit the deprecated GIT_SYNC_BRANCH / GIT_SYNC_REV when ref is unset (v3 mode and the default). Default ref to null so the shipped default render is unchanged for existing v3 and v4 users -- only users who explicitly set ref see behaviour change, and that behaviour now matches what the option documents. closes: apache#42918
mallesh-bot
requested review from
Miretpl,
bugraoz93,
hussein-awala,
jedcunningham and
jscheffl
as code owners
September 20, 2026 19:07
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
Contributor
|
Hi! Thanks for the PR. Due to the removal of git-sync in Helm Chart 2.0, I will close this PR. Please see my comment on the issue: #42918 (comment). Feel free to review and test the guide proposed in #73082 for migration from git-sync to GitDagBundle. |
3 of 5 tasks
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.
Summary
dags.gitSync.refis documented as the v4 way to pin the git-sync sidecar to a branch, tag, or hash. In git-sync v4 the deprecatedGIT_SYNC_BRANCHandGIT_SYNC_REVenv vars take precedence overGITSYNC_REF(v3→v4 migration guide), but the chart'sgit_sync_containerhelper always emitted all three, so settingref: v1.2.3had no effect and the sidecar kept following the branch at rev.This PR makes the emission conditional:
dags.gitSync.refset → emit onlyGITSYNC_REF; drop the deprecatedGIT_SYNC_BRANCH/GIT_SYNC_REV(so v4 honorsref).dags.gitSync.refunset → emit only the deprecated pair (so v3 images and v4-with-fallback keep working).The default of
dags.gitSync.refis changed fromv2-2-stableto~, and the JSON schema is updated to allownull. Because the fallback branch continues to emit the deprecated vars, the default render is byte-equivalent for existing users — only users who explicitly setrefsee behaviour change, and that behaviour now matches what the option documents.Test plan
templates/scheduler/scheduler-deployment.yamlviahelm templateand confirmed:ref: ~): onlyGIT_SYNC_REVandGIT_SYNC_BRANCHare emitted (noGITSYNC_REF).ref: v1.2.3: onlyGITSYNC_REFis emitted (noGIT_SYNC_REV/GIT_SYNC_BRANCH).helm lint chartpasses with both value sets.chart/tests/helm_tests/other/test_git_sync_scheduler.py:test_ref_takes_precedence_over_deprecated_branch_and_revtest_deprecated_branch_and_rev_are_emitted_when_ref_is_unsettest_git_sync_scheduler.pyandtest_pod_template_file.pythat hardcoded the old three-var emission whenrefwas set.breeze testing helm-tests— Windows pytest tempfile locking (NamedTemporaryFile+helm --values) prevents me running the full suite locally; verified via directhelm templateinvocations instead.closes: #42918
Was generative AI tooling used to co-author this PR?
refto null to preserve the default render) is mine, and I validated the fix by inspecting the rendered templates and helm-lint output. Generated per the guidelines.🤖 Generated with Claude Code