azure-sdk-tools: [tsp-client] tsp-client fails in SDK automation running on azure-rest-api-specs-pr

The tsp-client used in that time is 0.5.0 (SDK automation would use latest – at the time it happens, latest is 0.5.0)

Error message

Error: Cloning into '/mnt/vss/_work/1/s/azure-sdk-for-java-pr/../sparse-spec'...
fatal: could not read Username for 'https://github.com'/: No such device or address

Details: https://github.com/Azure/azure-sdk-for-java/pull/38983#discussion_r1506942699

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 19 (19 by maintainers)

Most upvoted comments

Thanks Catalina. Tested 0.7.0 on local, it works as expected.

Would do a PR to put it to automation. https://github.com/Azure/azure-sdk-for-java/pull/39829

Added support for local specs with the init command via #8121. Triggering the release pipeline now, so the updated package verison should be available soon. EDIT: update is released please update to version 0.7.0 of the package to get the changes. @weidongxu-microsoft you should now be able to use tsp-client init with the cloned version of the specs repo in the pipeline. Here is an example command:

tsp-client init --tsp-config ..\..\..\azure-rest-api-specs\specification\cognitiveservices\ContentSafety\tspconfig.yaml --commit aaf40b00d0d15db7d3252beeeac634da9dc09099 --repo Azure/azure-rest-api-specs --local-spec-repo ..\..\..\azure-rest-api-specs\specification\cognitiveservices\ContentSafety\ 

If you run into any other issues feel free to ping me/open a new issue.

I (maybe dev from other languages as well) want the tool to do 2 things.

  1. create the “tsp-location.yaml” file at the correct place (that require parsing the “tspconfig.yaml”, and figure out the target folder in SDK repo for the module)
  2. basically run tsp-client update in that target folder, as now we had the “tsp-location.yaml”

I’d assume current tsp-client init do the above 2 things. But I think it would pull the remote repo in step 2 (if not specificly configured).

On step 2, I can see you have a --local-spec-repo that can point to a local spec repo, which I think Ray have in the SDK automation env. <-- one quick question on this, if --local-spec-repo is provided, does tsp-client ignore the commit and repo in “tsp-location.yaml” file?

And I’d assume step 1 does not need to pull anything remote (it only need the “tspconfig.yaml”)

That is the reason I am asking whether e.g. tsp init --local-spec-repo is supported, that it can do step 1 and step 2 without pulling the remote.

@raych1 Correct me if I am wrong somewhere.

tsp-client does create the tsp-location.yaml file with the init command

@catalinaperalta, could you take a look?

cc @lmazuel