-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fix replace go mod #197
Merged
Merged
Fix replace go mod #197
Conversation
This file contains 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
The way we install the SDK and its dependencies in plugins, using go install, is incompatible with replace statements. Therefore, we remove that statement from the go.mod, and leave the responsibility of including that replace to plugins that import the SDK.
Before this commit, `packer-sdc fix' would only work on plugins that import the SDK, but we also need to make `packer-sdc fix' compatible with the SDK itself, so we add an extra check to packer-sdc so it doesn't ignore the SDK when applying the replace fix.
lbajolet-hashicorp
force-pushed
the
fix_replace_go_mod
branch
7 times, most recently
from
July 31, 2023 15:24
6fcb0ac
to
8f99171
Compare
nywilken
reviewed
Jul 31, 2023
nywilken
reviewed
Jul 31, 2023
lbajolet-hashicorp
force-pushed
the
fix_replace_go_mod
branch
3 times, most recently
from
July 31, 2023 17:58
aeeb2c2
to
b820020
Compare
lbajolet-hashicorp
force-pushed
the
fix_replace_go_mod
branch
from
July 31, 2023 18:08
cc8189f
to
08ddc2f
Compare
nywilken
reviewed
Jul 31, 2023
Since we remove the `replace' statement from the go.mod, tests will fail as the updated version of go-cty does not support gob, and some tests rely on that by default as we init RPC to work with gob-encoded payloads. To avoid this failure in CI, we add an extra step to the go-test workflow so that it amends the go.mod, tidies it to resolve missing sums, and continues with testing afterwards
lbajolet-hashicorp
force-pushed
the
fix_replace_go_mod
branch
from
July 31, 2023 19:31
08ddc2f
to
fd8b81d
Compare
nywilken
approved these changes
Aug 1, 2023
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.
This looks good to me. Can we rebase the commits before merging.
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.
Release 0.5.0 of the SDK was borked as the
replace
statement forgo-cty
in thego.mod
makes it incompatible withgo install
, which is how dependents of the SDK installpacker-sdc
.To fix this, we remove this statement from the
go.mod
, and amend the test action so that it adds that statement before testing.