feat: skip rebuild when build already succeeded with -d flag#52
Conversation
When using `bob build <name> -d <dir>`, the CLI now checks if the build is already in Succeeded phase before triggering a new run. If so, it downloads existing artifacts directly, showing the commit and toolchain image for transparency. Use --force to override this and always rebuild. This avoids redundant multi-minute builds when the source (commit) and toolchain image haven't changed. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ 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: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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 |
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46416353eb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if downloadDir != "" && !force { | ||
| if skipped, err := downloadIfUpToDate(cmd.Context(), args[0], downloadDir, skipVerify); err != nil { |
There was a problem hiding this comment.
Retrigger after source restore before skipping rebuild
autoRestoreIfLocal runs immediately before this block and restoreGitSource only patches the BuildJob spec back to git source (it does not trigger a new run). With the new skip path, a previously succeeded local build now causes bob build <name> -d to exit early and download old artifacts, even though the source was just restored to git. This is a regression for the common flow “local build succeeded, then run non-local download” unless users remember --force.
Useful? React with 👍 / 👎.
Co-authored-by: Cursor <cursoragent@cursor.com>
When autoRestoreIfLocal switches the BuildJob back to git source, the previous Succeeded phase is from the local build. Skip the up-to-date check in that case to ensure a fresh build from the restored git source. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
bob build <name> -d <dir>, the CLI now checks if the build already succeeded before triggering a new PipelineRun--forceflag to override the check and always trigger a fresh buildBehavior
Test plan
go build ./cmd/bob/compilesgo test ./cmd/bob/all tests passbob build <name> -d ./outwith succeeded build skips retriggerbob build <name> -d ./out --forcealways retriggersbob build <name> -d ./outwith failed/running build triggers normallyMade with Cursor