Skip to content

Conversation

@igorpecovnik
Copy link
Member

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

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

coderabbitai bot commented Jan 15, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

The 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

  • armbianworker
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: improving workflow reliability through retry mechanisms and adding scheduling via cron triggers.
Description check ✅ Passed The description is directly related to the changeset, detailing reliability improvements, workflow trigger changes, and other enhancements made to the repository-status workflow.
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 feature/improve-repository-status-workflow


📜 Recent 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 1a62e41 and 8d7c6cb.

📒 Files selected for processing (1)
  • .github/workflows/repository-status.yaml

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


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:04
Copy link
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: 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: Missing set -euo pipefail in commit step.

Unlike the previous step, this run block doesn't set strict error handling. If git pull --rebase fails (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.io

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

📥 Commits

Reviewing files that changed from the base of the PR and between f45d4d1 and 1a62e41.

📒 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@v6 is 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.

@igorpecovnik igorpecovnik force-pushed the feature/improve-repository-status-workflow branch from 1a62e41 to 7b7aef7 Compare January 16, 2026 12:29
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>
@igorpecovnik igorpecovnik force-pushed the feature/improve-repository-status-workflow branch from 7b7aef7 to 8d7c6cb Compare January 16, 2026 12:31
@igorpecovnik igorpecovnik merged commit 5d30e8a into main Jan 16, 2026
11 checks passed
@igorpecovnik igorpecovnik deleted the feature/improve-repository-status-workflow branch January 16, 2026 12:32
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.

2 participants