-
Notifications
You must be signed in to change notification settings - Fork 872
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
Do not use "latest" GKE engine in examples. #343
Conversation
Using a fuzzy version as an input to `nodeVersion` can cause spurious diffs, as the state returned by the provider will contain a specific version for this field. Instead, fetch the latest version from GKE using `getEngineVersions` and use that.
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
@@ -19,11 +19,13 @@ | |||
# password is the password for the admin user in the cluster. | |||
PASSWORD = config.get_secret('password') or RandomString("password", length=20, special=True).result | |||
|
|||
engine_version = Output.from_input(get_engine_versions()).latest_master_version |
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 is pretty "strange" looking code to have to add to the top of many of our intro-to-pulumi examples. I'd actually be inclined to just hard code a version and have to fix up our examples occasionally as these get updated - or pick this up from config and hard code the values into the test config?
I don't love hurting readability/usability of examples just to make testing easier.
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'd love to make this easier to read, but I do kind of prefer this approach to the hard-coded version approach. If I knew Python better, I would have avoided the Output.from_input
bit.
That said, this is important content, so I'll defer to you if you feel strongly here.
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.
Hard-coding into the config seems reasonable-ish, as we could also pull the latest version inside the test framework if we cared to.
Merged to unblock some testing. I've filed #344 for follow-up. |
Replicating changes from pulumi/examples#343.
* Do not use "latest" GKE engine in examples. Replicating changes from pulumi/examples#343. * Fix gcp.container.Cluster version for more occurrences.
Using a fuzzy version as an input to `nodeVersion` can cause spurious diffs, as the state returned by the provider will contain a specific version for this field. Instead, fetch the latest version from GKE using `getEngineVersions` and use that.
Using a fuzzy version as an input to `nodeVersion` can cause spurious diffs, as the state returned by the provider will contain a specific version for this field. Instead, fetch the latest version from GKE using `getEngineVersions` and use that.
Using a fuzzy version as an input to `nodeVersion` can cause spurious diffs, as the state returned by the provider will contain a specific version for this field. Instead, fetch the latest version from GKE using `getEngineVersions` and use that.
Using a fuzzy version as an input to
nodeVersion
can cause spuriousdiffs, as the state returned by the provider will contain a specific
version for this field. Instead, fetch the latest version from GKE using
getEngineVersions
and use that.