Yicong-Huang commented on code in PR #7172:
URL: https://github.com/apache/texera/pull/7172#discussion_r3692832999


##########
.github/workflows/runner-heartbeat.yml:
##########
@@ -0,0 +1,111 @@
+# 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.
+
+# Liveness probe for the self-hosted runner fleet. `beat` runs a trivial
+# job on the fleet every 15 minutes; a stale last-success means the fleet
+# is down. Two consumers act on that signal:
+#   - precheck.yml queries the last successful heartbeat directly (plain
+#     GITHUB_TOKEN) and falls back to GitHub-hosted runners for the build
+#     tiers when it is stale.
+#   - `watchdog` mirrors the verdict into the ARC_AVAILABLE repository
+#     variable, which the first-hop runs-on expressions (unable to call
+#     APIs) consult. The workflow GITHUB_TOKEN cannot write variables
+#     ("Resource not accessible by integration"), so watchdog uses
+#     AUTO_MERGE_TOKEN (collaborator suffices for the Variables API) and
+#     degrades to log-only when the secret is absent.
+name: Runner Heartbeat
+
+on:
+  schedule:
+    - cron: "*/15 * * * *"
+  workflow_dispatch:
+
+permissions:
+  actions: read
+
+concurrency:
+  group: runner-heartbeat
+  # A beat stuck queueing on a dead fleet is superseded by the next tick
+  # instead of piling up.
+  cancel-in-progress: true
+
+jobs:
+  beat:
+    runs-on: arc-light-linux

Review Comment:
   Ah good point! And yes we should add it.
   
   A bit more context:
   Currently our setup is classic runners which means they are not deleted 
between CI runs. And yes they may have disk issues, or die unexpectedly. This 
is what's currently allowed by asf. 
   
   There is another better option to do elastic scaling and replacing of 
runners, i've tested it on my fork. the runners will be shutdown and recreated 
between CIs, less of disk or other resource concerns. I am still talking to 
INFRA to enable that mode. I think that's better for the long term
   
   
   Meanwhile we should do those health checks by ourselves when using those 
classic runners. I will add some simple logics.
   



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