Azure / azure-openapi-validator

Azure Open API Validator
MIT License
47 stars 46 forks source link

bugfix: prevent staging pipeline from deploying to prod packages by appending ISO-like timestamp to the staging package beta version #662

Closed konrad-jamrozik closed 9 months ago

konrad-jamrozik commented 9 months ago

For context, see the comments inside the PR as well as:

konrad-jamrozik commented 9 months ago

As part of this work I disabled CI trigger for staging release pipeline, as now it would trigger always, on each PR merge, as it always assumes there are changes.

The release pipeline:

konrad-jamrozik commented 9 months ago

Here is the new code in action:

https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3520388&view=logs&j=5ce9a77a-472b-50c7-ed7b-9d61fc3e89c5&t=077050f0-8987-5f5e-55c0-05651efa4a21

Rush publish finished successfully. " Adding prerelease numbers to packages. changeCounts: [object Object] Setting version for @microsoft.azure/openapi-validator-core to '1.0.4-beta.2024-02-23-01-24-50' Setting version for @microsoft.azure/openapi-validator to '2.1.7-beta.2024-02-23-01-24-50' Setting version for @microsoft.azure/openapi-validator-rulesets to '1.3.6-beta.1' Setting version for openapi-validator-regression to '1.0.0-beta.2024-02-23-01-24-50'

And a release, which I manually scheduled (because I turned off CI trigger, as described above):

https://dev.azure.com/azure-sdk/internal/_releaseProgress?_a=release-pipeline-progress&releaseId=24440

2024-02-23T01:28:07.9208130Z publishing @microsoft.azure/openapi-validator@2.1.7-beta.2024-02-23-01-24-50 from /home/vsts/work/r1/a/_Staging version build for Azure.azure-openapi-validator/drop/packages/azure-openapi-validator/autorest/microsoft.azure-openapi-validator-2.1.7-beta.2024-02-23-01-24-50.tgz

2024-02-23T01:28:07.9209048Z running: npm publish "/home/vsts/work/r1/a/_Staging version build for Azure.azure-openapi-validator/drop/packages/azure-openapi-validator/autorest/microsoft.azure-openapi-validator-2.1.7-beta.2024-02-23-01-24-50.tgz" --access=public --tag beta

2024-02-23T01:28:07.9209583Z @microsoft.azure/openapi-validator@2.1.7-beta.2024-02-23-01-24-50 done.

2024-02-23T01:28:07.9210369Z publishing @microsoft.azure/openapi-validator-core@1.0.4-beta.2024-02-23-01-24-50 from /home/vsts/work/r1/a/_Staging version build for Azure.azure-openapi-validator/drop/packages/azure-openapi-validator/core/microsoft.azure-openapi-validator-core-1.0.4-beta.2024-02-23-01-24-50.tgz

2024-02-23T01:28:07.9211894Z running: npm publish "/home/vsts/work/r1/a/_Staging version build for Azure.azure-openapi-validator/drop/packages/azure-openapi-validator/core/microsoft.azure-openapi-validator-core-1.0.4-beta.2024-02-23-01-24-50.tgz" --access=public --tag beta

2024-02-23T01:28:07.9212424Z @microsoft.azure/openapi-validator-core@1.0.4-beta.2024-02-23-01-24-50 done.

2024-02-23T01:28:07.9213226Z publishing @microsoft.azure/openapi-validator-rulesets@1.3.6-beta.1 from /home/vsts/work/r1/a/_Staging version build for Azure.azure-openapi-validator/drop/packages/rulesets/microsoft.azure-openapi-validator-rulesets-1.3.6-beta.1.tgz

2024-02-23T01:28:07.9214117Z running: npm publish "/home/vsts/work/r1/a/_Staging version build for Azure.azure-openapi-validator/drop/packages/rulesets/microsoft.azure-openapi-validator-rulesets-1.3.6-beta.1.tgz" --access=public --tag beta

2024-02-23T01:28:07.9214666Z @microsoft.azure/openapi-validator-rulesets@1.3.6-beta.1 done.

and in npm:

https://www.npmjs.com/package/@microsoft.azure/openapi-validator?activeTab=versions https://www.npmjs.com/package/@microsoft.azure/openapi-validator-core?activeTab=versions https://www.npmjs.com/package/@microsoft.azure/openapi-validator-rulesets?activeTab=versions

image image image

Admittedly it is a bit wonky, but hopefully now at least we won't inadvertently publish pre-release bits to prod.

@mikeharder FYI