-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Prevent breakage when merging OSS changes to ENT due to missing funcs #21564
Conversation
…e stubs on oss, and also on ent if the real func hasn't yet been defined.
tools/stubmaker/main.go
Outdated
} | ||
|
||
target := fmt.Sprintf("%s_ent.go", baseFilename) | ||
os.Remove(target) |
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.
do we want to remove the ent file, if it exists?
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 think we do. It's possible that we created it in a previous run, but since then the real funcs were implemented, and now the presence of the file causes builds to fail due to multiple definitions of the funcs.
cfg := &packages.Config{ | ||
Mode: packages.NeedName | packages.NeedTypes | packages.NeedTypesInfo | packages.NeedSyntax, | ||
Tests: false, | ||
BuildFlags: []string{fmt.Sprintf("-tags=%s", strings.Join(tags, " "))}, |
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.
do we need to worry about any additional tags, like hsm or fips?
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.
Good question. Re HSM, I don't think so, we don't run tests using hsm
AFAIK, I think it's mostly about how we build the binaries. Re fips, less certain, but looking at how much it's used now I'm inclined to not worry about. For one thing, how would we know which to use when running locally (i.e. not in CI), fips or not fips?
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.
LGTM!
I'll defer backporting until I've done more testing. |
See https://hashicorp.atlassian.net/browse/VAULT-17420 for background.