Skip to content
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

ADD git-sync container lifecycle hooks #40369

Merged
merged 10 commits into from
Jun 29, 2024

Conversation

getChan
Copy link
Contributor

@getChan getChan commented Jun 21, 2024


Closes: #40364

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Jun 21, 2024
Copy link

boring-cyborg bot commented Jun 21, 2024

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 (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@getChan getChan marked this pull request as ready for review June 21, 2024 13:21
Copy link
Member

@jedcunningham jedcunningham left a comment

Choose a reason for hiding this comment

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

Can you add this to values.yaml and values.schema.json?

@getChan
Copy link
Contributor Author

getChan commented Jun 22, 2024

Can you add this to values.yaml and values.schema.json?

That is already in values.yaml dags.gitSync.containerLifecycleHooks

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.

Congrats on your first PR. LGTM

@nevcohen
Copy link
Contributor

What if there is a global .Values.containerLifecycleHooks?
Don't we want something like in here? Or do we not want it defined for this at the global level?

@getChan
Copy link
Contributor Author

getChan commented Jun 24, 2024

What if there is a global .Values.containerLifecycleHooks? Don't we want something like in here? Or do we not want it defined for this at the global level?

@nevcohen
thanks for opinion.
I added global lifecycle hook condition.

{{- $containerLifecycleHooksGitSync := or .Values.dags.gitSync.containerLifecycleHooks .Values.containerLifecycleHooks }}

It works same as other container hooks.

@jedcunningham
Copy link
Member

Looks like static checks are failing. I'd also suggest that you set up the pre-commit hooks, they help catch these issues early 👍.

@getChan
Copy link
Contributor Author

getChan commented Jun 26, 2024

Looks like static checks are failing. I'd also suggest that you set up the pre-commit hooks, they help catch these issues early 👍.

thanks. i fixed it

@eladkal eladkal merged commit a84d077 into apache:main Jun 29, 2024
66 checks passed
Copy link

boring-cyborg bot commented Jun 29, 2024

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@utkarsharma2 utkarsharma2 added this to the Airflow Helm Chart 1.15.0 milestone Jul 1, 2024
@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jul 1, 2024
romsharon98 pushed a commit to romsharon98/airflow that referenced this pull request Jul 26, 2024
* ADD git-sync container lifecycle hooks

* disable on git-sync-init container

* add unit test

* add unit test

* add global lifecycle hook condition

* make test pass

* disable .Values.containerLifecycleHooks

* pass static checks
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 changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

values.yaml dags.gitSync.containerLifecycleHooks Does not working
7 participants