You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2025/04/26 15:32:19 UTC
[PR] Simplify pre-release version handling when preparing packages [airflow]
potiuk opened a new pull request, #49829:
URL: https://github.com/apache/airflow/pull/49829
After we got rid of dev0 potentially embedded in our code we do not have to deal with the situation that we already have a version suffix referring to RC version in our internal distributions. We will always have "no suffix" and we can simplify a lot suffix handling - assuming that we will only use it for "alpha", "beta", "rc".
This also means that we can get normalized version for our pre-release packages. According to the specs - pythn versions for pre-relases shoudl NOT be separated with "." from the number version (unlike dev versions that should have the dot).
Most tools will normalize it, but now, when there is no dev0 suffixes we can easily normalize it ourselves - by removing the ".", because we are not going to use the dev0 suffix any more.
That simplifies our code to handle version flooring and addding RC suffixes to rc releases. We also always floor rc, alpha, beta to 1, not to 0 because (unlike in case of dev0) we do not use 0 as starting index for pre-relase versions - we start with 1.
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of an existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
<!-- Please keep an empty line above the dashes. -->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
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 [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify pre-release version handling when preparing packages [airflow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49829:
URL: https://github.com/apache/airflow/pull/49829#issuecomment-2833506261
### Backport failed to create: v3-0-test. View the failure log <a href='https://github.com/apache/airflow/actions/runs/14693432659'> Run details </a>
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>❌</td>
<td>v3-0-test</td>
<td><a href="https://github.com/apache/airflow/commit/ab2cd7dfa26bc1965b3bdf12ac9b8236e60fe324"><img src='https://img.shields.io/badge/Commit-ab2cd7d-red' alt='Commit Link'></a></td>
</tr>
</table>
You can attempt to backport this manually by running:
```bash
cherry_picker ab2cd7d v3-0-test
```
This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.
After you have resolved the conflicts, you can continue the backport process by running:
```bash
cherry_picker --continue
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify pre-release version handling when preparing packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #49829:
URL: https://github.com/apache/airflow/pull/49829#issuecomment-2832353443
> Actually I will add option to add ".dev" and ".post" explicitly (with not increasing complexity) and add validation for the suffix.
@kaxil used .post1-> .post4 several times already
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify pre-release version handling when preparing packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #49829:
URL: https://github.com/apache/airflow/pull/49829#issuecomment-2832345735
Actually I will add option to add ".dev" and ".post" explicitly (with not increasing complexity) and add validation for the suffix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify pre-release version handling when preparing packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #49829:
URL: https://github.com/apache/airflow/pull/49829#issuecomment-2833411921
OK. maybe not as simple as the original change, but I think better overall:
* we only have single flag `--version-suffix` now (instead of `--version-for-pypi/--version-forlocal`)
* it handles all the weird s**t for versions: rc1, .dev0, .post1, but also `rc1.dev0` , `a2.post1`, `rc1+local1`, `rc1.dev0.local1` (ll of those are valid suffixes)
* unified the code - both provider and non-provider version update is now consistently named and both use context manager to restore original version
* all that is automatically tested with unit tests
* code is moved to the modules it belongs to
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify pre-release version handling when preparing packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #49829:
URL: https://github.com/apache/airflow/pull/49829#issuecomment-2833414393
It is still simpler and clearer and more DRY than the old version and gets rid of some old baggage from past breeze versions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify pre-release version handling when preparing packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #49829:
URL: https://github.com/apache/airflow/pull/49829#issuecomment-2833417865
cc: @kaxil @eladkal -> once we merge and backport this one, maybe we could together release some alpha/beta providers + airflow packages and image of 3.0.1 - because only then we will be able to fully test it end-to-end - this way we might avoid surprises at release time,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Simplify pre-release version handling when preparing packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #49829:
URL: https://github.com/apache/airflow/pull/49829
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org