-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: vendor more OpenTOFU code #2718
base: master
Are you sure you want to change the base?
Conversation
a72637c
to
6bbab4a
Compare
go.mod
Outdated
@@ -40,6 +41,8 @@ require ( | |||
github.com/mitchellh/mapstructure v1.5.0 | |||
github.com/mitchellh/reflectwalk v1.0.2 | |||
github.com/olekukonko/tablewriter v0.0.5 | |||
github.com/opentofu/opentofu v1.8.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm this is a little suspect, likely we're not shadow-rewriting all imports in pkg/vendored/opentofu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this. Fully using vendored (renamed) packages. No direct dependency on opentofu.
Hmm this is interesting, this approach is not quite right, deep inside debugging TestLoadProvider I get an issue. Deep inside the call stack, gRPC is unhappy with:
|
I think I figured that one out, we need to be more careful with how protoc is invoked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with vendoring, but I'd like us to re-examine the process by which we vendor. I have two specific questions:
- Can we link the new code in the pkg/vendored/README.md?
- Can we standardize on a single
generate.go
script (instead of one per vendored directory)?
Once we do this, I don't see any reason to keep the dynamic/go.mod
anymore.
Streamlined vendor folder layout a bit. Single generate.go now. |
One reason to keep the module around is scoping this redirect:
I think hashicorp/hcl is used in non-dynamic bridge code already and I wonder if the replacement will cause any unwanted changes there, e.g. does it need to be there. We'll need test covering why it's there. |
I think I'll postpone removing dynamic/go.mod to a subsequent PR. Focusing on getting tests to run here for now. |
Surprising because I think I can pass it locally? Perhaps platform specific issues? |
In particular this achieves using Pulumi-specific proto generated Go code avoiding errors of double-loading copies of the same Go proto code in the same process.
ed1b2b6
to
478f42b
Compare
Fixed an issue with an over-eager patch that disabled code when vendoring. Let us see if this passes now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t.Parallel() is not compatible with t.Setenv
Changes:
I think it fixes #2668 or it should do that because the resulting solution bundles vendored opentofu code that rewrites the generated protobuf files to use the Pulumi bridge specific copy.
Fixes #2668
Concerns: