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

eng, sdk automation, migrate to tsp-client 0.7.0+ #39829

Merged
merged 6 commits into from
Apr 23, 2024

Conversation

weidongxu-microsoft
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft commented Apr 22, 2024

fix Azure/azure-sdk-tools#8050

(this PR is almost a revert on #38983)

tsp-client should now work in private repo (with --local-spec-repo option).

Sample command line

npx tsp-client init --debug --tsp-config /mnt/vss/_work/1/s/azure-rest-api-specs-pr/specification/cognitiveservices/ContentSafety --commit 2b529a6ffebe0e4438b56bb1089b1c71ddf50fd5 --repo Azure/azure-rest-api-specs-pr --local-spec-repo /mnt/vss/_work/1/s/azure-rest-api-specs-pr/specification/cognitiveservices/ContentSafety

Verification PR in test env https://github.com/test-repo-billy/azure-rest-api-specs/pull/3297/checks?check_run_id=24088451534

Plan is to merge this PR. Then initialize a test on pr repo. If that works, I would notify other languages that tsp-client migration be feasible.

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Comment on lines +4 to +6
sudo apt-get install -y --upgrade python3-pip python3-setuptools 2>&1
pip3 install --upgrade wheel 2>&1
pip3 install --upgrade PyYAML requests 2>&1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2>&1 is not related to tsp-client
It is an improvement to SDK automation output, to avoid irrelevant info get printed to error message.

'--tsp-config', tsp_dir,
'--commit', head_sha,
'--repo', repo,
'--local-spec-repo', tsp_dir]
Copy link
Member Author

@weidongxu-microsoft weidongxu-microsoft Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--local-spec-repo is the new feature of tsp-client 0.7.0 on init action

@weidongxu-microsoft
Copy link
Member Author

/check-enforcer override

@weidongxu-microsoft weidongxu-microsoft merged commit 308ba72 into Azure:main Apr 23, 2024
20 checks passed
@weidongxu-microsoft
Copy link
Member Author

Verified that it works in pr repo
https://github.com/Azure/azure-rest-api-specs-pr/pull/18009/checks?check_run_id=24141262697

@weshaggard
Copy link
Member

FYI @catalinaperalta

@catalinaperalta
Copy link
Member

Yay! Happy is worked! 🥳

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.

[SDK Automation - Java] Adopt tsp-client in automation script
3 participants