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..374e599a531 --- /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`, 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 529270f1d1d..5e6b2b9ed88 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)}`)); @@ -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`);