Skip to content

AAD test coverage#46568

Draft
dibahlfi wants to merge 8 commits intomainfrom
users/dibahl/aad-test-coverage
Draft

AAD test coverage#46568
dibahlfi wants to merge 8 commits intomainfrom
users/dibahl/aad-test-coverage

Conversation

@dibahlfi
Copy link
Copy Markdown
Member

@dibahlfi dibahlfi commented Apr 28, 2026

This PR attempts to enhance the test coverage to include Data-plane user-data operations. It doesn't not cover ARM control plane or Data-plane resource management operations.
Currently there are 2 known gaps in the AAD workflow-
Known Issue — 403/5302 right after creating a new container under AAD - service side - there is a follow up going on.
403/5300 After Token Expiry - need to follow up with the client to see if they doing any custom work on Token Credential and have them provide more information if it happens next time - there is a separate thread around this.
Please note for now I have annotated the all the AAD tests with skip notation except one to ensure pipeline set up is correct. will enable all tests once this is confirmed.

@dibahlfi
Copy link
Copy Markdown
Member Author

/azp run python - cosmos - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread sdk/cosmos/aad.tests.yml Outdated
# token and DefaultAzureCredential picks it up automatically.
trigger: none

extends:
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.

I think instead of creating a new pipeline. A new job in the existing pipeline would be better because this would require us triggering another pipeline per pr.

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.

I dont think it would be possible to fold the AAD lane into the existing pipeline because
EnvVars: on eng/pipelines/templates/stages/archetype-sdk-tests.yml is stage-level today: whatever we set there applies to every matrix entry generated by MatrixConfigs[]. Our AAD lane needs COSMOS_TEST_DATA_AUTH_MODE=aad set for one new matrix entry only — without leaking to the existing key-auth entries in the same stage (setting it stage-wide would swap our existing key-auth live coverage for AAD instead of adding AAD on top).
but I have also asked eng. team to confirm the same? just an FYI...

Copy link
Copy Markdown
Member

@tvaron3 tvaron3 Apr 29, 2026

Choose a reason for hiding this comment

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

You can pass in the env variable through the bicep file. We do it for keys or enabling ppcb for all the different job. The keys are different for each job as eachjob runs on a different account.

"PythonVersion": "3.13",
"CoverageArg": "--disablecov",
"TestSamples": "false",
"TestMarkArgument": "cosmosAAD"
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.

Suggested change
"TestMarkArgument": "cosmosAAD"
"TestMarkArgument": "cosmosAAD",
"COSMOS_TEST_DATA_AUTH_MODE": "aad"

@dibahlfi
Copy link
Copy Markdown
Member Author

dibahlfi commented May 7, 2026

/azp run python - cosmos - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@dibahlfi
Copy link
Copy Markdown
Member Author

dibahlfi commented May 7, 2026

/azp run python - cosmos - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@dibahlfi
Copy link
Copy Markdown
Member Author

dibahlfi commented May 7, 2026

/azp run python - cosmos - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants