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/02 23:25:37 UTC
[PR] Fix case when no suffix is passed when building packages [airflow]
potiuk opened a new pull request, #48715:
URL: https://github.com/apache/airflow/pull/48715
<!--
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] Fix case when no suffix is passed when building packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #48715:
URL: https://github.com/apache/airflow/pull/48715#discussion_r2025753443
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -446,26 +448,29 @@ def package_version(
for pyproject_toml_path in pyproject_toml_paths:
original_contents.append(pyproject_toml_path.read_text())
update_version_in__init_py = False
+ base_package_version = original_package_version
if version_suffix:
if original_package_version.endswith(f".{version_suffix}"):
get_console().print(
f"[info]The {original_package_version} already has suffix {version_suffix}. Not updating it.\n"
)
- package_version = original_package_version
+ base_package_version = original_package_version
Review Comment:
```suggestion
```
--
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] Fix case when no suffix is passed when building packages [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on code in PR #48715:
URL: https://github.com/apache/airflow/pull/48715#discussion_r2025795652
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -446,26 +448,27 @@ def package_version(
for pyproject_toml_path in pyproject_toml_paths:
original_contents.append(pyproject_toml_path.read_text())
update_version_in__init_py = False
+ base_package_version = original_package_version
if version_suffix:
Review Comment:
We are returning from the method in case this is None. We can remove this if statement
--
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] Fix case when no suffix is passed when building packages [airflow]
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #48715:
URL: https://github.com/apache/airflow/pull/48715#discussion_r2025752119
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -446,26 +448,29 @@ def package_version(
for pyproject_toml_path in pyproject_toml_paths:
original_contents.append(pyproject_toml_path.read_text())
update_version_in__init_py = False
+ base_package_version = original_package_version
if version_suffix:
if original_package_version.endswith(f".{version_suffix}"):
get_console().print(
f"[info]The {original_package_version} already has suffix {version_suffix}. Not updating it.\n"
)
- package_version = original_package_version
+ base_package_version = original_package_version
elif not release_version_matcher.match(original_package_version):
get_console().print(
f"[warning]Normally you should only pass version suffix if package version "
f"does not have suffix in code (it is {original_package_version} now).\n"
f"Overriding the version in code with the {version_suffix}."
)
- package_version = Version(original_package_version).base_version
+ base_package_version = Version(original_package_version).base_version
update_version_in__init_py = True
else:
- package_version = original_package_version
+ base_package_version = original_package_version
Review Comment:
probably not this one either
--
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] Fix case when no suffix is passed when building packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #48715:
URL: https://github.com/apache/airflow/pull/48715#discussion_r2025802339
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -446,26 +448,27 @@ def package_version(
for pyproject_toml_path in pyproject_toml_paths:
original_contents.append(pyproject_toml_path.read_text())
update_version_in__init_py = False
+ base_package_version = original_package_version
if version_suffix:
Review Comment:
That's a differnet method :)
--
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] Fix case when no suffix is passed when building packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #48715:
URL: https://github.com/apache/airflow/pull/48715
--
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] Fix case when no suffix is passed when building packages [airflow]
Posted by "dstandish (via GitHub)" <gi...@apache.org>.
dstandish commented on code in PR #48715:
URL: https://github.com/apache/airflow/pull/48715#discussion_r2025751870
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -446,26 +448,29 @@ def package_version(
for pyproject_toml_path in pyproject_toml_paths:
original_contents.append(pyproject_toml_path.read_text())
update_version_in__init_py = False
+ base_package_version = original_package_version
if version_suffix:
if original_package_version.endswith(f".{version_suffix}"):
get_console().print(
f"[info]The {original_package_version} already has suffix {version_suffix}. Not updating it.\n"
)
- package_version = original_package_version
+ base_package_version = original_package_version
Review Comment:
you probably do not need this line
--
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] Fix case when no suffix is passed when building packages [airflow]
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #48715:
URL: https://github.com/apache/airflow/pull/48715#discussion_r2025753141
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -446,26 +448,29 @@ def package_version(
for pyproject_toml_path in pyproject_toml_paths:
original_contents.append(pyproject_toml_path.read_text())
update_version_in__init_py = False
+ base_package_version = original_package_version
if version_suffix:
if original_package_version.endswith(f".{version_suffix}"):
get_console().print(
f"[info]The {original_package_version} already has suffix {version_suffix}. Not updating it.\n"
)
- package_version = original_package_version
+ base_package_version = original_package_version
elif not release_version_matcher.match(original_package_version):
get_console().print(
f"[warning]Normally you should only pass version suffix if package version "
f"does not have suffix in code (it is {original_package_version} now).\n"
f"Overriding the version in code with the {version_suffix}."
)
- package_version = Version(original_package_version).base_version
+ base_package_version = Version(original_package_version).base_version
update_version_in__init_py = True
else:
- package_version = original_package_version
+ base_package_version = original_package_version
Review Comment:
Ah yes. I just added the line above and did not remove this one :)
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -446,26 +448,29 @@ def package_version(
for pyproject_toml_path in pyproject_toml_paths:
original_contents.append(pyproject_toml_path.read_text())
update_version_in__init_py = False
+ base_package_version = original_package_version
if version_suffix:
if original_package_version.endswith(f".{version_suffix}"):
get_console().print(
f"[info]The {original_package_version} already has suffix {version_suffix}. Not updating it.\n"
)
- package_version = original_package_version
+ base_package_version = original_package_version
elif not release_version_matcher.match(original_package_version):
get_console().print(
f"[warning]Normally you should only pass version suffix if package version "
f"does not have suffix in code (it is {original_package_version} now).\n"
f"Overriding the version in code with the {version_suffix}."
)
- package_version = Version(original_package_version).base_version
+ base_package_version = Version(original_package_version).base_version
Review Comment:
```suggestion
```
--
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] Fix case when no suffix is passed when building packages [airflow]
Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on code in PR #48715:
URL: https://github.com/apache/airflow/pull/48715#discussion_r2026305189
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -446,26 +448,27 @@ def package_version(
for pyproject_toml_path in pyproject_toml_paths:
original_contents.append(pyproject_toml_path.read_text())
update_version_in__init_py = False
+ base_package_version = original_package_version
if version_suffix:
Review Comment:
I totally missed that. I went to sleep just after this review. I see I made the correct decision :)
--
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