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

fix(helm): dagprocessor livenessProbe include --local and --job-type args #32426

Merged
merged 5 commits into from
Jul 9, 2023

Conversation

detvdl
Copy link
Contributor

@detvdl detvdl commented Jul 7, 2023

As of Airflow 2.5.0, the --local argument was introduced to the airflow jobs check command.
Without this argument, when a user has redefined the following configuration:

[core]
hostname_callable = ....

The livenessProbes using the command would fail due to "No alive jobs found", since the $(hostname) value may not align with what was set in hostname_callable.

As of Airflow 2.5.2, there is now also a DagProcessorJob job type which can be additionally checked for, to ensure that the livenessProbes do not incorrectly validate different Jobs on the same host as counting towards the dagprocessor being alive

DISCLAIMER: the Helm template in this PR deviates from the existing probe templates, to avoid unnecessary duplication. This refactoring can also be applied to the scheduler_liveness_check_command and triggerer_liveness_check_command if that is requested.
Inversely, I can also refactor to comply with the existing if/else duplication of the templates.

related: #28799


Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Jul 7, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 7, 2023

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 Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.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.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@potiuk
Copy link
Member

potiuk commented Jul 7, 2023

I think you will also need to add / modify some of the "helm_tests" of ours

@potiuk
Copy link
Member

potiuk commented Jul 7, 2023

You might want to rebase to latest main - just merged a change to move them to "helm_tests" directory

@detvdl detvdl force-pushed the fix/standalone-dag-processor-probe branch from ace569b to c605f11 Compare July 7, 2023 14:41
@detvdl
Copy link
Contributor Author

detvdl commented Jul 7, 2023

You might want to rebase to latest main - just merged a change to move them to "helm_tests" directory

Added a test case for this livenessProbe.
I don't see any similar test cases for the version-dependent probes of Triggerer and Scheduler, should I add those as well?
/cc @potiuk

@potiuk
Copy link
Member

potiuk commented Jul 7, 2023

You might want to rebase to latest main - just merged a change to move them to "helm_tests" directory

Added a test case for this livenessProbe. I don't see any similar test cases for the version-dependent probes of Triggerer and Scheduler, should I add those as well? /cc @potiuk

Would be great!

@detvdl
Copy link
Contributor Author

detvdl commented Jul 7, 2023

@potiuk tests added, let me know if there's anything more I can/need to do

@potiuk potiuk merged commit d27532b into apache:main Jul 9, 2023
48 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 9, 2023

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

@ephraimbuddy ephraimbuddy added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Aug 2, 2023
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.

3 participants