fix(#2294): make EnsureProvider idempotent via update on AlreadyExists - #2323
Conversation
Site previewPreview: https://b62ffca6-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 11:45 AM UTC · Completed 11:56 AM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Info
Previous runReviewFindingsLow
Info
Previous runReviewFindingsMedium
Low
Info
Previous runReviewFindingsLow
Info
Previous run (2)ReviewFindingsMedium
Low
Info
Previous run (3)ReviewFindingsHigh
Low
Info
|
maruiz93
left a comment
There was a problem hiding this comment.
I think it's a nice idea to delete the providers at the end but it would be better to update them if they already exist while running fullsend run (between different iterations) related inline comments posted
182028a to
88faa44
Compare
|
🤖 Finished Review · ✅ Success · Started 8:12 AM UTC · Completed 8:25 AM UTC |
88faa44 to
50d1e8a
Compare
|
🤖 Finished Review · ✅ Success · Started 8:34 AM UTC · Completed 8:55 AM UTC |
| if err != nil { | ||
| // Redact known credential values from error output. | ||
| outStr := string(out) | ||
| // openshell emits: code: 'Some entity that we attempted to create already exists', message: "provider already exists" |
There was a problem hiding this comment.
[low] error-handling
The AlreadyExists detection uses strings.Contains(outStr, "provider already exists") on combined stdout+stderr. While more specific than the prior "AlreadyExists" match, it still relies on substring matching against unstructured CLI output. If openshell changes the error message, the check silently falls back to the original error-propagation behavior (benign failure mode).
When openshell provider create returns AlreadyExists, fall back to openshell provider update so repeated fullsend run invocations against the same gateway succeed without manual provider deletion. Adds buildProviderUpdateArgs helper and tests covering the fallback and non-AlreadyExists error propagation paths. Refs #2294 Signed-off-by: Hector Martinez <hemartin@redhat.com>
50d1e8a to
58c0e94
Compare
|
🤖 Finished Review · ✅ Success · Started 11:53 AM UTC · Completed 12:07 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 6:10 AM UTC · Completed 6:23 AM UTC |
Retro: PR #2323 — make EnsureProvider idempotentWorkflow overview: Issue #2294 → triage → code agent PR #2296 (delete-and-recreate) → human rejected, created PR #2323 (sandbox-scoped providers) → human reviewer redirected to update-on-AlreadyExists → 3 force pushes → merged after 4 bot reviews and 2 human reviews. What went well:
Inefficiencies observed:
No new proposals. All identified improvement opportunities are already covered by existing open issues, including proposals filed by the prior retro on the related agent PR #2296. This workflow is a good example of the human-agent collaboration model working correctly — the bot provided fast implementation-level feedback while humans provided the design-level guidance that shaped the final solution. |
Nothing reads this variable since the provider migration (#2323). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
Make
EnsureProvideridempotent: whenopenshell provider createreturnsAlreadyExists, fall back toopenshell provider updatewith the current credentials and config. This fixes repeatedfullsend runinvocations against the same gateway failing at the "Ensuring provider" step.Adds
buildProviderUpdateArgshelper and tests covering the update fallback and non-AlreadyExists error propagation.Closes #2294