-
-
Notifications
You must be signed in to change notification settings - Fork 12
Improve repository-status workflow reliability and add scheduling #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe GitHub Actions workflow at .github/workflows/repository-status.yaml was rewritten to run daily (cron) and via workflow_dispatch, renamed "Data: Fetch Armbian kernel versions", and moved concurrency group to repository-status. Network operations gained a retry wrapper applied to APT key fetch and apt-get update. Kernel versions are extracted via apt search with validation (non-empty + semver). Generated badges and kernel-versions.json are produced, placed under data/, and the workflow robustly fetches or creates the data branch (orphan if missing). Git commit/push now uses configured author, conditional commits, push retries with pull --rebase on conflict, and final repository_dispatch with type "Web: Directory listing". Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
✏️ Tip: You can disable this entire section by setting 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @.github/workflows/repository-status.yaml:
- Line 64: The current retry only covers the curl process; wrap the whole
pipeline so failures in gpg --dearmor also trigger retries by invoking retry
with a shell command that runs the full pipeline (the existing line containing
"retry curl -fsSL https://apt.armbian.com/armbian.key | sudo gpg --dearmor -o
\"$KEYRING\"") instead of just curl, or implement a small retry loop around the
combined "curl ... | sudo gpg --dearmor -o \"$KEYRING\"" operation so both curl
and gpg errors are retried.
- Around line 14-19: The workflow currently uses an unfiltered push trigger
("push:") which causes runs on every push; update the on: block to either remove
the "push:" key entirely if only scheduled and manual runs are desired, or
replace it with a filtered push trigger (e.g., "push: { branches: [ 'main',
'release' ] }" or include a "paths:" filter) so only specific branches/paths
trigger the workflow; edit the top-level "on:" stanza that contains push,
schedule, and workflow_dispatch to apply the chosen change.
- Around line 110-123: The fetch+exit logic makes the orphan branch creation
unreachable because a failed git fetch origin data exits early; instead allow
the script to continue on fetch failure and detect the remote branch via git
ls-remote or by silencing fetch. Replace the current `git fetch origin data`
block so it does not exit on failure (e.g., `git fetch origin data || true`), or
use `git ls-remote --heads origin data` to decide whether `origin/data` exists,
then keep the existing `git rev-parse --verify origin/data` check and fall
through to `git checkout --orphan data` and `git rm -rf . || true` when the
remote branch is absent.
🧹 Nitpick comments (1)
.github/workflows/repository-status.yaml (1)
104-163: Missingset -euo pipefailin commit step.Unlike the previous step, this run block doesn't set strict error handling. If
git pull --rebasefails (e.g., merge conflicts), the script continues silently. Consider adding strict mode at the top of this step:Suggested addition
- name: Commit changes if any run: | + set -euo pipefail + cd armbian.github.ioAnd handle rebase failures explicitly:
# Pull with rebase to resolve conflicts echo "Push failed, attempting to pull and rebase..." >&2 - git pull --rebase origin data + if ! git pull --rebase origin data; then + echo "Rebase failed, aborting..." >&2 + git rebase --abort || true + exit 1 + fi
📜 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.
📒 Files selected for processing (1)
.github/workflows/repository-status.yaml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-04T22:48:41.167Z
Learnt from: igorpecovnik
Repo: armbian/armbian.github.io PR: 85
File: .github/workflows/generate-keyring-data.yaml:75-85
Timestamp: 2025-11-04T22:48:41.167Z
Learning: In `.github/workflows/generate-keyring-data.yaml` for the Armbian project: `ubuntu-keyring-ports` is intentionally optional because they're not certain it's needed, while `debian-ports-archive-keyring` must be mandatory because it's always available in Debian sid and is required for the project.
Applied to files:
.github/workflows/repository-status.yaml
🔇 Additional comments (5)
.github/workflows/repository-status.yaml (5)
1-12: LGTM!Clear and comprehensive documentation header explaining the workflow's purpose, requirements, and outputs.
45-61: LGTM!Well-implemented retry function with exponential backoff (5s → 10s → 20s). Good use of local variables and proper exit codes.
78-95: LGTM!Good improvements: retry for apt-get, explicit semver validation with
^[0-9]+\.[0-9]+\.[0-9]+$, and helpful diagnostic output on failure.
165-169: LGTM!Repository dispatch step is correctly configured with a descriptive event type.
31-35: No action required —actions/checkout@v6is the current stable release.The workflow correctly uses the official, actively maintained version of the checkout action. This is the current major release with no known issues.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
1a62e41 to
7b7aef7
Compare
This commit significantly improves the robustness of the kernel version fetching workflow with the following changes: **Reliability improvements:** - Add retry logic with exponential backoff for network operations (curl, apt-get) - Improve version parsing with proper semver validation regex - Add explicit error handling for git fetch (removed || true) - Add git push retry with automatic rebase on conflicts - Add comprehensive version format validation **Workflow triggers:** - Add cron schedule to run daily at 2:15 AM UTC - Add workflow_dispatch for manual execution - Remove repository_dispatch trigger (simplified) **Other improvements:** - Fix concurrency group naming from "redirector" to "repository-status" - Add comprehensive documentation header - Add better logging with detected versions output - Add helpful error messages for debugging Signed-off-by: Igor Pecovnik <igor@armbian.com>
7b7aef7 to
8d7c6cb
Compare
This commit significantly improves the robustness of the kernel version fetching workflow with the following changes:
Reliability improvements:
Workflow triggers:
Other improvements: