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

Revise host mode. #5317

Merged
merged 5 commits into from
Sep 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ CHANGELOG
when interacting with a private repo
[#5333](https://github.com/pulumi/pulumi/pull/5333)

- Revise the design for connecting an existing language runtime to a CLI invocation.
Note that this is a protocol breaking change for the Automation API, so both the
API and the CLI must be updated together.
[#5317](https://github.com/pulumi/pulumi/pull/5317)

## 2.10.0 (2020-09-10)

- feat(autoapi): add Upsert methods for stacks
Expand Down
248 changes: 0 additions & 248 deletions pkg/cmd/pulumi/host.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/cmd/pulumi/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func getProjectPlugins() ([]workspace.PluginInfo, error) {
// Get the required plugins and then ensure they have metadata populated about them. Because it's possible
// a plugin required by the project hasn't yet been installed, we will simply skip any errors we encounter.
var results []workspace.PluginInfo
plugins, err := ctx.Host.GetRequiredPlugins(plugin.ProgInfo{
plugins, err := plugin.GetRequiredPlugins(ctx.Host, plugin.ProgInfo{
Proj: proj,
Pwd: pwd,
Program: main,
Expand Down
7 changes: 6 additions & 1 deletion pkg/cmd/pulumi/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func newPreviewCmd() *cobra.Command {
var stack string
var configArray []string
var configPath bool
var client string

// Flags for engine.UpdateOptions.
var jsonDisplay bool
Expand Down Expand Up @@ -106,7 +107,7 @@ func newPreviewCmd() *cobra.Command {
return result.FromError(err)
}

proj, root, err := readProject()
proj, root, err := readProjectForUpdate(client)
if err != nil {
return result.FromError(err)
}
Expand Down Expand Up @@ -195,6 +196,10 @@ func newPreviewCmd() *cobra.Command {
&configPath, "config-path", false,
"Config keys contain a path to a property in a map or list to set")

cmd.PersistentFlags().StringVar(
&client, "client", "", "The address of an existing language runtime host to connect to")
pgavlin marked this conversation as resolved.
Show resolved Hide resolved
_ = cmd.PersistentFlags().MarkHidden("client")

cmd.PersistentFlags().StringVarP(
&message, "message", "m", "",
"Optional message to associate with the preview operation")
Expand Down
1 change: 0 additions & 1 deletion pkg/cmd/pulumi/pulumi.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ func NewPulumiCmd() *cobra.Command {
// Less common, and thus hidden, commands:
cmd.AddCommand(newGenCompletionCmd(cmd))
cmd.AddCommand(newGenMarkdownCmd(cmd))
cmd.AddCommand(newHostCmd())

// We have a set of commands that are still experimental and that we add only when PULUMI_EXPERIMENTAL is set
// to true.
Expand Down
7 changes: 6 additions & 1 deletion pkg/cmd/pulumi/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func newUpCmd() *cobra.Command {
var stack string
var configArray []string
var path bool
var client string

// Flags for engine.UpdateOptions.
var policyPackPaths []string
Expand Down Expand Up @@ -85,7 +86,7 @@ func newUpCmd() *cobra.Command {
return result.FromError(err)
}

proj, root, err := readProject()
proj, root, err := readProjectForUpdate(client)
if err != nil {
return result.FromError(err)
}
Expand Down Expand Up @@ -399,6 +400,10 @@ func newUpCmd() *cobra.Command {
"decrypt secrets (possible choices: default, passphrase, awskms, azurekeyvault, gcpkms, hashivault). Only"+
"used when creating a new stack from an existing template")

cmd.PersistentFlags().StringVar(
&client, "client", "", "The address of an existing language runtime host to connect to")
_ = cmd.PersistentFlags().MarkHidden("client")

cmd.PersistentFlags().StringVarP(
&message, "message", "m", "",
"Optional message to associate with the update operation")
Expand Down
Loading