Skip to content

azure-upgrade, replace personal repo in integration test with repos under well-known orgs#2608

Open
XiaofeiCao wants to merge 4 commits into
microsoft:mainfrom
XiaofeiCao:azure-upgrade/use-well-known-org-for-test
Open

azure-upgrade, replace personal repo in integration test with repos under well-known orgs#2608
XiaofeiCao wants to merge 4 commits into
microsoft:mainfrom
XiaofeiCao:azure-upgrade/use-well-known-org-for-test

Conversation

@XiaofeiCao

@XiaofeiCao XiaofeiCao commented Jun 9, 2026

Copy link
Copy Markdown
Member

Replaces the personal weidongxu-microsoft/java-update-examples repo in tests/azure-upgrade/integration.test.ts with the three well-known repos. Each entry is pinned to the latest commit on its default branch for reproducibility.

Changes

Scenario Old (folder in java-update-examples) New upstream (pinned)
File-based Azure auth -> DefaultAzureCredential azure-legacy-sdk-update-azure-client-initialization Azure-Samples/aad-java-manage-service-principals @ 83b4460
EventProcessorHost InMemory* -> BlobCheckpointStore azure-legacy-sdk-update-eventhubs-v3 logstash-plugins/logstash-input-azure_event_hubs @ 4a05eea (sparse: .ci/integration/event_hub_consumer)
Batch defineNewApplicationPackage -> applicationPackages().define() azure-legacy-sdk-update-batch-java-manage-batch-accounts Azure-Samples/batch-java-manage-batch-accounts @ 105a076

runJavaMigration now takes a { repoUrl, commitId, sparseCheckoutPath? } config and only adds the ""project can be found under ..."" hint when a sparse subpath is used.

Test results

All three java-sdk-migration-e2e tests pass against the new baselines:

  • migrates legacy file-based Azure auth (client init) to DefaultAzureCredential -> pass
  • migrates EventProcessorHost InMemory managers to BlobCheckpointStore -> pass
  • migrates Batch defineNewApplicationPackage chain to applicationPackages().define() -> pass
image

Migration assertions and skill-invocation tests are unchanged.

…e repos

Replace the single weidongxu-microsoft/java-update-examples baseline
with three pinned upstream repos so the migration assertions exercise
the original Azure sample code:

- file-based auth -> Azure-Samples/aad-java-manage-service-principals
- EventProcessorHost -> logstash-plugins/logstash-input-azure_event_hubs
  (sparse checkout of .ci/integration/event_hub_consumer)
- Batch defineNewApplicationPackage -> Azure-Samples/batch-java-manage-batch-accounts

runJavaMigration now takes a { repoUrl, commitId, sparseCheckoutPath? }
config and only adds the 'project can be found under ...' hint to the
prompt when a sparse subpath is used.

All three java-sdk-migration-e2e tests pass against the new baselines.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@XiaofeiCao XiaofeiCao marked this pull request as ready for review June 9, 2026 07:20
Copilot AI review requested due to automatic review settings June 9, 2026 07:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Azure upgrade integration tests to use scenario-specific upstream sample repositories pinned to fixed commits, improving determinism while supporting repos whose Java sample lives in a subdirectory.

Changes:

  • Replaced the single shared samples repo with per-scenario repo/commit configurations.
  • Refactored runJavaMigration to accept a repo config object and handle optional sparseCheckoutPath.
  • Updated the affected tests to call runJavaMigration with the new configs.

Comment thread tests/azure-upgrade/integration.test.ts
Comment thread tests/azure-upgrade/integration.test.ts
@XiaofeiCao XiaofeiCao changed the title test(azure-upgrade): point java migration e2e tests at upstream sample repos azure-upgrade, replace personal repo in integration test with repos under well-known orgs Jun 9, 2026
Comment on lines +61 to +66
const EVENT_PROCESSOR_HOST_REPO = {
repoUrl: "https://github.com/logstash-plugins/logstash-input-azure_event_hubs.git",
commitId: "4a05eea79342f1d451162d1a3e26270f6a484b4f",
// The Java sample lives in a subdirectory of this primarily-Ruby repo.
sparseCheckoutPath: ".ci/integration/event_hub_consumer",
} as const;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, this is not our org?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. I assume logstash-plugins be well-known org, and will not be removed any time sooner.

@JasonYeMSFT

JasonYeMSFT commented Jun 15, 2026

Copy link
Copy Markdown
Member

FYI, we are migrating testing from old integration tests to vally eval suites. Here is a PR converting azure-upgrade test cases. Could you please help review and merge the migration PR and then apply these changes to the vally eval suites?
#2648

@@ -0,0 +1,404 @@
/**

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you delete this file? We no longer run js tests for azure-upgrade in our scheduled tests.

jongio
jongio previously requested changes Jun 25, 2026

@jongio jongio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two issues in eval.yaml need fixing:

  1. git clone --depth 1 --sparse is used for aad-java-manage-service-principals and batch-java-manage-batch-accounts, but no git sparse-checkout set follows. The default sparse-checkout cone only materializes root-level files. Both repos keep their Java sources under src/, so those files won't be checked out. This likely explains the failing eval CI check. Drop --sparse from these two clone commands (keep it for the logstash repo that genuinely uses sparse checkout).

  2. The bare cd repo-name lines (254, 365) are no-ops left over from when git sparse-checkout set was chained there. Remove them or fold the fetch into that line.

Separately, @JasonYeMSFT flagged that integration tests are migrating to eval suites and asked to delete tests/azure-upgrade/integration.test.ts. That should be resolved before merging.

- git clone --depth 1 --sparse https://github.com/weidongxu-microsoft/java-update-examples.git
- cd java-update-examples && git sparse-checkout set azure-legacy-sdk-update-azure-client-initialization
- cd java-update-examples && git fetch --depth 1 origin 6d071296df8929482b0903241a23713a0bb952a4 && git checkout 6d071296df8929482b0903241a23713a0bb952a4
- git clone --depth 1 --sparse https://github.com/Azure-Samples/aad-java-manage-service-principals.git

@jongio jongio Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--sparse enables sparse-checkout mode but no git sparse-checkout set follows. The default cone pattern only materializes root-level files. I checked the repo tree at this commit and Java sources live under src/, so they won't be checked out.

Drop --sparse since this repo doesn't need sparse checkout:

Suggested change
- git clone --depth 1 --sparse https://github.com/Azure-Samples/aad-java-manage-service-principals.git
- git clone --depth 1 https://github.com/Azure-Samples/aad-java-manage-service-principals.git

Same fix needed on line 364 for batch-java-manage-batch-accounts.

- cd java-update-examples && git sparse-checkout set azure-legacy-sdk-update-azure-client-initialization
- cd java-update-examples && git fetch --depth 1 origin 6d071296df8929482b0903241a23713a0bb952a4 && git checkout 6d071296df8929482b0903241a23713a0bb952a4
- git clone --depth 1 --sparse https://github.com/Azure-Samples/aad-java-manage-service-principals.git
- cd aad-java-manage-service-principals

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bare cd is a no-op. The next command already starts with cd aad-java-manage-service-principals && ..., so this line does nothing. It was meaningful before when git sparse-checkout set was chained here.

Remove it (same for line 365):

Suggested change
- cd aad-java-manage-service-principals
- cd aad-java-manage-service-principals && git fetch --depth 1 origin 83b446085a7ef35cf26b6d36255aa833aeb287bb && git checkout 83b446085a7ef35cf26b6d36255aa833aeb287bb

@jongio jongio dismissed their stale review June 26, 2026 23:16

Dismissing: this review was incorrectly posted as changes-requested due to an automation bug. The findings remain valid as comments.

@jongio jongio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The eval CI check is failing. The likely root cause: --sparse is passed to git clone for aad-java-manage-service-principals (line 252) and batch-java-manage-batch-accounts (line 363), but no git sparse-checkout set follows either clone. The default sparse-checkout cone only materializes root-level files, so src/ (where the Java sources live) won't be checked out.

Fix: drop --sparse from those two clones. The logstash repo correctly uses sparse checkout because it chains git sparse-checkout set .ci/integration/event_hub_consumer on the next line.

Lines 253 and 364 (cd <repo-name>) are also no-ops. The subsequent command already starts with cd <repo-name> && ..., making the standalone cd redundant. Remove both lines.

Separately: @JasonYeMSFT asked to delete tests/azure-upgrade/integration.test.ts since integration tests are migrating to eval suites (see #2648). This PR adds a 404-line version of that file. Please resolve that conflict before merging.

@@ -250,9 +250,9 @@ stimuli:
- "Continue with recommended options until complete."
environment:
commands:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--sparse enables sparse-checkout mode but no git sparse-checkout set follows. The default cone pattern only materializes root-level files. Java sources live under src/, so they won't be checked out. This is likely why the eval CI check is failing.

Drop --sparse since this repo doesn't need sparse checkout:

Suggested change
commands:
- git clone --depth 1 https://github.com/Azure-Samples/aad-java-manage-service-principals.git

@@ -361,9 +361,9 @@ stimuli:
- "Continue with recommended options until complete."
environment:
commands:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue here: --sparse without a subsequent git sparse-checkout set means src/ won't be checked out.

Suggested change
commands:
- git clone --depth 1 https://github.com/Azure-Samples/batch-java-manage-batch-accounts.git

@jongio jongio left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One new nit since my last review (trailing underscore in the describe block name). My prior eval.yaml inline comments about --sparse without sparse-checkout set and no-op cd lines remain unresolved and are the likely cause of the failing eval CI check.

return (navigated && surfaced) || getToolCalls(m).length > 30;
}
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing underscore in the describe block name: the suite reports as azure-upgrade_ - Integration Tests.

Suggested change
describeIntegration(`${SKILL_NAME} - Integration Tests`, () => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants