urlAuthParser.Parse caches auth methods. To avoid caching the auth
method when running into an error, we first checked that the auth method
is not nil. However we ran into a classic Go issue where a nil value of
a concrete type is assigned to a variable of an interface type, making
it not equal to nil.
https://go.dev/doc/faq#nil_errorhttps://go.dev/play/p/AOSdCWd3XC1
Fixes https://github.com/pulumi/pulumi/issues/16637
---------
Co-authored-by: Thomas Gummerer <t.gummerer@gmail.com>
Change how the deployment settings configures git repos to support
directories that are not git repositories
Fix https://github.com/pulumi/pulumi-service/issues/20675
---------
Co-authored-by: Levi Blackstone <levi@pulumi.com>
This adds support for SSH-style Git URLs, enabling folks to use
private repos for their templates.
For instance,
$ pulumi new git@github.com:acmecorp/templates/website
will now work as intended.
The `ssh_config` library handles finding the relevant SSH key for the
given host.
If the SSH key is protected by a password, the user will be prompted to
supply the password on-demand. (It is memoized to avoid asking multiple
times, as the template workflow requires using it more than once.) To
avoid prompting, the `PULUMI_GITSSH_PASSPHRASE` env var can be set.
Fixes#4872 and #5007.
These changes add the path to the current project relative to the root
of the VCS repository to update metadata. If VCS info is not available,
this metadata is not added.
Part of https://github.com/pulumi/home/issues/2946.
* about error string: error string should not be capitalized or end with punctuation mark
* apply suggestions from code review
* lint: fix format error and simplify the code
Co-authored-by: Fraser Waters <frassle@gmail.com>
Co-authored-by: Aaron Friel <mayreply@aaronfriel.com>
Small path bug, "git clone" by default clones to a new folder based on
the last part of the repo name. So running something like `pulumi new
https://fraser0275@dev.azure.com/fraser0275/fraser/_git/fraser` resulted
in us making a folder like /tmp/pulumi-templates-1234/fraser with all
the templates in it. That last part of the path was unexpected, because
when we use gogit it clones directly into the target directory we give
it.
Simple fix to just add `.` to the git clone command. I also added some
logging while I was about here, given it helped me work out this issue.
* Allow specifying a branch with url#branch
* Probe for master and main
* Update CHANGELOG
* Fix linter errors
* Remove unnecessary feature
* Fix lint
* Update changelog to reflect new limited scope.
We only talk about the master -> main probing, because that is all the
PR does. It used to duplicate another feature.
Fix `cloudSourceControlSSHRegex` so that it will match git remotes with periods or hyphens in the hostname. However, `azureSourceControlSSHRegex` _does_ match hostnames with a period. As a result, `TryGetVCSInfo` will treat these sorts of remotes as Azure source control remotes and drop the first group. This causes updates to have an incorrect `"vcs.kind"` field. For example, an update with a Git remote of `github.foo.acme.com` will have a `"vcs.kind"` field of `foo.acme.com`. This occurs if a user is using a self-hosted GH enterprise instance.
* Make `async:true` the default for `invoke` calls (#3750)
* Switch away from native grpc impl. (#3728)
* Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752)
* Only retry as long as we get unavailable back. Anything else continues. (#3769)
* Handle all errors for now. (#3781)
* Do not assume --yes was present when using pulumi in non-interactive mode (#3793)
* Upgrade all paths for sdk and pkg to v2
* Backport C# invoke classes and other recent gen changes (#4288)
Adjust C# generation
* Replace IDeployment with a sealed class (#4318)
Replace IDeployment with a sealed class
* .NET: default to args subtype rather than Args.Empty (#4320)
* Adding system namespace for Dotnet code gen
This is required for using Obsolute attributes for deprecations
```
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
```
* Fix the nullability of config type properties in C# codegen (#4379)