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 revisionHistoryLimit to all deployments #25059

Merged

Conversation

csp33
Copy link
Contributor

@csp33 csp33 commented Jul 14, 2022

closes: #25058

We can use this parameter to control how many old ReplicaSets we want to retain for each deployment.


^ Add meaningful description above

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 14, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 14, 2022

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 (flake8, 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: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch 3 times, most recently from 6a99947 to 71ae179 Compare July 14, 2022 14:06
@csp33 csp33 requested a review from mik-laj as a code owner July 14, 2022 14:06
@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch 5 times, most recently from 99091e7 to fc3693a Compare July 16, 2022 12:12
@potiuk
Copy link
Member

potiuk commented Jul 18, 2022

Makes sense - but should not it be possible to define also "global" revisionHistoryLimit that would override all "detailed" ones if not set? That would be easier to control @jedcunningham @ephraimbuddy @dstandish ?

@csp33
Copy link
Contributor Author

csp33 commented Jul 18, 2022

yeah, that makes sense. I will update this PR with that global value

@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch 3 times, most recently from 38e27c4 to 5221df3 Compare July 18, 2022 17:40
@csp33
Copy link
Contributor Author

csp33 commented Jul 18, 2022

Done @potiuk
We can now specify revisionHistoryLimit both globally and inside every component. The value from each component has priority over the global one.

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

LGTM. Anyone wants to take a look @jedcunningham @dstandish @ephraimbuddy ?

@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch from 5221df3 to fa3833d Compare July 18, 2022 19:04
@jedcunningham
Copy link
Member

@csp98, can you also add corresponding sections to values.yaml, e.g.

workers:
  replicas: 1
  revisionHistoryLimit: ~

You'll also have to add null to the allowed types, but I think most folks just look at values.yaml to see possible options so it's worth adding there as well.

@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch from 31cdf40 to 0f3612e Compare July 18, 2022 21:08
@csp33
Copy link
Contributor Author

csp33 commented Jul 18, 2022

Done @jedcunningham ;)

@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch from 0f3612e to fd45fdb Compare July 18, 2022 21:11
@jedcunningham jedcunningham added the type:new-feature Changelog: New Features label Jul 18, 2022
@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch from 4813561 to 61040b5 Compare July 18, 2022 22:19
@csp33 csp33 requested a review from jedcunningham July 18, 2022 22:22
@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch 4 times, most recently from 6953030 to 8d8fac8 Compare July 19, 2022 13:52
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Much nicer now.

@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch from 8d8fac8 to c3ef3f3 Compare July 19, 2022 16:34
@csp33 csp33 force-pushed the feature/add-revisionhistorylimit-to-deployments branch from c3ef3f3 to d11606d Compare July 20, 2022 15:04
@csp33 csp33 requested a review from jedcunningham July 20, 2022 15:05
@csp33
Copy link
Contributor Author

csp33 commented Jul 20, 2022

@jedcunningham
Copy link
Member

I've restarted the failures, hopefully they pass this time around.

@csp33
Copy link
Contributor Author

csp33 commented Jul 20, 2022

Cool @jedcunningham, thanks.
I also noticed that the branch is outdated (again 😅). Shall I rebase it when tests finish?

@jedcunningham
Copy link
Member

No, you'll drive yourself crazy trying to keep up 👍. As long as it stays relatively up to date we are okay, plus we don't get a ton of chart changes anyways.

@potiuk
Copy link
Member

potiuk commented Jul 20, 2022

No, you'll drive yourself crazy trying to keep up +1. As long as it stays relatively up to date we are okay, plus we don't get a ton of chart changes anyways.

Well. Actually rebasing PR is a daily routine I do. The more often you do it, the less painful it is, and the easier it is. And you learn how to rebase quickly even if you have conflicts. This might sound counter-intiuitive but it actually works.

So contrary to what @jedcunningham said - yeah, by all means, rebase early, rebase often.

@potiuk
Copy link
Member

potiuk commented Jul 20, 2022

😛

@potiuk potiuk merged commit 48eb18e into apache:main Jul 20, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 20, 2022

Awesome work, congrats on your first merged pull request!

@jedcunningham
Copy link
Member

jedcunningham commented Jul 20, 2022

Daily, sure, but it was already rebased 3 hours ago 🙃

Thanks @csp98! Congrats on your first commit 🎉

@csp33 csp33 deleted the feature/add-revisionhistorylimit-to-deployments branch July 20, 2022 17:58
@csp33
Copy link
Contributor Author

csp33 commented Jul 20, 2022

Thank you all @potiuk @jedcunningham
My concern was not the rebase itself, but all the tests having to run again (after another approval) ;)

@potiuk
Copy link
Member

potiuk commented Jul 20, 2022

Right. I sometimes rebase few times an hour (but only when I fix something) rebasing without change is indeed not needed (mostly). Unless there is an important change in main that is.

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 type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add revisionHistoryLimit to Helm deployments
3 participants