Skip to content

Commit 074f3b2

Browse files
committed
Merge remote-tracking branch 'origin/main' into simorenoh/cosmos-ga-readiness-review
2 parents 67450e3 + 90248c9 commit 074f3b2

332 files changed

Lines changed: 31205 additions & 6466 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@
7474
# AzureSDKOwners: @vincenttran-msft @jalauzon-msft @jaschrep-msft
7575

7676
# PRLabel: %Event Hubs
77-
/sdk/eventhubs/ @j7nw4r
77+
/sdk/eventhubs/ @j7nw4r @SwayGom @sagar0207
7878

7979
# PRLabel: %Event Hubs %Storage
80-
/sdk/eventhubs/azure_messaging_eventhubs_checkpointstore_blob/ @j7nw4r @jalauzon-msft @vincenttran-msft @jaschrep-msft
80+
/sdk/eventhubs/azure_messaging_eventhubs_checkpointstore_blob/ @j7nw4r @SwayGom @sagar0207 @jalauzon-msft @vincenttran-msft @jaschrep-msft
8181

8282
# ServiceLabel: %Event Hubs
8383
# AzureSDKOwners: @LarryOsterman
84-
# ServiceOwners: @j7nw4r
84+
# ServiceOwners: @j7nw4r @SwayGom @sagar0207
8585

8686
####################
8787
# Management Libraries
@@ -90,11 +90,11 @@
9090
###########
9191
# Eng Sys
9292
###########
93-
/eng/ @danieljurek @weshaggard @heaths @xirzec @RickWinter
93+
/eng/ @danieljurek @heaths @xirzec @RickWinter
9494
/eng/common/ @Azure/azure-sdk-eng
9595
/.github/workflows/ @Azure/azure-sdk-eng
9696
/.github/CODEOWNERS @xirzec @RickWinter @Azure/azure-sdk-eng
97-
/.config/1espt/ @benbp @weshaggard
97+
/.config/1espt/ @benbp
9898
/sdk/canary/ @danieljurek
9999

100100
# Add owners for notifications for specific pipelines
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
agent: "agent"
3-
description: "Generate a new performance test"
2+
name: create-perf-test
3+
description: Generate a new performance test
4+
disable-model-invocation: true
45
---
56

67
# Generate a new performance test
78

89
You will generate a new performance (perf) test under the `sdk/{service-directory}/{crate-name}/perf` directory as `${input:testName:perf_test_name}.rs` where:
910

10-
- `{service-directory}` is the directory name under [sdk](../../sdk) for the current ${file} e.g., `core`.
11+
- `{service-directory}` is the directory name under [sdk](../../../sdk) for the current ${file} e.g., `core`.
1112
- `{crate-name}` is the crate directory name under `sdk/{service-directory}` for the current ${file} e.g., `azure_core`.
1213

1314
## Set up
@@ -24,9 +25,9 @@ These instructions only need to be done once. If changes described are already p
2425
```
2526

2627
- Under the `{crate-name}` directory, add a `perf/perf_tests.rs` file that uses `azure_core_test::perf::PerfRunner` to register and run the crate's perf tests.
27-
- Under the `{crate-name}` directory, copy [sdk/core/perf.yml](../../sdk/core/perf.yml) and change _only_ the following contents:
28+
- Under the `{crate-name}` directory, copy [sdk/core/perf.yml](../../../sdk/core/perf.yml) and change _only_ the following contents:
2829
- Change `ServiceDirectory` to match the `{service-directory}`.
29-
- Under the `{crate-name}` directory, copy [sdk/core/perf-tests.yml](../../sdk/core/perf-tests.yml) and change _only_ the following contents:
30+
- Under the `{crate-name}` directory, copy [sdk/core/perf-tests.yml](../../../sdk/core/perf-tests.yml) and change _only_ the following contents:
3031
- Change `Service` to match the `{service-directory}`.
3132
- Change `Project` to match the `{crate-name}`.
3233
- Change the `PackageVersions` to replace `azure_core` with the `{crate-name}`.
@@ -38,7 +39,7 @@ For each new perf test:
3839
- In `sdk/{service-directory}/{crate-name}/perf/${input:testName}.rs`:
3940
- Add a type that implements `azure_core_test::perf::PerfTest`.
4041
- Generate a perf test for the currently selected function in ${file} or specified client method name, if any.
41-
- Use [sdk/keyvault/azure_security_keyvault_keys/perf/get_key.rs](../../sdk/keyvault/azure_security_keyvault_keys/perf/get_key.rs) or [sdk/storage/azure_storage_blob/perf/list_blob_test.rs](../../sdk/storage/azure_storage_blob/perf/list_blob_test.rs) as examples.
42+
- Use [sdk/keyvault/azure_security_keyvault_keys/perf/get_key.rs](../../../sdk/keyvault/azure_security_keyvault_keys/perf/get_key.rs) or [sdk/storage/azure_storage_blob/perf/list_blob_test.rs](../../../sdk/storage/azure_storage_blob/perf/list_blob_test.rs) as examples.
4243
- Define a `test_metadata()` function returning `PerfTestMetadata`, including any required command-line options.
4344
- Separate setup, the measured operation, and cleanup in the `PerfTest` implementation.
4445
- If credentials are needed, prefer the crate's existing perf-test pattern (for example `context.recording().credential()` or an existing helper) instead of introducing a new authentication flow.

.github/prompts/recorded-test.prompt.md renamed to .github/skills/create-recorded-test/SKILL.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
agent: "agent"
3-
description: "Generate a new recorded integration test"
2+
name: create-recorded-test
3+
description: Generate a new recorded integration test
4+
disable-model-invocation: true
45
---
56

67
# Generate a new recorded integration test
78

89
You will generate one or more recorded integration tests under the `sdk/{service-directory}/{crate-name}/tests` directory in `${input:testFile:test_file}.rs` where:
910

1011
- `{repo-root}` is the root directory containing `Cargo.toml`.
11-
- `{service-directory}` is the directory name under [sdk](../../sdk) for the current ${file} e.g., `keyvault`.
12+
- `{service-directory}` is the directory name under [sdk](../../../sdk) for the current ${file} e.g., `keyvault`.
1213
- `{crate-name}` is the crate directory name under `sdk/{service-directory}` for the current ${file} e.g., `azure_security_keyvault_secrets`.
1314

1415
## Set up
@@ -24,7 +25,7 @@ These instructions only need to be done once. If changes described are already p
2425
```
2526

2627
- To run recorded tests, rely on the existing test infrastructure. Test Proxy is acquired automatically for test runs when needed, but not for `test-proxy push -a sdk/{service-directory}/assets.json`.
27-
- For manual Test Proxy usage or asset publishing, see [CONTRIBUTING.md](../../CONTRIBUTING.md) and the [Test Proxy documentation](https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md).
28+
- For manual Test Proxy usage or asset publishing, see [CONTRIBUTING.md](../../../CONTRIBUTING.md) and the [Test Proxy documentation](https://github.com/Azure/azure-sdk-tools/blob/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md).
2829

2930
## Adding a new recorded test
3031

@@ -37,7 +38,7 @@ For each new recorded test:
3738
- `let mut options = {Client}Options::default();`
3839
- `recording.instrument(&mut options.client_options);`
3940
- Construct clients with `recording.var("{ENV_VAR}", None).as_str()`, `recording.credential()`, and `Some(options)`.
40-
- Use [sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs](../../sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs) as the example for function signatures, `TestContext`, and required `ClientOptions` instrumentation.
41+
- Use [sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs](../../../sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs) as the example for function signatures, `TestContext`, and required `ClientOptions` instrumentation.
4142
- Generate one test per client method or scenario the user wants to cover. If multiple methods share setup and belong together, keep them in the same integration test file as separate `#[recorded::test]` functions.
4243
- Prefer asserting on returned models or observable state instead of only checking success.
4344
- Reuse existing crate patterns for imports, helper types, resource naming, and environment variables.

.github/workflows/verify-links.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Verify Links
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- release/*
8+
- hotfix/*
9+
check_run:
10+
types:
11+
- completed
12+
workflow_dispatch:
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
verify-links:
19+
name: Verify Links
20+
if: >-
21+
github.event_name == 'pull_request' ||
22+
(
23+
github.event_name == 'check_run' &&
24+
github.event.check_run.check_suite.app.name == 'Azure Pipelines' &&
25+
(
26+
(github.repository == 'Azure/azure-sdk-for-net' && contains(github.event.check_run.name, 'Compliance')) ||
27+
(github.repository == 'Azure/azure-sdk-for-python' && contains(github.event.check_run.name, 'Analyze')) ||
28+
(github.repository == 'Azure/azure-sdk-for-java' && contains(github.event.check_run.name, 'Analyze')) ||
29+
(github.repository == 'Azure/azure-sdk-for-js' && contains(github.event.check_run.name, 'Analyze')) ||
30+
(github.repository == 'Azure/azure-sdk-for-c' && contains(github.event.check_run.name, 'GenerateReleaseArtifacts')) ||
31+
(github.repository == 'Azure/azure-sdk-for-cpp' && contains(github.event.check_run.name, 'GenerateReleaseArtifacts')) ||
32+
(github.repository == 'Azure/azure-sdk-for-go' && contains(github.event.check_run.name, 'Analyze')) ||
33+
(github.repository == 'Azure/azure-sdk-for-ios' && contains(github.event.check_run.name, 'Analyze'))
34+
)
35+
)
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
with:
41+
ref: ${{ github.event.pull_request.head.sha || github.event.check_run.head_sha || github.sha }}
42+
fetch-depth: 0
43+
44+
- name: Link verification check
45+
shell: pwsh
46+
env:
47+
SYSTEM_PULLREQUEST_TARGETBRANCH: ${{ github.base_ref }}
48+
SYSTEM_PULLREQUEST_SOURCECOMMITID: ${{ github.event.pull_request.head.sha }}
49+
run: |
50+
$urls = & ./eng/common/scripts/get-markdown-files-from-changed-files.ps1
51+
if (-not $urls -or $urls.Count -eq 0) {
52+
Write-Host "No changed markdown files; nothing to verify."
53+
exit 0
54+
}
55+
56+
$sourceRepoUri = '${{ github.event.pull_request.head.repo.html_url }}'
57+
$defaultBranch = '${{ github.event.repository.default_branch }}'
58+
$branchReplaceRegex = "^($sourceRepoUri(?:\.git)?/(?:blob|tree)/)$defaultBranch(/.*)$"
59+
60+
./eng/common/scripts/Verify-Links.ps1 `
61+
-urls $urls `
62+
-rootUrl "file://$env:GITHUB_WORKSPACE/" `
63+
-recursive:$false `
64+
-ignoreLinksFile "$env:GITHUB_WORKSPACE/eng/ignore-links.txt" `
65+
-branchReplaceRegex $branchReplaceRegex `
66+
-branchReplacementName '${{ github.event.pull_request.head.sha }}' `
67+
-checkLinkGuidance:$true `
68+
-localBuildRepoName '${{ github.repository }}' `
69+
-localBuildRepoPath $env:GITHUB_WORKSPACE `
70+
-inputCacheFile "https://azuresdkartifacts.blob.core.windows.net/verify-links-cache/verify-links-cache.txt" `
71+
-allowRelativeLinksFile "$env:GITHUB_WORKSPACE/eng/common/scripts/allow-relative-links.txt"

.vscode/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"azure-pipelines.1ESPipelineTemplatesSchemaFile": true,
3+
"cmake.ignoreCMakeListsMissing": true,
34
"cSpell.enabled": true,
45
"editor.formatOnSave": true,
56
"files.associations": {
@@ -17,9 +18,16 @@
1718
],
1819
"rust-analyzer.cargo.features": "all",
1920
"rust-analyzer.check.command": "clippy",
21+
"rust-analyzer.linkedProjects": [
22+
"Cargo.toml",
23+
"eng/tools/Cargo.toml",
24+
"eng/scripts/update-cratenames.rs",
25+
"eng/scripts/update-pathversions.rs",
26+
"eng/scripts/verify-dependencies.rs",
27+
"eng/scripts/verify-keywords.rs",
28+
],
2029
"yaml.format.printWidth": 240,
2130
"[powershell]": {
2231
"editor.defaultFormatter": "ms-vscode.powershell",
2332
},
24-
"cmake.ignoreCMakeListsMissing": true,
2533
}

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ The Azure SDK for Rust provides Rust language bindings and client libraries for
2424
├── doc/ # Additional documentation
2525
├── .github/
2626
│ ├── instructions/ # Agent instruction files for specific tasks
27-
│ ├── prompts/ # Reusable Copilot prompts
2827
│ └── skills/ # Copilot skills (e.g., check-spelling, lint-markdown)
2928
├── CONTRIBUTING.md # Contribution guidelines (see for detailed workflows)
3029
└── README.md # Repository overview
@@ -265,10 +264,11 @@ Integration tests use the Azure SDK Test Proxy for recording/playback. See `CONT
265264
Additional specialized instructions for specific workflows can be found in:
266265

267266
- [.github/instructions](.github/instructions) - Task-specific instructions (loaded when pattern-matched)
268-
- [.github/prompts](.github/prompts) - Reusable Copilot prompts (use `/{prompt-name}` in Copilot)
269267
- [.github/skills](.github/skills) - Copilot skills for common tasks (use `/{skill-name}` in Copilot):
270268
- `check-spelling` - Check and fix spelling in project source files using cSpell
271269
- `create-crate` - Create a new Azure SDK crate from a TypeSpec specification
270+
- `create-perf-test` - Generate a new performance test
271+
- `create-recorded-test` - Generate a new recorded integration test
272272
- `lint-markdown` - Check and fix formatting in markdown files using markdownlint-cli2
273273

274274
## Cross-References

CONTRIBUTING.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ Further discussion on or pull requests for these issues is highly valued, and we
2121
## Using Copilot
2222

2323
This repository is [configured](https://code.visualstudio.com/docs/copilot/copilot-customization) to facilitate Copilot.
24-
In addition to [general instructions](https://github.com/Azure/azure-sdk-for-rust/blob/main/AGENTS.md), you can find additional skills in [.github/skills](https://github.com/Azure/azure-sdk-for-rust/tree/main/.github/skills) or use `/{skill-name}` in Copilot; and prompts in [.github/prompts](https://github.com/Azure/azure-sdk-for-rust/tree/main/.github/prompts) or type `/{prompt-name}` in Copilot.
24+
In addition to [general instructions](https://github.com/Azure/azure-sdk-for-rust/blob/main/AGENTS.md), you can find additional skills in [.github/skills](https://github.com/Azure/azure-sdk-for-rust/tree/main/.github/skills) or use `/{skill-name}` in Copilot.
2525

2626
To generate a new performance test, for example, you might prompt with:
2727

2828
```text
29-
Using /perf-test generate a perf test for SecretClient::get_secret.
29+
/create-perf-test generate a perf test for SecretClient::get_secret.
3030
```
3131

3232
For comprehensive guidance on how AI agents should interact with this repository, including workflows, automation boundaries, and safety guidelines, see [AGENTS.md](https://github.com/Azure/azure-sdk-for-rust/blob/main/AGENTS.md).
@@ -376,10 +376,32 @@ Once all of the above steps are met, the following process will be followed:
376376

377377
### Performance Testing
378378

379-
Performance testing is supported via [criterion](https://bheisler.github.io/criterion.rs/book/criterion_rs.html)
380-
There are samples of performance tests under `sdk/core/azure_core/benches` folder.
381-
To execute the performance tests in `azure_core` folder you can run `cargo bench` in the `sdk/core/azure_core` folder.
382-
The output of the tests will be presented in the command line as well as saved under the `target/criterion` folder.
379+
See [sdk/storage/azure_storage_blob](https://github.com/Azure/azure-sdk-for-rust/tree/main/sdk/storage/azure_storage_blob) for examples of both types of performance tests.
380+
381+
#### Benchmarks
382+
383+
For on-demand micro-benchmarks, use [criterion](https://bheisler.github.io/criterion.rs/book/criterion_rs.html). Benchmark files go under `benches/` in the crate directory. Add the following to `Cargo.toml`:
384+
385+
```toml
386+
[[bench]]
387+
name = "{bench-name}"
388+
harness = false
389+
```
390+
391+
criterion requires `harness = false` to supply its own test harness.
392+
393+
#### Performance Tests
394+
395+
For scheduled performance tests that are compared across languages and tracked for regressions, use `azure_core_test::perf::PerfRunner`. These files go under `perf/` in the crate directory. Add the following to `Cargo.toml`:
396+
397+
```toml
398+
[[bench]]
399+
name = "perf"
400+
path = "perf/perf_tests.rs"
401+
harness = false
402+
```
403+
404+
Use the `/create-perf-test` skill to generate a new performance test.
383405

384406
## Releases
385407

0 commit comments

Comments
 (0)