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

[cli] Disable permalinks to the update details page when using self-managed backends (S3, Azure, GCS) #6251

Merged
merged 2 commits into from
Feb 19, 2021

Conversation

stack72
Copy link
Contributor

@stack72 stack72 commented Feb 4, 2021

Fixes: #4029
Fixes: #3537

Should the user want to get permalinks when using a self-managed backend, they can pass a flag:

$ pulumi up --suppress-permalink false

Permalinks for these self-managed backends will be suppressed on update, preview, destroy,
import and refresh operations.

A view of the functionality:

self-managed backend

$ pulumi whoami -v
User: stack72
Backend URL: file://~


$ PULUMI_CONFIG_PASSPHRASE=password pulumi up
Previewing update (pphrase-2):
     Type                 Name                       Plan
     pulumi:pulumi:Stack  testing-pphrase-2
Resources:
    2 unchanged


$ PULUMI_CONFIG_PASSPHRASE=password pulumi up --suppress-permalink false
Previewing update (pphrase-2):
     Type                 Name                       Plan
     pulumi:pulumi:Stack  testing-pphrase-2
Resources:
    2 unchanged

Permalink: file:///Users/stack72/.pulumi/stacks/pphrase-2.json

Using the SaaS

$ pulumi whoami -v
User: stack72
Backend URL: https://app.pulumi.com/stack72


$ pulumi up
Previewing update (dev4)
View Live: https://app.pulumi.com/stack72/testing/dev4/previews/11d3539a-93be-4272-8070-190875b8697f
     Type                          Name                  Plan
 +   pulumi:pulumi:Stack           testing-dev4          create
 +   └─ random:index:RandomString  test                  create
Resources:
    + 2 to create


$ pulumi up --suppress-permalink false
Previewing update (dev4)
View Live: https://app.pulumi.com/stack72/testing/dev4/previews/416a8023-ddcd-4ed1-8d48-5744831b836d
     Type                          Name                  Plan
 +   pulumi:pulumi:Stack           testing-dev4          create
 +   └─ random:index:RandomString  test                  create
Resources:
    + 2 to create


$ pulumi up --suppress-permalink true
Previewing update (dev4)
     Type                          Name                  Plan
 +   pulumi:pulumi:Stack           testing-dev4          create
 +   └─ random:index:RandomString  test                  create
Resources:
    + 2 to create

@stack72 stack72 self-assigned this Feb 4, 2021
Copy link
Contributor

@infin8x infin8x left a comment

Choose a reason for hiding this comment

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

Approved from a "does what I expected it to do" perspective. Full code review left to others more qualified :)

pkg/cmd/pulumi/destroy.go Outdated Show resolved Hide resolved
@stack72 stack72 changed the title [cli] Disable permalinks to the update details page when using non-SaaS backends (S3, Azure, GCS) [cli] Disable permalinks to the update details page when using self-managedbackends (S3, Azure, GCS) Feb 18, 2021
@stack72 stack72 changed the title [cli] Disable permalinks to the update details page when using self-managedbackends (S3, Azure, GCS) [cli] Disable permalinks to the update details page when using self-managed backends (S3, Azure, GCS) Feb 19, 2021
Copy link
Member

@komalali komalali left a comment

Choose a reason for hiding this comment

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

LGTM but curious what happens if you just pass in pulumi up --suppress-permalink

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated
@@ -65,7 +72,7 @@ CHANGELOG

- [automation/python] Fixed a bug in nested configuration parsing.
[#6349](https://github.com/pulumi/pulumi/pull/6349)

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

CHANGELOG.md Show resolved Hide resolved
…naged backends (S3, Azure, GCS)

Fixes: #4029
Fixes: #3537

Should the user want to get permalinks when using a self-managed backend, they can pass a flag:
```
$ pulumi up --suppress-permalink false
```

Permalinks for these self-managed backends will be suppressed on `update`, `preview`, `destroy`,
`import` and `refresh` operations.
cmdutil.Diag().Warningf(diag.Message("", "Could not get signed url for stack location: %v"), err)
cmdutil.Diag().Warningf(diag.Message("", "Unable to create signed url for current backend to "+
"create a Permalink. Please visit https://www.pulumi.com/docs/troubleshooting/ "+
"for more information\n"))
Copy link
Member

Choose a reason for hiding this comment

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

Is there going to be text at this link to help with this? What are the cases where this will happen, and what actually should the user do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are 2 places the docs will be updated

The troubleshooting section will have details as to why they get an open bucket url error - it's usually regarding using an Azure and GCp service principal to log into the self managed backends

I will also be updating the state and backends page to talk about the new defaults here of not showing a permalink

Both will be ready early Monday morning PST to make sure they are ready to go

@stack72 stack72 merged commit 1731053 into master Feb 19, 2021
@pulumi-bot pulumi-bot deleted the nonSaaS-suppress-permalink branch February 19, 2021 23:55
@fcavaco
Copy link

fcavaco commented Apr 6, 2021

when trying this in WLS2 , the syntax is slightly different from above if you actually want to add the argument:
--suppress-permalink=false , rather than --suppress-permalink false.

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.

skip signed url creation Pulumi up with Azure Storage SAS token returns SignedURL error
5 participants