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

Fix cloning from ADO repos #10954

Merged
merged 1 commit into from Oct 7, 2022
Merged

Fix cloning from ADO repos #10954

merged 1 commit into from Oct 7, 2022

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Oct 6, 2022

Description

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.

Fixes #10886

Checklist

  • I have added tests that prove my fix is effective or that my feature works. No but I did manually check I could download templates from azure devops.
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

@Frassle Frassle requested review from dixler and iwahbe and removed request for dixler October 6, 2022 21:44
@pulumi-bot
Copy link
Contributor

pulumi-bot commented Oct 6, 2022

Changelog

[uncommitted] (2022-10-07)

Bug Fixes

  • [cli/new] Fix cloning templates from Azure DevOps repos.
    #10954

@dixler
Copy link
Contributor

dixler commented Oct 7, 2022

It says the lint is broken. Plz fix before merging.

@Frassle
Copy link
Member Author

Frassle commented Oct 7, 2022

It says the lint is broken. Plz fix before merging.

Don't worry, bors won't let us merge if things like that are failing now.

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.
@Frassle
Copy link
Member Author

Frassle commented Oct 7, 2022

bors merge

bors bot added a commit that referenced this pull request Oct 7, 2022
10954: Fix cloning from ADO repos r=Frassle 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. -->

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.

Fixes #10886

## 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. **No but I did manually check I could download templates from azure devops.**
<!--- 
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>
@bors
Copy link
Contributor

bors bot commented Oct 7, 2022

Build failed:

@Frassle
Copy link
Member Author

Frassle commented Oct 7, 2022

bors retry

bors bot added a commit that referenced this pull request Oct 7, 2022
10954: Fix cloning from ADO repos r=Frassle 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. -->

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.

Fixes #10886

## 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. **No but I did manually check I could download templates from azure devops.**
<!--- 
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>
@bors
Copy link
Contributor

bors bot commented Oct 7, 2022

Timed out.

@Frassle
Copy link
Member Author

Frassle commented Oct 7, 2022

bors retry

@bors
Copy link
Contributor

bors bot commented Oct 7, 2022

Build succeeded:

@bors bors bot merged commit 92c5a37 into master Oct 7, 2022
@bors bors bot deleted the fraser/fixADO branch October 7, 2022 11:00
iwahbe pushed a commit that referenced this pull request Oct 10, 2022
10949: Add winget and msi install checks in download cron job r=Zaid-Ajaj a=Zaid-Ajaj

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

Fixes #10667

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

10954: Fix cloning from ADO repos r=Frassle 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. -->

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.

Fixes #10886

## 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. **No but I did manually check I could download templates from azure devops.**
<!---
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: Zaid Ajaj <zaid.naom@gmail.com>
Co-authored-by: Fraser Waters <fraser@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.

Azure Devops support for multiple project templates under one directory
4 participants