pulumi/sdk/go/common/workspace
Kyle Pitzen 7cfecc64de
Simplifies URL parsing for pulumi new <zip> (#14546)
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

Currently, we add a bit of "cleverness" to our URL parsing, by removing
`.zip` suffixes when we've determined one exists (and started down the
path of pulumi new-ing a zip ref). That requires upstream API providers
to host their zipfiles at a location _without_ that suffix, which
precludes any existing .zip files hosted at places like github etc which
may have that extension.

This PR removes that logic so we serve as a simple passthrough for
whichever URL we're passed (extending the existing contract). It also
depends on https://github.com/pulumi/pulumi.ai/pull/414 being merged and
deployed.

Fixes https://github.com/pulumi/pulumi.ai/issues/415

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [ ] I have run `make lint` to verify my code passes the lint check
  - [ ] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [ ] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2023-11-13 17:08:52 +00:00
..
config.go [cli] Add support for environments (#14140) 2023-10-10 01:35:39 +00:00
creds.go Fix panic in whoami (#14108) 2023-10-06 16:56:36 +00:00
creds_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
loaders.go Remove the global caches for project files 2023-03-07 12:44:24 +00:00
loaders_test.go ignore unexpected types instead of erroring out (#14149) 2023-10-11 16:39:16 +00:00
paths.go Translate permission errors into ProjectNotFound when searching 2023-06-20 15:15:40 +01:00
paths_test.go Translate permission errors into ProjectNotFound when searching 2023-06-20 15:15:40 +01:00
plugins.go Support {NAME} in plugin download url (#14435) 2023-10-30 09:29:12 +00:00
plugins_install_nodejs_test.go ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
plugins_install_python_test.go ci: Use reduced smoke testing on Windows & macOS targets 2022-09-21 09:55:06 -07:00
plugins_install_test.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00
plugins_test.go Support {NAME} in plugin download url (#14435) 2023-10-30 09:29:12 +00:00
project.go [environments] Add integration tests (#14144) 2023-10-12 16:39:26 +00:00
project.json fix #11864: pulumi panics when Pulumi.yaml has a provider with an empty/unspecified `path` key 2023-01-18 10:33:39 -08:00
project_test.go [cli] Add support for environments (#14140) 2023-10-10 01:35:39 +00:00
settings.go move pkg/workspace -> sdk/go/common/workspace 2020-03-18 14:35:53 -07:00
templates.go Adds remote .zip archive support to `pulumi new` (#14443) 2023-10-31 22:05:39 +00:00
templates_test.go Use `assert.NoError` rather than `assert.Nil` (#14233) 2023-10-13 09:46:07 +00:00
templates_zip.go Simplifies URL parsing for pulumi new <zip> (#14546) 2023-11-13 17:08:52 +00:00
templates_zip_test.go Fix panic in isZIPTemplateURL (#14504) 2023-11-06 15:26:47 +00:00
workspace.go all: Reformat with gofumpt 2023-03-03 09:00:24 -08:00