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

Add support for Python first-class providers #350

Merged
merged 3 commits into from
Jan 17, 2019

Conversation

swgillespie
Copy link
Contributor

Adds support for referring to the Kubernetes provider in a first-class
manner in Python. This is accomplished using a similar method to Node -
the provider is explicitly projected as a resource and users are free to
instantiate it at-will and use it to create other Kubernetes resources.

This commit also adds a smoke test for the feature.

(Finally) fixes pulumi/pulumi#1713.

Adds support for referring to the Kubernetes provider in a first-class
manner in Python. This is accomplished using a similar method to Node -
the provider is explicitly projected as a resource and users are free to
instantiate it at-will and use it to create other Kubernetes resources.

This commit also adds a smoke test for the feature.
@swgillespie
Copy link
Contributor Author

I haven't hooked up the test to the test harness yet - I suspect that it'll fail since it requires a new release of pulumi to function correctly.

@hausdorff
Copy link
Contributor

@swgillespie you seem to be correct about the failure, what do we need to get this up and running? Wait for a release? (I know embarrassingly ~nothing about pip.)

@swgillespie
Copy link
Contributor Author

you seem to be correct about the failure, what do we need to get this up and running? Wait for a release? (I know embarrassingly ~nothing about pip.)

On Friday we shipped a release of the pulumi package with support for first-class providers, so I think all that needs to happen here is to bump our pulumi reference in the pulumi-kubernetes package. I'll give that a try.

1. Fix the minimum version of the pulumi package to 0.16.10, the minimum
for first-class providers
2. Hook up the smoke test to the integration test framework
3. Update the referenced version of pulumi in the provider test's
requirements.txt
@swgillespie
Copy link
Contributor Author

Looks like the istio test failed?

[                          step1 ] Diagnostics:
[                          step1 ]   gcp:container:Cluster (test-ci-istio):
[                          step1 ]     error: Plan apply failed: 1 error occurred:
[                          step1 ]     
[                          step1 ]     * creating urn:pulumi:p-it-travis-job-step1-f366dabc::istio::gcp:container/cluster:Cluster::test-ci-istio: Invalid address to set: []string{"cluster_autoscaling"}

@lblackstone
Copy link
Member

Looks like the istio test failed?

[                          step1 ] Diagnostics:
[                          step1 ]   gcp:container:Cluster (test-ci-istio):
[                          step1 ]     error: Plan apply failed: 1 error occurred:
[                          step1 ]     
[                          step1 ]     * creating urn:pulumi:p-it-travis-job-step1-f366dabc::istio::gcp:container/cluster:Cluster::test-ci-istio: Invalid address to set: []string{"cluster_autoscaling"}

#351 (comment)

@swgillespie
Copy link
Contributor Author

nice!

Copy link
Contributor

@hausdorff hausdorff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know much about pulumi.ProviderResource, so this approval comes with a grain of salt. :)

@hausdorff
Copy link
Contributor

@swgillespie re-ran your tests, this is a Python-related error: https://travis-ci.com/pulumi/pulumi-kubernetes/builds/97289084#L8441

@swgillespie
Copy link
Contributor Author

I'm not sure what the deal is with the Python issue, but it didn't repro when I re-ran the tests again... most likely something went wrong here during the installation step, since the crash isn't in our code at all.

Is this ok to merge?

@swgillespie swgillespie merged commit 1bd96ed into master Jan 17, 2019
@pulumi-bot pulumi-bot deleted the swgillespie/py-provider branch January 17, 2019 00:54
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.

Expose provider resources in Python
3 participants