shahar1 commented on code in PR #74889:
URL: https://github.com/apache/airflow/pull/74889#discussion_r4308397529
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -2126,6 +2129,96 @@ def amd_runners(self) -> str:
def arm_runners(self) -> str:
return PUBLIC_ARM_RUNNERS
+ @cached_property
+ def runner_type(self) -> str:
+ """Runner labels for the jobs of a CI run on this run's platform.
+
+ The RunsOn label is a template the jobs fill in with their size class.
+ """
+ # RunsOn needs the run id in the label; without one (e.g. a local run)
the jobs would never start.
+ run_id = self._github_context_dict.get("run_id")
+ if not run_id or not self._use_runs_on_runners():
+ return PUBLIC_ARM_RUNNERS if self._platform == CI_ARM_PLATFORM
else PUBLIC_AMD_RUNNERS
+ template = (
+ RUNS_ON_ARM_RUNNER_TEMPLATE if self._platform == CI_ARM_PLATFORM
else RUNS_ON_AMD_RUNNER_TEMPLATE
+ )
+ return json.dumps([template.format(run_id=run_id)])
+
+ def _use_runs_on_runners(self) -> bool:
+ """Whether this run may use the self-hosted RunsOn runners.
+
+ Code that runs on them can reach the RunsOn stack's AWS resources, so
only code from
+ apache/airflow itself goes there: pushes, schedules and dispatches,
and PRs from its own
+ branches except bots' (e.g. Dependabot's), which carry code nobody has
reviewed. A PR from a fork
+ goes there only after a committer adds the ``use self-hosted runners``
label.
Review Comment:
Applied in `e8d62bbb33`, adapted for the Flex decision: the restriction is
named as the RunsOn stack and the repository's Actions settings rather than a
runner group, and the fork-PR sentence now says the label needs a committer's
approval of the head commit (details in the PR comment).
---
Drafted-by: Claude Code (Fable 5.1) (no human review before posting)
##########
scripts/ci/move_docker_to_mnt.sh:
##########
@@ -29,7 +29,11 @@ function cleanup_runner {
# Hence we only move docker to /mnt on x86_64 where we have a separate
/mnt mount
# If we get short on disk space on arm64 as well we need to revisit this
logic
# and make the idle nvme being used as well.
- if uname -i|grep -q x86_64; then
+ if [[ "${RUNNER_ENVIRONMENT:-}" == "self-hosted" ]] && mountpoint -q
/var/lib/docker; then
+ # RunsOn already keeps docker on the instance's local NVMe disks,
which may also back
+ # /home/runner and /tmp, so emptying /var/lib/docker could delete the
running job's files.
+ echo "/var/lib/docker is already on a dedicated disk - keeping it"
Review Comment:
Applied verbatim in `e8d62bbb33`.
---
Drafted-by: Claude Code (Fable 5.1) (no human review before posting)
--
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]