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

Go plugin acquisition #4060

Merged
merged 8 commits into from
Mar 18, 2020
Merged

Go plugin acquisition #4060

merged 8 commits into from
Mar 18, 2020

Conversation

EvanBoyle
Copy link
Contributor

@EvanBoyle EvanBoyle commented Mar 11, 2020

Revamping the reverted PR from here: #3830

It turns out that if we don't append existing environment variables in the go run case, the command fails with:

failed to discover plugin requirements: failed to execute program cmd: exit status 1

The fact that the previous CI run from f652d93 passed is slightly concerning, as doing a pulumi up locally fails if I don't have the executable pre-build go build -o ....

We should definitely make sure that we're testing the go run path in CI since we're finding discrepancies like this cc @stack72

pgavlin and others added 5 commits January 28, 2020 12:54
These changes implement `GetRequiredPlugins` for Go using a registry
mechanism and an alternate entry point for `pulumi.Run`. Packages that
require plugins are expected to register themselves with the Pulumi SDK.
When `pulumi.Run` is used and the `PULUMI_PLUGINS` envvar is truthy, the
program will dump a JSON-encoded description of its required plugins to
stdout. The language host then uses this description to respond to
`GetRequiredPlugins`.

Fixes #1549.
@EvanBoyle EvanBoyle changed the title WIP Pgavlin/go plugins Go plugin acquisition Mar 12, 2020
@EvanBoyle EvanBoyle requested a review from pgavlin March 12, 2020 00:12
@EvanBoyle EvanBoyle marked this pull request as ready for review March 12, 2020 00:14
Copy link
Member

@lukehoban lukehoban left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@pgavlin pgavlin left a comment

Choose a reason for hiding this comment

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

One change; LGTM otherwise

pkg/codegen/go/gen.go Outdated Show resolved Hide resolved
@EvanBoyle EvanBoyle merged commit 8b46e71 into master Mar 18, 2020
@pulumi-bot pulumi-bot deleted the pgavlin/goPlugins branch March 18, 2020 19:41
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