Skip to content

refactor: make principal type optional in role assignments and clean up e2e tests#1884

Merged
Roopan-Microsoft merged 6 commits intoAzure-Samples:devfrom
Harmanpreet-Microsoft:dev-test
Aug 20, 2025
Merged

refactor: make principal type optional in role assignments and clean up e2e tests#1884
Roopan-Microsoft merged 6 commits intoAzure-Samples:devfrom
Harmanpreet-Microsoft:dev-test

Conversation

@Harmanpreet-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request introduces improvements to the role assignment module in the infrastructure code, making principal type detection more flexible and simplifying usage in main deployment scripts. It also includes minor cleanups in the end-to-end test scripts for better readability.

Infrastructure improvements:

  • Updated core/security/role.bicep to allow automatic principal type detection by making principalType optional and including it only if explicitly provided. This enables more flexible role assignments for different principal types.
  • Commented out explicit principalType: 'User' assignments in the main infrastructure deployment (infra/main.bicep), so principal type is now auto-detected unless specifically set. This reduces redundancy and potential errors. [1] [2] [3]

Test script cleanups:

  • Removed duplicate import statements and improved code formatting in tests/e2e-test/tests/test_chat_with_your_data.py for better readability.
  • Cleaned up step function definitions in the same test file by removing duplicate code and improving structure. [1] [2]
  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

@Roopan-Microsoft Roopan-Microsoft merged commit c69198f into Azure-Samples:dev Aug 20, 2025
5 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 6, 2025

🎉 This PR is included in version 1.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants