-
Notifications
You must be signed in to change notification settings - Fork 102
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
Enable alternative reading of a registry module by its ID #988
Conversation
1fe6259
to
ed36a7a
Compare
55cb689
to
414e429
Compare
var u string | ||
if moduleID.ID == "" { | ||
if moduleID.RegistryName == "" { | ||
log.Println("[WARN] Support for using the RegistryModuleID without RegistryName is deprecated as of release 1.5.0 and may be removed in a future version. The preferred method is to include the RegistryName in RegistryModuleID.") |
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 know you didn't add this, but registry_module.go seems to be the only file in go-tfe which is using the log
package, and, as a library, probably shouldn't be logging to stderr. It would be nice if you could go ahead and remove all these log.Print calls from this file, but I'll take care of it if you don't feel like waiting for another review!
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.
Thank you. I will go ahead and merge this. Is there a convention employed in go-tfe for including deprecated messages?. Perhaps we could just remove them entirely, and have the comments indicate the deprecated attributes.
Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes. |
Description
This enables an alternative way to read a registry module by its ID instead of its address (namespace/name/system). When the external ID is given, all other attributes are ignored.
Testing plan
go test -v -run ^TestRegistryModulesRead$ github.com/hashicorp/go-tfe
should succeed.External links
Output from tests
Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.