Skip to content

Commit

Permalink
Merge #12001 #12025
Browse files Browse the repository at this point in the history
12001: Support clones from Azure DevOps r=RobbieMcKinstry a=squaremo

In general, go-git can't clone from Azure DevOps, because the latter requires the capabilities multi_ack and multi_ack_detailed, which aren't implemented. However, there's now a workaround, which boils down to this: pretend, for the initial clone, that those capabilities _are_ supported, and expect them not to be used.

(See go-git/go-git#613 for more on this workaround.)

I tried this with a personal Azure DevOps account; an automated test would need either a reliably long-lived Azure DevOps repo, or a test server that can mimic Azure DevOps' particular capabilities. I'm open to suggestions!

12025: [sdks/go] Delegate alias computation to the engine r=abhinav a=Zaid-Ajaj

Fixes #11066
Addresses #11697 

Credit to `@abhinav` for making aliases unit-testable by intercepting `RegisterResource` calls. 

> I did change the test slightly so that it either checks for `AliasURNs: []string` or `Aliases: []*pulumirpc.Alias` because I've made it such that one of them is `nil` depending on `supportsAliasSpecs`

## Checklist

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [x] 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 Service,
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 Service API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


Co-authored-by: Michael Bridgen <mbridgen@pulumi.com>
Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
  • Loading branch information
3 people committed Feb 4, 2023
3 parents ef2fc9b + 7843de3 + bd17206 commit 538fb35
Show file tree
Hide file tree
Showing 14 changed files with 687 additions and 234 deletions.
@@ -0,0 +1,4 @@
changes:
- type: chore
scope: sdk/go
description: Delegate alias computation to the engine
@@ -0,0 +1,4 @@
changes:
- type: fix
scope: auto
description: Adds support for cloning from Azure DevOps
25 changes: 14 additions & 11 deletions pkg/go.mod
Expand Up @@ -48,8 +48,8 @@ require (
github.com/zclconf/go-cty v1.12.1
gocloud.dev v0.27.0
gocloud.dev/secrets/hashivault v0.27.0
golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 // indirect
golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/net v0.2.0
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
google.golang.org/api v0.91.0
Expand All @@ -68,7 +68,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/kms v1.18.1
github.com/aws/aws-sdk-go-v2/service/sts v1.16.10
github.com/edsrzf/mmap-go v1.1.0
github.com/go-git/go-git/v5 v5.4.2
github.com/go-git/go-git/v5 v5.5.1
github.com/hexops/gotextdiff v1.0.3
github.com/json-iterator/go v1.1.12
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
Expand All @@ -81,7 +81,7 @@ require (
github.com/segmentio/encoding v0.3.5
github.com/shirou/gopsutil/v3 v3.22.3
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
golang.org/x/term v0.2.0
google.golang.org/protobuf v1.28.1
)

Expand Down Expand Up @@ -112,7 +112,7 @@ require (
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/agext/levenshtein v1.2.3 // indirect
Expand All @@ -139,10 +139,11 @@ require (
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/cenkalti/backoff/v3 v3.2.2 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/cloudflare/circl v1.1.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/creack/pty v1.1.17 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
Expand All @@ -153,7 +154,7 @@ require (
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/wire v0.5.0 // indirect
Expand Down Expand Up @@ -184,11 +185,11 @@ require (
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kevinburke/ssh_config v1.1.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
Expand All @@ -209,6 +210,7 @@ require (
github.com/oklog/run v1.1.0 // indirect
github.com/opentracing/basictracer-go v1.1.0 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pjbgf/sha1cd v0.2.3 // indirect
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/term v1.1.0 // indirect
Expand All @@ -222,6 +224,7 @@ require (
github.com/segmentio/asm v1.1.3 // indirect
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
github.com/skeema/knownhosts v1.1.0 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/texttheater/golang-levenshtein v1.0.1 // indirect
Expand All @@ -230,13 +233,13 @@ require (
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/ulikunitz/xz v0.5.8 // indirect
github.com/xanzy/ssh-agent v0.3.2 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
golang.org/x/sys v0.0.0-20220823224334-20c2bfdbfe24 // indirect
golang.org/x/sys v0.2.0 // indirect
golang.org/x/text v0.4.0 // indirect
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
Expand Down

0 comments on commit 538fb35

Please sign in to comment.