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 2023/04/27 16:36:46 UTC
[GitHub] [airflow] potiuk opened a new pull request, #30919: Allow to run suspended provider changes PRs if proper label is set
potiuk opened a new pull request, #30919:
URL: https://github.com/apache/airflow/pull/30919
The changes to suspended providers should cause build changes in general, but there are cases where we still want to merge such changes. In this case maintainer should be able to set `allow suspended provider changes` and the PR should be allowed to run.
<!--
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/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.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 [newsfragments](https://github.com/apache/airflow/tree/main/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
[GitHub] [airflow] potiuk commented on a diff in pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #30919:
URL: https://github.com/apache/airflow/pull/30919#discussion_r1179538487
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -276,7 +276,15 @@ def find_all_providers_affected(
"to make changes to the provider."
)
get_console().print(f"Suspended providers: {suspended_providers}")
- sys.exit(1)
+ if fail_if_suspended_providers_affected:
+ get_console().print(
+ "[error]This PR did not have `allow suspended provider changes` " "label set so it will fail."
Review Comment:
Maybe Ruff can do it already :thinking:
--
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
[GitHub] [airflow] potiuk commented on a diff in pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #30919:
URL: https://github.com/apache/airflow/pull/30919#discussion_r1179457501
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -258,7 +258,7 @@ def find_all_providers_affected(
all_providers.add(provider)
if all_providers_affected:
return "ALL_PROVIDERS"
- if suspended_providers:
+ if suspended_providers and fail_if_suspended_providers_affected:
Review Comment:
I can move the if below and live the printing if you want. It will be the output of selective checks so you will usually not look at it, but well, I can add it. In fact I added a bit more colorful output to be a bit more verbose on what's happening.
There is no break to do here thouhg. The list of affected providers is built above already and it already does not contain suspended providers in `all_providers` variable, this has not changed , so there is nothing to `break` here.
--
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
[GitHub] [airflow] potiuk merged pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #30919:
URL: https://github.com/apache/airflow/pull/30919
--
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
[GitHub] [airflow] potiuk commented on a diff in pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #30919:
URL: https://github.com/apache/airflow/pull/30919#discussion_r1179537920
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -276,7 +276,15 @@ def find_all_providers_affected(
"to make changes to the provider."
)
get_console().print(f"Suspended providers: {suspended_providers}")
- sys.exit(1)
+ if fail_if_suspended_providers_affected:
+ get_console().print(
+ "[error]This PR did not have `allow suspended provider changes` " "label set so it will fail."
Review Comment:
Ah yeah. This is I think the only check we used to have in Pylint that we lost ..
--
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
[GitHub] [airflow] potiuk commented on a diff in pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #30919:
URL: https://github.com/apache/airflow/pull/30919#discussion_r1179457501
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -258,7 +258,7 @@ def find_all_providers_affected(
all_providers.add(provider)
if all_providers_affected:
return "ALL_PROVIDERS"
- if suspended_providers:
+ if suspended_providers and fail_if_suspended_providers_affected:
Review Comment:
I can move the if below and leave the printing if you want. It will be the output of selective checks so you will usually not look at it, but well, I can add it. In fact I added a bit more colorful output to be a bit more verbose on what's happening.
There is no break to do here thouhg. The list of affected providers is built above already and it already does not contain suspended providers in `all_providers` variable, this has not changed , so there is nothing to `break` here.
--
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
[GitHub] [airflow] potiuk commented on pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #30919:
URL: https://github.com/apache/airflow/pull/30919#issuecomment-1526052145
BTW. I've added a bit more elaborated test - making sure that the suspended provider is not in the output (it wasn't just wanted to be explicit about it).
--
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
[GitHub] [airflow] josh-fell commented on a diff in pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "josh-fell (via GitHub)" <gi...@apache.org>.
josh-fell commented on code in PR #30919:
URL: https://github.com/apache/airflow/pull/30919#discussion_r1179513418
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -276,7 +276,15 @@ def find_all_providers_affected(
"to make changes to the provider."
)
get_console().print(f"Suspended providers: {suspended_providers}")
- sys.exit(1)
+ if fail_if_suspended_providers_affected:
+ get_console().print(
+ "[error]This PR did not have `allow suspended provider changes` " "label set so it will fail."
Review Comment:
```suggestion
"[error]This PR did not have `allow suspended provider changes` label set so it will fail."
```
Some black shenanigans I think?
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -276,7 +276,15 @@ def find_all_providers_affected(
"to make changes to the provider."
)
get_console().print(f"Suspended providers: {suspended_providers}")
- sys.exit(1)
+ if fail_if_suspended_providers_affected:
+ get_console().print(
+ "[error]This PR did not have `allow suspended provider changes` " "label set so it will fail."
+ )
+ sys.exit(1)
+ else:
+ get_console().print(
+ "[info]This PR had `allow suspended provider changes` label set so it will " "continue"
Review Comment:
```suggestion
"[info]This PR had `allow suspended provider changes` label set so it will 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
[GitHub] [airflow] potiuk commented on a diff in pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #30919:
URL: https://github.com/apache/airflow/pull/30919#discussion_r1179459041
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -258,7 +258,7 @@ def find_all_providers_affected(
all_providers.add(provider)
if all_providers_affected:
return "ALL_PROVIDERS"
- if suspended_providers:
+ if suspended_providers and fail_if_suspended_providers_affected:
Review Comment:
This is where the list was built:
```
if provider not in dependencies:
suspended_providers.add(provider)
else:
all_providers.add(provider)
```
--
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
[GitHub] [airflow] eladkal commented on a diff in pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #30919:
URL: https://github.com/apache/airflow/pull/30919#discussion_r1179442589
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -258,7 +258,7 @@ def find_all_providers_affected(
all_providers.add(provider)
if all_providers_affected:
return "ALL_PROVIDERS"
- if suspended_providers:
+ if suspended_providers and fail_if_suspended_providers_affected:
Review Comment:
I don't think we should skip this block?
If there are suspended providers we should still print the messages in the block
The only effect the new flag should have is if we do `sys.exit(1)` or `break`
--
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
[GitHub] [airflow] eladkal commented on a diff in pull request #30919: Allow to run suspended provider changes PRs if proper label is set
Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #30919:
URL: https://github.com/apache/airflow/pull/30919#discussion_r1179442589
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -258,7 +258,7 @@ def find_all_providers_affected(
all_providers.add(provider)
if all_providers_affected:
return "ALL_PROVIDERS"
- if suspended_providers:
+ if suspended_providers and fail_if_suspended_providers_affected:
Review Comment:
I don't think we should skip this block?
If there are suspended providers we should still print the messages in the block
The only effect the new flag should have is if we do `sys.exit(1)` or `break` with notice about the override?
--
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