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

[Metricsadvisor] Migrate recordings to asset repo #35179

Merged
merged 2 commits into from
May 31, 2023

Conversation

samvaity
Copy link
Member

This PR migrates the test recordings using test proxy for metricsadvisor SDK to the assets repo.

Migrate recordings from language repositories to assets repo

Prerequisites:

  • The script generate-assets-json.ps1 will execute the initial migration of your recordings from within a language repo to the assets repo as well as creating the assets.json file for those assets.

  • Test-proxy needs to be on the machine and in the path. Instructions for that are here.

Running the script:

The script needs to be executed inside an sdk/ or deeper and from within an up-to-date language repository. A good rule here would be look at where the ci.yml is for a service directory. In the case where each library for a given service directory has its own pipelines, at the sdk// level, it is recommended that the assets.json is created there. If the ci.yml exists deeper than the sdk// level, then it is recommended to run the script from that directory.

C:/repo/sdk-for-java/sdk/formrecognizer/azure-ai-formrecognizer> ..\..\..\eng\common\testproxy\transition-scripts\generate-assets-json.ps1 -InitialPush

Examples of current assets.json locations:

After running a script, executing a git status from within the language repo, where the script was invoked from, will reflect two primary results:

  • A new assets.json will be present in the directory from which they invoked the transition script.
  • A bunch of deleted files from where their recordings were before they were pushed to the assets repo.

Running the script without the -InitialPush option will just create the assets.json with an empty tag. No data movement.

Using test proxy going forward:

https://github.com/Azure/azure-sdk-for-java/wiki/Test-Proxy-Migration#3-using-test-proxy-going-forward

C:\repo\azure-sdk-for-java.assets\tag-ref\java\sdk\storage\azure-storage-queue\src\test\resources\session-records\QueueServiceAsyncApiTests.listQueues[3].json
locally is where you should find your local copy of recordings.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@samvaity samvaity self-assigned this May 26, 2023
@samvaity samvaity marked this pull request as ready for review May 26, 2023 17:56
@samvaity samvaity merged commit d8e462b into Azure:main May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants