Set up publishing of SNAPSHOT builds to GitHub Packages#76
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 23 minutes and 16 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe GitHub Actions workflow for cleaning up snapshot packages now includes stricter shell error handling and a new variable for parameterizing Maven endpoints. The cleanup logic has been enhanced to fetch total version counts, log this information, and conditionally delete entire packages when few versions remain, rather than attempting individual version deletions. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
🧹 Nitpick comments (1)
.github/workflows/cleanup-snapshot.yml (1)
39-44: Verify error suppression doesn't mask API issues.The
2>/dev/null || truepattern allows graceful handling when the package doesn't exist, but it also suppresses all stderr including potential API errors (rate limiting, auth issues, network failures). For a cleanup job this is generally acceptable, but consider whether logging stderr while still allowing the script to continue would aid debugging.ALL_VERSION_IDS=$(gh api \ --paginate \ -H "Accept: application/vnd.github+json" \ "/orgs/${{ github.repository_owner }}/packages/maven/${PACKAGE_NAME}/versions" \ - --jq ".[].id" 2>/dev/null || true) + --jq ".[].id" 2>&1 || true)This would log any errors while still continuing execution. However, the current approach is reasonable if you prefer cleaner logs when packages don't exist.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/cleanup-snapshot.yml around lines 39 - 44, The current gh api call that populates ALL_VERSION_IDS uses "2>/dev/null || true" which hides all stderr (masking API errors); update the invocation that builds ALL_VERSION_IDS to capture and log stderr while still allowing the command to succeed if the package is missing — for example, pipe stderr to a logger/tee or a temp file and then continue with "|| true". Target the gh api call that constructs ALL_VERSION_IDS and ensure any captured stderr is printed to the workflow log (or stored) before continuing so rate-limit/auth/network errors are visible while preserving the graceful fallback when the package doesn't exist.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/cleanup-snapshot.yml:
- Around line 39-44: The current gh api call that populates ALL_VERSION_IDS uses
"2>/dev/null || true" which hides all stderr (masking API errors); update the
invocation that builds ALL_VERSION_IDS to capture and log stderr while still
allowing the command to succeed if the package is missing — for example, pipe
stderr to a logger/tee or a temp file and then continue with "|| true". Target
the gh api call that constructs ALL_VERSION_IDS and ensure any captured stderr
is printed to the workflow log (or stored) before continuing so
rate-limit/auth/network errors are visible while preserving the graceful
fallback when the package doesn't exist.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b06c800f-f41d-4729-800f-da2f65b0b37f
📒 Files selected for processing (1)
.github/workflows/cleanup-snapshot.yml
Fixes for #74: * Remove `SNAPSHOT`-s.
0699854 to
df70f1c
Compare
Description
Fixes for #74:
SNAPSHOTpackages based on the pull request upon merge.Summary by CodeRabbit