Skip to content

Commit 18ce1d2

Browse files
CopilotmsyycCopilot
authored
Update http-client-python regen baseline to new azure-sdk-for-python branch/path (#10741)
[Azure/azure-sdk-for-python#46995](Azure/azure-sdk-for-python#46995) moved the generated test baseline out of `main` into a dedicated branch and folder. The regeneration script in `regenerate-common.ts` still pointed at the old location, breaking baseline sparse-checkout. ### Changes - `packages/http-client-python/eng/scripts/ci/regenerate-common.ts`: - `branch`: `main` → `typespec-python-generated-tests` - `sourceSubdir`: `eng/tools/emitter/gen` → `eng/tools/azure-sdk-tools/emitter/generated` - Updated the matching doc comment on `prepareBaselineOfGeneratedCode`. - Added a Chronus `internal` changelog entry for `@typespec/http-client-python`. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ae20f97 commit 18ce1d2

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@typespec/http-client-python"
5+
---
6+
7+
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.

packages/http-client-python/eng/scripts/ci/regenerate-common.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ export async function preprocess(flavor: string, generatedFolder: string): Promi
677677

678678
/**
679679
* Resets the `tests/generated/{azure,unbranded}` baseline by sparse-checking-out
680-
* `eng/tools/emitter/gen` from the Azure/azure-sdk-for-python repo, then
680+
* `eng/tools/azure-sdk-tools/emitter/generated` from the Azure/azure-sdk-for-python repo, then
681681
* deleting a couple of fully-generated package folders so regeneration has to
682682
* recreate them from scratch (smoke test of full-emit path).
683683
*
@@ -686,8 +686,8 @@ export async function preprocess(flavor: string, generatedFolder: string): Promi
686686
*/
687687
export async function prepareBaselineOfGeneratedCode(generatedFolder: string): Promise<void> {
688688
const repoUrl = "https://github.com/Azure/azure-sdk-for-python.git";
689-
const branch = "main";
690-
const sourceSubdir = "eng/tools/emitter/gen";
689+
const branch = "typespec-python-generated-tests";
690+
const sourceSubdir = "eng/tools/azure-sdk-tools/emitter/generated";
691691
const testsGeneratedDir = resolve(generatedFolder, "../tests/generated");
692692

693693
console.log(pc.cyan(`\n${"=".repeat(60)}`));
@@ -708,6 +708,7 @@ export async function prepareBaselineOfGeneratedCode(generatedFolder: string): P
708708
execSync(cmd, { cwd: tempDir, stdio: ["ignore", "ignore", "inherit"] });
709709

710710
run(`git init`);
711+
run(`git config core.longpaths true`);
711712
run(`git remote add origin ${repoUrl}`);
712713
run(`git config core.sparseCheckout true`);
713714
run(`git sparse-checkout init --cone`);

0 commit comments

Comments
 (0)