amoghrajesh commented on code in PR #38779:
URL: https://github.com/apache/airflow/pull/38779#discussion_r1553924741


##########
dev/breeze/doc/ci/04_selective_checks.md:
##########
@@ -267,17 +267,29 @@ This is controlled by `Selective checks 
<04_selective_checks.md>`__ that set app
 the build-info job of the workflow (see`is-committer-build` to `true`) if the 
actor is in the committer's
 list and can be overridden by `non committer build` label in the PR.
 
-Also, for most of the jobs, committer builds by default use "Self-hosted" 
runners, while non-committer
-builds use "Public" runners. For committers, this can be overridden by setting 
the
-`use public runners` label in the PR.
+## Changing behaviours of the CI runs by setting labels
+
+Also, currently for most of the jobs, committer builds by default use 
"Self-hosted" runners, while
+non-committer  builds use "Public" runners. For committers, this can be 
overridden by setting the

Review Comment:
   super nit: extra space
   ```suggestion
   non-committer builds use "Public" runners. For committers, this can be 
overridden by setting the
   ```



##########
dev/breeze/doc/ci/04_selective_checks.md:
##########
@@ -267,17 +267,29 @@ This is controlled by `Selective checks 
<04_selective_checks.md>`__ that set app
 the build-info job of the workflow (see`is-committer-build` to `true`) if the 
actor is in the committer's
 list and can be overridden by `non committer build` label in the PR.
 
-Also, for most of the jobs, committer builds by default use "Self-hosted" 
runners, while non-committer
-builds use "Public" runners. For committers, this can be overridden by setting 
the
-`use public runners` label in the PR.
+## Changing behaviours of the CI runs by setting labels
+
+Also, currently for most of the jobs, committer builds by default use 
"Self-hosted" runners, while
+non-committer  builds use "Public" runners. For committers, this can be 
overridden by setting the
+`use public runners` label in the PR. In the future when we might also switch 
committers to public runners.
+Committers will be able to use `use self-hosted runners` label in the PR to 
force using self-hosted runners.
+The `use public runners` label will still be available for committers and they 
will be able to set it for
+builds that also have `canary` label set to also switch the `canary` builds to 
public runners.
 
 If you are testing CI workflow changes and want to test it for more complete 
matrix combinations generated by
 the jobs - you can set `all versions` label in the PR. This will run the PRs 
with the same combinations
-of versions as the `canary` main build. Using `all versions` is automatically 
set when build or project
-dependencies change in `pyproject.toml`.
-
-If you are testing CI workflow changes and change `pyproject.toml` or 
`generated/provider_dependencies.json` and you
-want to limit the number of matrix combinations generated by
+of versions as the `canary` main build. Using `all versions` is automatically 
set when build dependencies
+change in `pyproject.toml` or when dependencies change for providers in 
`generated/provider_dependencies.json`
+or when `hatch_build.py` changes.
+
+If you are running an `apache` PR, you can also set `canary` label for such PR 
and in this case, all the
+`canary` properties of build will be used: `self-hosted` runners, `full tests 
needed` mode, `all versions`
+as well as all canary-specific jobs will run there. You can modify this 
behaviour of the `canary` run by
+applying `use public runners`, and `default versions only` labels to the PR as 
well which will still run
+a `canary` equivalent build but with public runners an default Python/K8S 
versions only - respectively.
+
+If you are testing CI workflow changes and change `pyproject.toml` or 
`generated/provider_dependencies.json`
+and you  want to limit the number of matrix combinations generated by

Review Comment:
   super nit: again
   ```suggestion
   and you want to limit the number of matrix combinations generated by
   ```



##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -1129,8 +1134,23 @@ def runs_on_as_json_default(self) -> str:
                         f"[info]Could not find the actor from pull request, "
                         f"falling back to the actor who triggered the PR: 
{actor}[/]"
                     )
-            if actor in COMMITTERS and USE_PUBLIC_RUNNERS_LABEL not in 
self._pr_labels:
+            if (
+                actor not in COMMITTERS
+                and self._pr_labels
+                and USE_SELF_HOSTED_RUNNERS_LABEL in self._pr_labels
+            ):
+                get_console().print(
+                    f"[error]The PR has `{USE_SELF_HOSTED_RUNNERS_LABEL}` 
label, but "
+                    f"the actor is not a committer {actor}. This is not going 
to work.[/]"

Review Comment:
   ```suggestion
                       f"{actor} is not a committer. This is not going to 
work.[/]"
   ```



-- 
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]

Reply via email to