potiuk commented on code in PR #45068:
URL: https://github.com/apache/airflow/pull/45068#discussion_r1891410775
##########
.github/workflows/special-tests.yml:
##########
@@ -199,6 +203,7 @@ jobs:
include-success-outputs: ${{ inputs.include-success-outputs }}
run-coverage: ${{ inputs.run-coverage }}
debug-resources: ${{ inputs.debug-resources }}
+ if: ${{ inputs.default-branch == 'main' }}
Review Comment:
> I assume the syntax must be like in
https://github.com/actions/checkout/discussions/277
More explanation:
No - we cannot use target of the PR to determine which branch you are in
becasue when you locally work in the `v2-10-test` branch, the PR is not yet
created and we have to have "some" way to know that what you are working on
locally is `v2-10-test`.
For example when you do:
```bash
git checkout v2-10-test
git checkout -b backport-some-pr
git cherry-pick <XXXXX>
```
At this point you have some commit checked out, and - especially if you
rebase it or base on some old branch version - there is literally no way to
figure out "Is this change for main branch or v2-10-test". So we have to have a
way to determine whether we are in `main` branch or `v2-10-test` branch - just
looking at the sources.
And we need to determine it because different CI images are used in breeze
for these two - because they have potentially pretty different dependencies.
When you run `breeze ci-image build --dry-run` in `main` branch - you will
see that this image is going to be built:
```
ghcr.io/apache/airflow/main/ci/python3.9:latest
```
When you run the same command in `v2-10-test` you will see:
```
ghcr.io/apache/airflow/v2-10-test/ci/python3.8:latest
```
The way we implemented it is that we have this file in our repo:
https://github.com/apache/airflow/blob/main/dev/breeze/src/airflow_breeze/branch_defaults.py
- this one is modified to point to `v2-10-test` when we create `v2-10-test`
branch.
So all the changes in `main` branch have `AIRFLOW_BRANCH = "main"` - all the
changes in `v2-10-test` have `AIRFLOW_BRANCH = "v2-10-test"`. And selective
checks when run in CI wil use that one to produce `default-branch` output.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]