Repository navigation
fix: resolve Docker Hub rate limit issues in GitHub Actions - #1511
Conversation
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
- Replace Docker-based PR Size Labeler with custom GitHub Script action - Update LocalStack to use AWS ECR Public registry (public.ecr.aws/localstack/localstack) - Add retry logic with exponential backoff for k3s image pulls - Configure Docker daemon to use mirror.gcr.io for k3s tests These changes eliminate Docker Hub dependencies where possible and add resilience for remaining Docker Hub pulls to avoid rate limit failures. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
24f4363 to
bb5edcd
Compare
Remove unnecessary complexity: - No need for Docker mirror configuration for k3s - No need for pre-pull with retry logic - GitHub Actions has better rate limits than regular users - Let docker-compose handle pulling directly Keep only the essential changes: - Custom PR Size Labeler (no Docker needed) - LocalStack using AWS ECR Public registry 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds a local composite GitHub Action (.github/actions/pr-sizer) that computes PR change size, applies size labels (xs/s/m/l/xl) and can fail on XL; updates workflows to use it instead of an external action; switches LocalStack images to public ECR in CI and examples. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub
participant Runner as Actions Runner
participant Sizer as PR Size Labeler (composite)
participant API as GitHub API
Dev->>GH: Open/Update Pull Request
GH-->>Runner: Trigger workflow
Runner->>Sizer: Run composite action
Sizer->>API: List PR files (paginated)
Sizer->>Sizer: Apply ignore rules & sum changes
Sizer->>Sizer: Determine size bucket (XS/S/M/L/XL)
Sizer->>API: Get current PR labels
Sizer->>API: Remove old size labels
Sizer->>API: Add new size label
alt XL selected and fail_if_xl = true
Sizer-->>Runner: Exit with failure
else
Sizer-->>Runner: Exit success
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
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 |
The original action doesn't fail builds for XL PRs, it only labels them. Remove the unnecessary fail_if_xl parameter and logic to match the original behavior exactly. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit 31e3644.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1511 +/- ##
==========================================
+ Coverage 56.98% 57.02% +0.03%
==========================================
Files 284 284
Lines 30292 30292
==========================================
+ Hits 17262 17274 +12
+ Misses 11206 11193 -13
- Partials 1824 1825 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
772bb54 to
648d1b3
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
.github/actions/pr-sizer/action.yml(1 hunks).github/workflows/codeql.yml(2 hunks).github/workflows/test.yml(2 hunks)examples/demo-localstack/docker-compose.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Build (windows-latest, windows)
- GitHub Check: Build (macos-latest, macos)
- GitHub Check: Build (ubuntu-latest, linux)
- GitHub Check: Lint (golangci)
- GitHub Check: Analyze (go)
- GitHub Check: Summary
🔇 Additional comments (3)
examples/demo-localstack/docker-compose.yml (1)
4-4: Looks good.Same tag, new registry. No objections.
.github/workflows/test.yml (1)
254-254: LocalStack mirror change looks solid.Pulling from ECR Public sidesteps the Docker Hub quotas and should unblock the job.
.github/workflows/codeql.yml (1)
154-166: All good on the PR sizer switch.Nice swap to the in-repo action; inputs stay consistent and we avoid the Docker Hub pull entirely. Appreciated.
- Replace single-page fetch with github.paginate() to handle PRs with >100 files - Add logging to show total file count being processed - Ensures accurate size calculations for large PRs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
These changes were released in v1.191.1-test.0. |
what
why
Solution Details
Custom PR Size Labeler
.github/actions/pr-sizer/- a custom GitHub Action using GitHub Script APILocalStack Updates
public.ecr.aws/localstack/localstack:1.4.0K3s Resilience
mirror.gcr.ioas a registry mirrorTest Plan
references
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Chores