Skip to content
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

Merged
merged 1 commit into from
Jul 10, 2019
Merged

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Jul 10, 2019

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.
Copy link
Contributor

@ellismg ellismg left a 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
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

@pgavlin pgavlin merged commit c9c06e8 into master Jul 10, 2019
@pulumi-bot pulumi-bot deleted the pgavlin/gkeVersions branch July 10, 2019 17:00
@pgavlin
Copy link
Member Author

pgavlin commented Jul 10, 2019

Merged to unblock some testing. I've filed #344 for follow-up.

clstokes added a commit to pulumi/docs that referenced this pull request Jul 23, 2019
stack72 pushed a commit to pulumi/docs that referenced this pull request Jul 24, 2019
* Do not use "latest" GKE engine in examples.

Replicating changes from pulumi/examples#343.

* Fix gcp.container.Cluster version for more occurrences.
ramene pushed a commit to ramene/pulumi-kubeflow-ml that referenced this pull request Sep 7, 2019
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.
ramene pushed a commit to ramene/pulumi-kubeflow-ml that referenced this pull request Sep 13, 2019
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.
dixler pushed a commit that referenced this pull request Jan 21, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants