From a66b88f00c842a7ecec109c573656909f473b489 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 02:37:34 +0000 Subject: [PATCH 1/2] Update regen baseline source to new branch/path in azure-sdk-for-python Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/8f1522ce-8acf-469e-b9b3-34db3ccff30b Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> --- .chronus/changes/fix-regen-baseline-path-2026-5-20.md | 7 +++++++ .../http-client-python/eng/scripts/ci/regenerate-common.ts | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .chronus/changes/fix-regen-baseline-path-2026-5-20.md diff --git a/.chronus/changes/fix-regen-baseline-path-2026-5-20.md b/.chronus/changes/fix-regen-baseline-path-2026-5-20.md new file mode 100644 index 00000000000..798e05316ff --- /dev/null +++ b/.chronus/changes/fix-regen-baseline-path-2026-5-20.md @@ -0,0 +1,7 @@ +--- +changeKind: internal +packages: + - "@typespec/http-client-python" +--- + +Update the baseline source for regeneration to use the `typespec-python-generated-tests` branch and `eng/tools/azure-sdk-tools/emitter/generated` path in `azure-sdk-for-python`. diff --git a/packages/http-client-python/eng/scripts/ci/regenerate-common.ts b/packages/http-client-python/eng/scripts/ci/regenerate-common.ts index 529270f1d1d..4b73b94024d 100644 --- a/packages/http-client-python/eng/scripts/ci/regenerate-common.ts +++ b/packages/http-client-python/eng/scripts/ci/regenerate-common.ts @@ -677,7 +677,7 @@ export async function preprocess(flavor: string, generatedFolder: string): Promi /** * Resets the `tests/generated/{azure,unbranded}` baseline by sparse-checking-out - * `eng/tools/emitter/gen` from the Azure/azure-sdk-for-python repo, then + * `eng/tools/azure-sdk-tools/emitter/generated` from the Azure/azure-sdk-for-python repo, then * deleting a couple of fully-generated package folders so regeneration has to * recreate them from scratch (smoke test of full-emit path). * @@ -686,8 +686,8 @@ export async function preprocess(flavor: string, generatedFolder: string): Promi */ export async function prepareBaselineOfGeneratedCode(generatedFolder: string): Promise { const repoUrl = "https://github.com/Azure/azure-sdk-for-python.git"; - const branch = "main"; - const sourceSubdir = "eng/tools/emitter/gen"; + const branch = "typespec-python-generated-tests"; + const sourceSubdir = "eng/tools/azure-sdk-tools/emitter/generated"; const testsGeneratedDir = resolve(generatedFolder, "../tests/generated"); console.log(pc.cyan(`\n${"=".repeat(60)}`)); From 678ab5f760f3d53bd449779d4ca48d9a43cb0d33 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Wed, 20 May 2026 11:39:20 +0800 Subject: [PATCH 2/2] Enable core.longpaths on baseline clone to fix Windows MAX_PATH error Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .chronus/changes/fix-regen-baseline-path-2026-5-20.md | 2 +- packages/http-client-python/eng/scripts/ci/regenerate-common.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.chronus/changes/fix-regen-baseline-path-2026-5-20.md b/.chronus/changes/fix-regen-baseline-path-2026-5-20.md index 798e05316ff..374e599a531 100644 --- a/.chronus/changes/fix-regen-baseline-path-2026-5-20.md +++ b/.chronus/changes/fix-regen-baseline-path-2026-5-20.md @@ -4,4 +4,4 @@ packages: - "@typespec/http-client-python" --- -Update the baseline source for regeneration to use the `typespec-python-generated-tests` branch and `eng/tools/azure-sdk-tools/emitter/generated` path in `azure-sdk-for-python`. +Update the baseline source for regeneration to use the `typespec-python-generated-tests` branch and `eng/tools/azure-sdk-tools/emitter/generated` path in `azure-sdk-for-python`, and enable `core.longpaths` on the temporary baseline clone to avoid Windows `MAX_PATH` errors during checkout. diff --git a/packages/http-client-python/eng/scripts/ci/regenerate-common.ts b/packages/http-client-python/eng/scripts/ci/regenerate-common.ts index 4b73b94024d..5e6b2b9ed88 100644 --- a/packages/http-client-python/eng/scripts/ci/regenerate-common.ts +++ b/packages/http-client-python/eng/scripts/ci/regenerate-common.ts @@ -708,6 +708,7 @@ export async function prepareBaselineOfGeneratedCode(generatedFolder: string): P execSync(cmd, { cwd: tempDir, stdio: ["ignore", "ignore", "inherit"] }); run(`git init`); + run(`git config core.longpaths true`); run(`git remote add origin ${repoUrl}`); run(`git config core.sparseCheckout true`); run(`git sparse-checkout init --cone`);