Azure / Azure/azure-sdk-tools

[Assets-Sync] Bump minimum version of Git

Open
#4,719 4 comments 2 reactions 0 assignees View on GitHub
Asset-Sync
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

The current [documentation](https://github.com/Azure/azure-sdk-tools/tree/main/tools/test-proxy/scripts/transition-scripts#setup) suggests using `git >2.25.0`. However, with `git 2.25.1` on WSL2 (Ubuntu 20.04), while running the `generate-assets-json.ps1` script, I kept hitting the following error:

```
test-proxy restore --assets-json-path sdk/monitor/azure-monitor-query/assets.json
Unhandled exception. Azure.Sdk.Tools.TestProxy.Common.Exceptions.HttpException: Invocation of "git sparse-checkout set --no-cone python/sdk/monitor/azure-monitor-query" had a non-zero exit code -1.
StdOut:
StdErr: error: Sparse checkout leaves no entry on working directory

at Azure.Sdk.Tools.TestProxy.Store.GitStore.CheckoutRepoAtConfig(GitAssetsConfiguration config) in /mnt/vss/_work/1/s/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Store/GitStore.cs:line 302
at Azure.Sdk.Tools.TestProxy.Store.GitStore.Restore(String pathToAssetsJson) in /mnt/vss/_work/1/s/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Store/GitStore.cs:line 141
at Azure.Sdk.Tools.TestProxy.Startup.Run(Object commandObj) in /mnt/vss/_work/1/s/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Startup.cs:line 154
at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult`1 result, Func`2 action)
at Azure.Sdk.Tools.TestProxy.Startup.Main(String[] args) in /mnt/vss/_work/1/s/tools/test-proxy/Azure.Sdk.Tools.TestProxy/Startup.cs:line 67
at Azure.Sdk.Tools.TestProxy.Startup.(String[] args)
```

Updating my git to the latest (`2.38.1`) allowed me to successfully pass this part. Not sure if this is due to peculiarities in my environment or broken behavior in older versions of git. In any case, somewhere between 2.25.1 and the latest version of git, something was changed to fix my issue. It's probably worth investigating increasing the minimum suggested version so others don't hit this issue.

Contributor guide

Open the contributing guide

Research direction

Review the setup documentation linked in the issue and the generate-assets-json.ps1 workflow described there. Investigate which Git version resolves the sparse-checkout error on Git 2.25.1, then update the documented minimum version; the work is done when the setup guidance reflects the verified requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.