run samples in live test pipelines#15694
Conversation
|
FYI: @benbp |
| AZURE_FORM_RECOGNIZER_SELECTION_MARK_STORAGE_CONTAINER_SAS_URL: $(python-formrecognizer-test-selection-mark-storage-sas-url) | ||
| AZURE_FORM_RECOGNIZER_TESTING_DATA_CONTAINER_SAS_URL: $(python-formrecognizer-test-storage-testing-data-sas-url) | ||
| AZURE_FORM_RECOGNIZER_AAD_ENDPOINT: $(python-formrecognizer-test-aad-endpoint) | ||
| # EnvVars for samples to run. Mostly re-used from above values |
There was a problem hiding this comment.
I think this is going in a direction that will make maintaining these very difficult. In other languages we are using arm templates for the samples to avoid the need for all these different static secrets.
I know that @seankane-msft is working to enable arm template support in the python repo and we should try to start using those for samples as well if at all possible.
There was a problem hiding this comment.
Oh nice, didn't know that we were moving towards the arm template way in Python. @seankane-msft - what's the status on that? Will that be blocking on this PR?
There was a problem hiding this comment.
Support for arm templates was added in tests.yml files. To add a deployment of arm templates you'll need a test-resources.json file and parameter DeployArmTemplate: true to your tests.yml file. The former you can probably take from the .NET/JS/Java sdks.
There was a problem hiding this comment.
Talked to Sean offline and opened an issue to move Form Recognizer to ARM templates in the near future: #15736. Confirmed that this doesn't block on this PR.
|
This is great! FYI the engsys team is trying to institute a more standardized way of running all samples as part of the smoke tests pipelines (rather than live tests). Only the js repo is currently using this new approach, though @hemanttanwar and I are working on bringing it to java as well. Seems like this PR does most of the language specific pieces, and I'd love to work towards standardizing the resource deployment and pipeline pieces alongside that for the smoke test pipeline. Once we get test-resources.json set up in the SDK directories, it shouldn't be too much work to pull it all together. |
I talked to Wes about this and my understanding was that running samples in the live pipeline served a different purpose than the smoke tests. My goal here was to alert the library owner that a particular sample is broken before we do a release. Will the smoke tests capture this and alert the owner as well? Also - let me know how I can help! |
|
@kristapratico ah I see. Makes sense, that is a different scenario. |
|
@kristapratico I really do like this. I don't particularly like the usage of Is there any value to providing a
Other than that feedback, looks great to me! |
|
Thanks for the feedback. I believe I made the intended changes to remove usage of Live run after latest commit: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=650411&view=logs&j=e4797745-1ad6-5989-d345-8ffe02e82111&t=89a0f654-1963-5cb5-5df3-6e3f7fc697ab |
Resolves #13876
Adding this as an opt-in parameter:
TestSamples: trueand using Form Recognizer to test it. Any library that wants to run their samples in the service live test pipeline should just need to add the environment variables used in the samples to their tests.yml for it to work.I've added this as an optional step after running tests, but not sure if that's the best spot. Let me know.
Form Recognizer run example that has the
Test Samplesstep: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=646223&view=logs&j=e4797745-1ad6-5989-d345-8ffe02e82111&t=89a0f654-1963-5cb5-5df3-6e3f7fc697ab