Check exit code of providers mirror#28
Open
agentydragon wants to merge 1 commit intoyanndegat:mainfrom
Open
Conversation
The `terraform providers mirror` and `tofu providers mirror` commands were executed without checking the return code, and stdout was redirected to /dev/null. A transient registry outage would silently produce an incomplete mirror that Bazel caches, causing later validate tests to fail with "provider not found in mirror". Capture the execution result, remove output suppression, and fail immediately with the exit code and stderr when the mirror command fails. https://claude.ai/code/session_013H4EkisvYx73E5FbMs4EA7
There was a problem hiding this comment.
Pull request overview
This PR improves reliability of the Bazel-managed Terraform/OpenTofu provider mirror generation by surfacing failures from terraform/tofu providers mirror instead of silently producing an incomplete mirror during transient registry outages.
Changes:
- Capture and check the
ctx.execute(...)result when runningproviders mirrorfor both Terraform and OpenTofu toolchains. - Stop redirecting
providers mirrorstdout to/dev/nullso that output is available for debugging and included on failures. - Fail fast with the exit code and captured stdout/stderr when mirroring fails.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tf/toolchains/tofu/toolchain.bzl |
Capture tofu providers mirror execution result and fail with diagnostics on non-zero exit. |
tf/toolchains/terraform/toolchain.bzl |
Capture terraform providers mirror execution result and fail with diagnostics on non-zero exit. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
agentydragon-agent
pushed a commit
to agentydragon-agent/ducktape
that referenced
this pull request
Mar 1, 2026
Link yanndegat/rules_tf#28 so we know to remove the patches once the fix is upstreamed. https://claude.ai/code/session_014ZBAiyeychPb2xrP1kJPZ4
agentydragon
added a commit
to agentydragon/ducktape
that referenced
this pull request
Mar 1, 2026
Link yanndegat/rules_tf#28 so we know to remove the patches once the fix is upstreamed. https://claude.ai/code/session_014ZBAiyeychPb2xrP1kJPZ4 Co-authored-by: Claude <noreply@anthropic.com>
agentydragon
added a commit
to agentydragon/ducktape
that referenced
this pull request
Mar 1, 2026
Link yanndegat/rules_tf#28 so we know to remove the patches once the fix is upstreamed. https://claude.ai/code/session_014ZBAiyeychPb2xrP1kJPZ4 Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
terraform/tofu providers mirrorwas executed without checking the return code, and stdout was redirected to /dev/null. A transient registry outage would silently make Bazel cache an incomplete mirror. Later validate tests would restore the bad cache and fail with "provider not found in mirror".Fix: Capture the execution result, remove output suppression, and fail immediately with the exit code and stderr when mirroring fails.