Repository navigation
fix: extend multi git server support to Azure devOps - #8063
Conversation
jedevc
left a comment
There was a problem hiding this comment.
LGTM, a couple tiny nits 🎉
Good catch!
| var expectedURL string | ||
| if tc.expectedHost == "dev.azure.com" { | ||
| expectedURL = fmt.Sprintf("https://%s/%s/%s", tc.expectedBaseHTMLURL, tc.expectedURLPathComponent, tc.gitTestRepoCommit) | ||
| } else { | ||
| expectedURL = fmt.Sprintf("https://%s/%s/%s", tc.expectedBaseHTMLURL, tc.expectedURLPathComponent, tc.gitTestRepoCommit) | ||
| } | ||
| require.Equal(t, expectedURL, htmlURL) |
There was a problem hiding this comment.
These are the same in both branches?
Instead of hardcoding dev.azure.com here, we could potentially have a expectedPathPrefix property or something in the test case, and the have that set to ?path= for azure (and left empty for the others)?
| // HTTPS ref | ||
| { | ||
| prefix: "dev.azure.com/", | ||
| re: `^(?P<root>dev\.azure\.com/(?P<account>[A-Za-z0-9_.\-]+)(/(?P<project>[A-Za-z0-9_.\-]+))?/_git/(?P<repo>[A-Za-z0-9_.\-]+)(\.git)?)(/[\p{L}0-9_.\-]+)*(/.*)?$`, |
There was a problem hiding this comment.
I shall trust you on this 😆
| body: | | ||
| feat: extend multi git server support to Azure devOps | ||
|
|
||
| Our support for Azure refs is broken on monorepos, as Azure returns a 500 when we query a ref containing a subpath with `go-get=1`. Instead, we rely on regexes to infer the root of the repo and the subpath from the ref |
There was a problem hiding this comment.
| Our support for Azure refs is broken on monorepos, as Azure returns a 500 when we query a ref containing a subpath with `go-get=1`. Instead, we rely on regexes to infer the root of the repo and the subpath from the ref | |
| Our support for Azure refs was broken on monorepos, as Azure returns a 500 when we query a ref containing a subpath with `go-get=1`. Instead, we rely on regexes to infer the root of the repo and the subpath from the ref |
I don't know if we need the detail about 500s, we can just say we special-case azure dev-ops since it doesn't work with the go standard convention of discovering the root of a git repository.
There was a problem hiding this comment.
Changed, you're right, it is better 🙏
6ce32dd to
444128a
Compare
When working on private SSH support, I realized that our support for Azure refs is broken on monorepos. Why ? Azure's handling of `go-get=1` is not foolproof: 1. repoRootForImportPath does work well on refs leading to a repo, infering properly the vcs provider used 2. But, go-get=1 returns a 500 when a subpath is included 3. Azure ref's style is explicit with the vcs being used: git is mentioned for a git based repo If we are ok with this explicitness, we should not try to infer the vcs based on the go-get for Azure and rely on regexes Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Guillaume de Rouville <[email protected]>
|
Failures are unrelated 🙏 |
|
Awesome awesome, let's get this for the release today 🎉 |
[](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [dagger/dagger](https://togithub.com/dagger/dagger) | patch | `v0.12.3` -> `v0.12.4` | --- ### Release Notes <details> <summary>dagger/dagger (dagger/dagger)</summary> ### [`v0.12.4`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0124---2024-08-01) [Compare Source](https://togithub.com/dagger/dagger/compare/v0.12.3...v0.12.4) ##### Changed - Deprecate old `pipeline` APIs by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8064](https://togithub.com/dagger/dagger/pull/8064) \ These operations have been no-ops since v0.11.0, and will be removed in v0.13.0. ##### Fixed - Fix errors when using Dockerfile builds from module functions that have secrets by [@​sipsma](https://togithub.com/sipsma) in [https://github.com/dagger/dagger/pull/8049](https://togithub.com/dagger/dagger/pull/8049) - Fix dagger `terminal` prompt with debian-based images by [@​vmaffet](https://togithub.com/vmaffet) in [https://github.com/dagger/dagger/pull/7960](https://togithub.com/dagger/dagger/pull/7960) - Fix occasional leaks in secret scrubbing algorithm by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8047](https://togithub.com/dagger/dagger/pull/8047) - Fix frequent context switches in `--progress=plain` output by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/7956](https://togithub.com/dagger/dagger/pull/7956) - Extend multi git server support to Azure devOps by [@​grouville](https://togithub.com/grouville) in [https://github.com/dagger/dagger/pull/8063](https://togithub.com/dagger/dagger/pull/8063) \ Our support for Azure refs was broken on monorepos. We special-case Azure DevOps since it doesn't work with the go standard convention of discovering the root of a git repository ##### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/scottames/daggerverse). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [dagger/dagger](https://togithub.com/dagger/dagger) | patch | `v0.12.3` -> `v0.12.4` | --- ### Release Notes <details> <summary>dagger/dagger (dagger/dagger)</summary> ### [`v0.12.4`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0124---2024-08-01) [Compare Source](https://togithub.com/dagger/dagger/compare/v0.12.3...v0.12.4) ##### Changed - Deprecate old `pipeline` APIs by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8064](https://togithub.com/dagger/dagger/pull/8064) \ These operations have been no-ops since v0.11.0, and will be removed in v0.13.0. ##### Fixed - Fix errors when using Dockerfile builds from module functions that have secrets by [@​sipsma](https://togithub.com/sipsma) in [https://github.com/dagger/dagger/pull/8049](https://togithub.com/dagger/dagger/pull/8049) - Fix dagger `terminal` prompt with debian-based images by [@​vmaffet](https://togithub.com/vmaffet) in [https://github.com/dagger/dagger/pull/7960](https://togithub.com/dagger/dagger/pull/7960) - Fix occasional leaks in secret scrubbing algorithm by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8047](https://togithub.com/dagger/dagger/pull/8047) - Fix frequent context switches in `--progress=plain` output by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/7956](https://togithub.com/dagger/dagger/pull/7956) - Extend multi git server support to Azure devOps by [@​grouville](https://togithub.com/grouville) in [https://github.com/dagger/dagger/pull/8063](https://togithub.com/dagger/dagger/pull/8063) \ Our support for Azure refs was broken on monorepos. We special-case Azure DevOps since it doesn't work with the go standard convention of discovering the root of a git repository ##### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/scottames/containers). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [dagger/dagger](https://togithub.com/dagger/dagger) | patch | `v0.12.3` -> `v0.12.4` | --- ### Release Notes <details> <summary>dagger/dagger (dagger/dagger)</summary> ### [`v0.12.4`](https://togithub.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0124---2024-08-01) [Compare Source](https://togithub.com/dagger/dagger/compare/v0.12.3...v0.12.4) ##### Changed - Deprecate old `pipeline` APIs by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8064](https://togithub.com/dagger/dagger/pull/8064) \ These operations have been no-ops since v0.11.0, and will be removed in v0.13.0. ##### Fixed - Fix errors when using Dockerfile builds from module functions that have secrets by [@​sipsma](https://togithub.com/sipsma) in [https://github.com/dagger/dagger/pull/8049](https://togithub.com/dagger/dagger/pull/8049) - Fix dagger `terminal` prompt with debian-based images by [@​vmaffet](https://togithub.com/vmaffet) in [https://github.com/dagger/dagger/pull/7960](https://togithub.com/dagger/dagger/pull/7960) - Fix occasional leaks in secret scrubbing algorithm by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/8047](https://togithub.com/dagger/dagger/pull/8047) - Fix frequent context switches in `--progress=plain` output by [@​jedevc](https://togithub.com/jedevc) in [https://github.com/dagger/dagger/pull/7956](https://togithub.com/dagger/dagger/pull/7956) - Extend multi git server support to Azure devOps by [@​grouville](https://togithub.com/grouville) in [https://github.com/dagger/dagger/pull/8063](https://togithub.com/dagger/dagger/pull/8063) \ Our support for Azure refs was broken on monorepos. We special-case Azure DevOps since it doesn't work with the go standard convention of discovering the root of a git repository ##### What to do next? - Read the [documentation](https://docs.dagger.io) - Join our [Discord server](https://discord.gg/dagger-io) - Follow us on [Twitter](https://twitter.com/dagger_io) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/scottames/dots). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguMjAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
When working on private SSH support, I realized that our support for Azure refs is broken on monorepos.
Why ?
Azure's handling of
go-get=1is not foolproof:repoRootForImportPathdoes work well on refs leading to a repo, infering properly the vcs provider usedgo-get=1returns a 500 when a subpath is includedIf we are ok with this explicitness, we should not try to infer the vcs based on the go-get for Azure and rely on regexes