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

Support clones from Azure DevOps #12001

Merged
merged 3 commits into from Feb 4, 2023
Merged

Support clones from Azure DevOps #12001

merged 3 commits into from Feb 4, 2023

Conversation

squaremo
Copy link
Contributor

@squaremo squaremo commented Jan 26, 2023

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!

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Jan 26, 2023

Changelog

[uncommitted] (2023-02-02)

Bug Fixes

  • [auto] Adds support for cloning from Azure DevOps
    #12001

@squaremo
Copy link
Contributor Author

By the way, go mod tidy changes a loooot of things and makes me nervous. Is there something going on with that?

Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

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

We also have some workaround logic in the CLI for dealing with azure repos. It's a bit sad we're having to duplicate fixes like this, long term goal is to not have each auto library do logic like this but eh long term goals. Short term, I'd guess we could copy this logic to the CLI now instead of the shelling out to system git logic that we currently have?

@abhinav
Copy link
Contributor

abhinav commented Jan 27, 2023

By the way, go mod tidy changes a loooot of things and makes me nervous. Is there something going on with that?

Try running ./scripts/tidy.sh, not go mod tidy. scripts/tidy runs with -compat=1.18; the system go mod tidy is probably running with 1.19.

@RobbieMcKinstry
Copy link
Contributor

Looks like we need two actions to get this in:

  1. Run make lint and address the (potential) errors. I'm going off of the CI error message here.
  2. Add a changelog entry.

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.)

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
    ./scripts/tidy.sh

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
@RobbieMcKinstry
Copy link
Contributor

@squaremo did you make the changes to go.sum that you wanted to make? If so, one of us can merge with bors r+

@squaremo
Copy link
Contributor Author

squaremo commented Feb 3, 2023

did you make the changes to go.sum that you wanted to make?

Yes; this is the line that makes the intended change to go.mod:

https://github.com/pulumi/pulumi/pull/12001/files#diff-7b5028b779639efd98a7f47865b168ca39285e1c46d94140c5d38c516d00b127R43

Other changes to **/go.{mod,sum} are from running ./scripts/tidy.sh.

@RobbieMcKinstry
Copy link
Contributor

bors r+

bors bot added a commit that referenced this pull request Feb 4, 2023
9159: Add --insecure option to `pulumi login` r=justinvp a=Frassle

<!--- 
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. -->

Add --insecure option to `pulumi login` which disables https certificate checks.

Fixes #9120

## Checklist

<!--- 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.
-->
- [ ] I have updated the [CHANGELOG-PENDING](https://github.com/pulumi/pulumi/blob/master/CHANGELOG_PENDING.md) file with 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. -->


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: Fraser Waters <fraser@pulumi.com>
Co-authored-by: Michael Bridgen <mbridgen@pulumi.com>
Co-authored-by: Zaid Ajaj <zaid.naom@gmail.com>
@bors
Copy link
Contributor

bors bot commented Feb 4, 2023

Build failed (retrying...):

@bors
Copy link
Contributor

bors bot commented Feb 4, 2023

Build succeeded:

@bors bors bot merged commit 538fb35 into master Feb 4, 2023
@bors bors bot deleted the update-go-git-azdevops branch February 4, 2023 05:19
squaremo added a commit to pulumi/pulumi-kubernetes-operator that referenced this pull request Feb 14, 2023
3.54.0 contains the fix for cloning Azure DevOps repos:

    pulumi/pulumi#12001

The base image change is not strictly needed, but keeping it current
with the SDK version seems like a good idea. (The automated bumps don't
do this).

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
squaremo added a commit to pulumi/pulumi-kubernetes-operator that referenced this pull request Feb 15, 2023
3.55.0 contains the fix for cloning Azure DevOps repos:

    pulumi/pulumi#12001

The base image change is not strictly needed, but keeping it current
with the SDK version seems like a good idea. (The automated bumps don't
do this).

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
squaremo added a commit to pulumi/pulumi-kubernetes-operator that referenced this pull request Feb 15, 2023
* Bump Pulumi SDK version and base image to 3.55.0

3.55.0 contains the fix for cloning Azure DevOps repos:

    pulumi/pulumi#12001

The base image change is not strictly needed, but keeping it current
with the SDK version seems like a good idea. (The automated bumps don't
do this). NB the _least_ recent release that contains the fix is 3.54.0, but
there is no Docker image for it.

* Add changelog entry for version bump

---------

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
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.

None yet

5 participants