-
Notifications
You must be signed in to change notification settings - Fork 183
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
[tsp-client] tsp-client fails in SDK automation running on azure-rest-api-specs-pr #8012
Comments
@catalinaperalta, could you take a look? cc @lmazuel |
@catalinaperalta , please note that this issue blocks the |
@weshaggard what are your thoughts on the ideas I posted in this comment. Copying the same comment below for easy access:
|
Thoughts on which route would be best to use in our pipelines? PAT or configuring git credentials as suggested here ? @weshaggard have we already enabled the After we decide on the best method to enable git authentication in the pipeline, we can see if there are any updates required in tsp-client. |
We have not test presistCredentials yet but presumably it would work. If not we would need to use a gh PAT. @weidongxu-microsoft or @raych1 do you know how the current automation pulls files from the private repo? edit: @catalinaperalta I might be mistaken but I believe the current process works because the repo is already cloned locally in the automation. In which case does tsp-client support working against an already closed repo? edit: Actually looking again at the error it seems we are talking about the private java repo. So my question still stands @weidongxu-microsoft how do you currently clone that? |
Yes we support a
Example using an actual spec on my machine:
|
If the repo isnt cloned and we need to use a PAT then I would need to add that functionality in tsp-client FYI. |
@raych1 I'm also curious about another aspect which is the creation of the tsp-location file that https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/scripts/TypeSpec-Project-Process.ps1 does I'm not sure if that aspect will be done by tcp-client. Correct me if I'm wrong @catalinaperalta. |
tsp-client does create the tsp-location.yaml file with the |
Looking at the logs of a failing run at https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3520093&view=logs&j=a8a7a537-82b0-583c-7971-bac70b9822ca&s=eb9754a7-3885-5b5b-bd91-16c95dd7881e&t=37e3947b-3cfb-5d36-86ba-0e22bb7dbc33&l=25 the private java repo is already being cloned. So I guess the next question is @catalinaperalta is there an option to also pass in the path to the local clone of the language repo as well? |
We dont clone the SDK repos in tsp-client. We simply work within the repo that the tool is run from (in other words we're "unaware" of what repo we're running in as long as it has the right config which is having an eng/ directory with an emitter-package.json file). I thought we were failing on cloning the private specs repo? |
The error message might be a little mis-leading. Looks like it is trying to clone the specs repo into a relative path under the java-pr repo. However, from the logs it seems like the private specs repo is also cloned. So perhaps the missing piece here is that local cloned specs repo needs to be passed to tsp-client. @weidongxu-microsoft so this should be supported if you pass in that location to tsp-client. |
Does |
@weidongxu-microsoft can you give me some more information on what the goal of the automation script is? I'd like to understand what we want the pipeline to do, so we can get to the right tsp-client command. :) |
I (maybe dev from other languages as well) want the tool to do 2 things.
I'd assume current On step 2, I can see you have a 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. @raych1 Correct me if I am wrong somewhere. |
I tried
It works if I have network, but it give |
@catalinaperalta , the automation scripts are chained together to support the SDK generation, which is based on the specification in the spec pull request. The CI automation script clones both the spec repo and the SDK language repo to the local AzureDevOps agent. These repos then can be passed to |
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:
If you run into any other issues feel free to ping me/open a new issue. |
Thanks Catalina. Tested 0.7.0 on local, it works as expected. Would do a PR to put it to automation. Azure/azure-sdk-for-java#39829 |
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
Details: Azure/azure-sdk-for-java#38983 (comment)
The text was updated successfully, but these errors were encountered: