Skip to content

Fix runners monitoring workflow: improve reliability and reduce noise#174

Merged
igorpecovnik merged 1 commit intomainfrom
runners
Jan 15, 2026
Merged

Fix runners monitoring workflow: improve reliability and reduce noise#174
igorpecovnik merged 1 commit intomainfrom
runners

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

  • Remove push trigger (only run scheduled and manual)
  • Change schedule from hourly to daily at 6 AM UTC
  • Enable and fix concurrency group (runners-status, cancel-in-progress: true)
  • Move NETBOX_TOKEN and NETBOX_API to env block for consistency
  • Remove duplicate GH_TOKEN variable assignment
  • Add set -euo pipefail for proper error handling
  • Add error checking for GitHub API calls (gh and curl fallback)
  • Add error checking for NetBox API call
  • Add validation that received data is not empty
  • Fix runner status logic: only show 🟢 for runners with "online" status
  • Previously showed 🟢 for any runner with status or "github" label

- Remove push trigger (only run scheduled and manual)
- Change schedule from hourly to daily at 6 AM UTC
- Enable and fix concurrency group (runners-status, cancel-in-progress: true)
- Move NETBOX_TOKEN and NETBOX_API to env block for consistency
- Remove duplicate GH_TOKEN variable assignment
- Add set -euo pipefail for proper error handling
- Add error checking for GitHub API calls (gh and curl fallback)
- Add error checking for NetBox API call
- Add validation that received data is not empty
- Fix runner status logic: only show 🟢 for runners with "online" status
- Previously showed 🟢 for any runner with status or "github" label

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@github-actions github-actions Bot added 02 Milestone: First quarter release size/medium PR with more then 50 and less then 250 lines GitHub Actions GitHub Actions code Needs review Seeking for review labels Jan 15, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 15, 2026

Walkthrough

This PR modifies the GitHub Actions workflow for monitoring runner status. The trigger schedule changes from push and hourly execution to daily at 06:00 UTC. Concurrency configuration is updated with a new group name and cancel-in-progress set to true. Environment variable handling is simplified with explicit NETBOX_TOKEN and NETBOX_API variables. Script robustness is enhanced with set -euo pipefail. Error handling is strengthened for GitHub Runners and NetBox API fetches, including validation of non-empty responses. Data rendering logic is updated to show green dots for online runners and red dots with indices for others.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • armbianworker
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: improving reliability and reducing noise in the runners monitoring workflow through error handling and logic fixes.
Description check ✅ Passed The description is directly related to the changeset, providing a detailed list of specific improvements made to the workflow including schedule changes, error handling, and logic fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch runners

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot requested a review from armbianworker January 15, 2026 22:51
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/monitoring-runners-status.yml:
- Around line 67-76: The curl fallback that runs the command with GH_TOKEN and
writes to "$runners_nd" only requests per_page=100 and doesn't implement
pagination, so it will miss runners when there are >100; update the fallback
(the curl invocation and its enclosing if/then block) to loop through pages
(e.g., increment a page parameter and append each page's .runners[] into
"$runners_nd" until an empty page or fewer than requested items is returned) or,
if you prefer a minimal change, add a clear comment/log message in that block
documenting the 100-item limit and recommending use of "gh api --paginate" (the
code locations to change are the curl command that calls
"https://api.github.com/orgs/armbian/actions/runners?per_page=100", the
surrounding if/then block that exits on failure, and the variable
"$runners_nd").
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9ac3db0 and 60bc8b6.

📒 Files selected for processing (1)
  • .github/workflows/monitoring-runners-status.yml
🔇 Additional comments (5)
.github/workflows/monitoring-runners-status.yml (5)

5-10: LGTM!

Schedule change to daily at 06:00 UTC and the concurrency configuration look good. The cancel-in-progress: true will prevent duplicate workflow runs from piling up.


44-47: LGTM!

Moving NETBOX_TOKEN and NETBOX_API to the env block improves consistency, and adding set -euo pipefail is a best practice for catching errors early in shell scripts.


78-81: LGTM!

Good defensive check to ensure the runners data file is not empty before proceeding.


93-105: LGTM!

Solid error handling for the NetBox API call with -fsS flags and explicit empty-response validation.


126-132: LGTM! This is the key fix.

The updated logic correctly checks both that the runner exists in the lookup (-n "$runner_status") and that its status is specifically "online" before showing the green indicator. This fixes the false-positive issue described in the PR objectives.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread .github/workflows/monitoring-runners-status.yml
@igorpecovnik igorpecovnik merged commit d1d1082 into main Jan 15, 2026
1 check passed
@igorpecovnik igorpecovnik deleted the runners branch January 15, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release GitHub Actions GitHub Actions code Needs review Seeking for review size/medium PR with more then 50 and less then 250 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant