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 support for custom celery configs #45038

Merged
merged 8 commits into from
Dec 23, 2024

Conversation

arorasachin9
Copy link
Contributor

@arorasachin9 arorasachin9 commented Dec 18, 2024

closes: #45037

Description:
Currently Airflow support limited celery options only. This PR adds the support for the additional celery config for celery workers.

  1. Changes are completely backward compatible
  2. No test cases found for these changes
  3. If the config is not available then default value of {} is taken which will be same as earlier only
  4. If config is available then it will be added to the celery config and applied to celery workers.

Copy link

boring-cyborg bot commented Dec 18, 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: [email protected]
    Slack: https://s.apache.org/airflow-slack

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

Thanks for the PR - the contribution looks really small and is efficient. Thanks for taking care for the backwards compatibility.

I assume the fallback handling in default_celery.py:72is not needed if the config entry is correctly registered as a default in providers/src/airflow/providers/celery/provider.yaml - There all configs for the provider should be registered. This also would add missing documentation.

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 also add a test for this?

chart/values.yaml Outdated Show resolved Hide resolved
@arorasachin9
Copy link
Contributor Author

Addressed the comments. CI is failing not able to debug why CI pipeline is failing.

@jscheffl
Copy link
Contributor

jscheffl commented Dec 18, 2024

Except some minor comment I think it is good, let me check what is broken on CI. Nothing related to your code.
Ignore that it is "red" atm, will be better once you push the next change on the PR.

Then I think... LGTM!

@eladkal eladkal removed the area:helm-chart Airflow Helm Chart label Dec 19, 2024
@eladkal eladkal changed the title #45037: Support for additional celery config directly from airflow.cfg Add support for custom celery configs Dec 19, 2024
@jscheffl jscheffl force-pushed the feature/airflow-45037 branch from 2c56333 to 382d45e Compare December 22, 2024 17:13
@jscheffl
Copy link
Contributor

Somthing is wrong with this PR and CI - I don't see the reason but I am very sure it is not related to the changes. I am on it...

@arorasachin9
Copy link
Contributor Author

@jscheffl I have fixed the unit test. The CI is passing. and Thanks for the help in dubuging the CI issue.

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

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

LGTM!

THANKS for the patience, fixes getting this green!

@jscheffl jscheffl merged commit f315149 into apache:main Dec 23, 2024
64 checks passed
Copy link

boring-cyborg bot commented Dec 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support of custom celery configs
5 participants