Skip to content

Conversation

@ido177
Copy link
Contributor

@ido177 ido177 commented Sep 30, 2025

closes: #56143


At this moment, users have to specify git_username and git_token twice in the git-sync secret, once for GIT_SYNC_* (v3) and once for GITSYNC_* (v4). This is redundant and confusing.

---
apiVersion: v1
kind: Secret
metadata:
  name: airflow-git-credentials
stringData:
  GITSYNC_USERNAME: "git_username"
  GITSYNC_PASSWORD: "git_token"
  GIT_SYNC_USERNAME: "git_username"
  GIT_SYNC_PASSWORD: "git_token"

This PR updates the Helm chart logic to choose the correct environment variable set based on the git-sync image tag:
If the tag is < 4.0.0 - use GIT_SYNC_*
If the tag is >= 4.0.0 or latest - use GITSYNC_*
Example (after this change)

apiVersion: v1
kind: Secret
metadata:
  name: airflow-git-credentials
stringData:
  GITSYNC_USERNAME: "git_username"
  GITSYNC_PASSWORD: "git_token"

Only the relevant variables need to be set, depending on the git-sync version.

Copy link
Contributor

@romsharon98 romsharon98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there are more duplicate envs above your changes it will be nice to do the same for them

@romsharon98 romsharon98 merged commit d0da0c0 into apache:main Oct 3, 2025
77 checks passed
@eladkal eladkal added this to the Airflow Helm Chart 1.19.0 milestone Oct 3, 2025
sc250072 pushed a commit to Teradata/airflow that referenced this pull request Oct 3, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 4, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 5, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 7, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 8, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 9, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 10, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 11, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 12, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
dabla pushed a commit to dabla/airflow that referenced this pull request Oct 12, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
potiuk added a commit that referenced this pull request Oct 13, 2025
* Error message improvied

* Error messages of bteq improved

* Bump ruff to 0.13.3 and prek to 0.2.3 (#56355)

* fix: allow mapped tasks to accept zero-length inputs on rerun (#56162)

* fix: allow mapped tasks to accept zero-length inputs on rerun

* fix: add test for rerun args of different length

* chore: revise comments to align with the changes

* chore: add comments before the task state check

* fix: replace legacy query syntax

* Chart gitsync vars (#56245)

* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests

* Update provider's metadata (#56357)

* Fix install_java.sh (#56211)

Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>

* Add new PL translations. (#56359)

---------

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: VladaZakharova <uladaz@google.com>
Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 14, 2025
* Error message improvied

* Error messages of bteq improved

* Bump ruff to 0.13.3 and prek to 0.2.3 (apache#56355)

* fix: allow mapped tasks to accept zero-length inputs on rerun (apache#56162)

* fix: allow mapped tasks to accept zero-length inputs on rerun

* fix: add test for rerun args of different length

* chore: revise comments to align with the changes

* chore: add comments before the task state check

* fix: replace legacy query syntax

* Chart gitsync vars (apache#56245)

* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests

* Update provider's metadata (apache#56357)

* Fix install_java.sh (apache#56211)

Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>

* Add new PL translations. (apache#56359)

---------

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: VladaZakharova <uladaz@google.com>
Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 15, 2025
* Error message improvied

* Error messages of bteq improved

* Bump ruff to 0.13.3 and prek to 0.2.3 (apache#56355)

* fix: allow mapped tasks to accept zero-length inputs on rerun (apache#56162)

* fix: allow mapped tasks to accept zero-length inputs on rerun

* fix: add test for rerun args of different length

* chore: revise comments to align with the changes

* chore: add comments before the task state check

* fix: replace legacy query syntax

* Chart gitsync vars (apache#56245)

* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests

* Update provider's metadata (apache#56357)

* Fix install_java.sh (apache#56211)

Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>

* Add new PL translations. (apache#56359)

---------

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: VladaZakharova <uladaz@google.com>
Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
* Error message improvied

* Error messages of bteq improved

* Bump ruff to 0.13.3 and prek to 0.2.3 (apache#56355)

* fix: allow mapped tasks to accept zero-length inputs on rerun (apache#56162)

* fix: allow mapped tasks to accept zero-length inputs on rerun

* fix: add test for rerun args of different length

* chore: revise comments to align with the changes

* chore: add comments before the task state check

* fix: replace legacy query syntax

* Chart gitsync vars (apache#56245)

* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests

* Update provider's metadata (apache#56357)

* Fix install_java.sh (apache#56211)

Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>

* Add new PL translations. (apache#56359)

---------

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: VladaZakharova <uladaz@google.com>
Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
* Error message improvied

* Error messages of bteq improved

* Bump ruff to 0.13.3 and prek to 0.2.3 (apache#56355)

* fix: allow mapped tasks to accept zero-length inputs on rerun (apache#56162)

* fix: allow mapped tasks to accept zero-length inputs on rerun

* fix: add test for rerun args of different length

* chore: revise comments to align with the changes

* chore: add comments before the task state check

* fix: replace legacy query syntax

* Chart gitsync vars (apache#56245)

* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests

* Update provider's metadata (apache#56357)

* Fix install_java.sh (apache#56211)

Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>

* Add new PL translations. (apache#56359)

---------

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: VladaZakharova <uladaz@google.com>
Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>
TyrellHaywood pushed a commit to TyrellHaywood/airflow that referenced this pull request Oct 22, 2025
* Error message improvied

* Error messages of bteq improved

* Bump ruff to 0.13.3 and prek to 0.2.3 (apache#56355)

* fix: allow mapped tasks to accept zero-length inputs on rerun (apache#56162)

* fix: allow mapped tasks to accept zero-length inputs on rerun

* fix: add test for rerun args of different length

* chore: revise comments to align with the changes

* chore: add comments before the task state check

* fix: replace legacy query syntax

* Chart gitsync vars (apache#56245)

* make the variable name in .Values.dags.gitSync.credentials secret dependent on the GitSync version

* update gitsync tests

* Update provider's metadata (apache#56357)

* Fix install_java.sh (apache#56211)

Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>

* Add new PL translations. (apache#56359)

---------

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
Co-authored-by: Zhen-Lun (Kevin) Hong <zhenlun.hong01@gmail.com>
Co-authored-by: Kirill Romanikhin <63454209+ido177@users.noreply.github.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: VladaZakharova <uladaz@google.com>
Co-authored-by: Ulada Zakharava <vlada_zakharava@epam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up git-sync environment variables: remove duplication of v3/v4 envs and support latest tag

3 participants