From de7d0e4fd4a2e414d879ad9dd54a1016cbdc7a1e Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Tue, 21 Apr 2026 16:20:59 -0400 Subject: [PATCH] ci: trigger azure-sdk-for-python regeneration after http-client-python publish Add a Python_Notify stage to the http-client-python publish pipeline that dispatches a typespec-python-regenerate event to Azure/azure-sdk-for-python after successful publish. Uses login-to-github.yml to mint a GitHub App token via Azure Key Vault. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...on-publish-dispatch-2026-04-21-17-01-13.md | 7 +++++++ .../eng/pipeline/publish.yml | 21 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 .chronus/changes/python-publish-dispatch-2026-04-21-17-01-13.md diff --git a/.chronus/changes/python-publish-dispatch-2026-04-21-17-01-13.md b/.chronus/changes/python-publish-dispatch-2026-04-21-17-01-13.md new file mode 100644 index 00000000000..f079896c3e8 --- /dev/null +++ b/.chronus/changes/python-publish-dispatch-2026-04-21-17-01-13.md @@ -0,0 +1,7 @@ +--- +changeKind: internal +packages: + - "@typespec/http-client-python" +--- + +Add repository_dispatch to publish pipeline to trigger azure-sdk-for-python regeneration diff --git a/packages/http-client-python/eng/pipeline/publish.yml b/packages/http-client-python/eng/pipeline/publish.yml index d134468d578..07148a696e2 100644 --- a/packages/http-client-python/eng/pipeline/publish.yml +++ b/packages/http-client-python/eng/pipeline/publish.yml @@ -32,3 +32,24 @@ extends: EnableCadlRanchReport: false PythonVersion: "3.11" UploadPlaygroundBundle: true + + - stage: Python_Notify + displayName: Python - Notify downstream + dependsOn: Python_Publish + condition: succeeded() + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + jobs: + - job: DispatchRegeneration + displayName: Trigger azure-sdk-for-python regeneration + steps: + - template: /eng/common/pipelines/templates/steps/login-to-github.yml + - script: | + curl -f -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $(GH_TOKEN)" \ + https://api.github.com/repos/Azure/azure-sdk-for-python/dispatches \ + -d '{"event_type":"typespec-python-regenerate","client_payload":{"sha":"$(Build.SourceVersion)"}}' + displayName: Dispatch typespec-python-regenerate