-
Notifications
You must be signed in to change notification settings - Fork 652
Skip role assignment handling for emulators #9705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updated `BuildRoleAssignmentAnnotations` to skip processing for container emulators. - Added a new test `DoesNotApplyRoleAssignmentsInRunModeForEmulators` to verify that role assignments are not applied to emulator resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the role assignment handling logic to skip processing for container emulator resources and adds a corresponding unit test to verify this behavior.
- Skips role assignment processing for emulator resources in AzureResourcePreparer.
- Adds a dedicated test to ensure that role assignments are not applied for emulator resources in run mode.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs | Added test DoesNotApplyRoleAssignmentsInRunModeForEmulators verifying skip behavior for emulator resources. |
src/Aspire.Hosting.Azure/AzureResourcePreparer.cs | Updated BuildRoleAssignmentAnnotations to bypass processing for resources identified as containers. |
Comments suppressed due to low confidence (1)
src/Aspire.Hosting.Azure/AzureResourcePreparer.cs:151
- [nitpick] Consider renaming the method 'IsContainer()' to a more explicit name (e.g., 'IsContainerEmulator()') to clarify that it checks for emulator resources, thereby improving code readability.
if (azureReference.IsContainer())
/backport to release/9.3 |
Started backporting to release/9.3: https://github.com/dotnet/aspire/actions/runs/15469706213 |
@davidfowl backporting to "release/9.3" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Skip role assignment handling for emulators
Using index info to reconstruct a base tree...
M src/Aspire.Hosting.Azure/AzureResourcePreparer.cs
M tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs
Falling back to patching base and 3-way merge...
Auto-merging tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs
CONFLICT (content): Merge conflict in tests/Aspire.Hosting.Azure.Tests/AzureResourcePreparerTests.cs
Auto-merging src/Aspire.Hosting.Azure/AzureResourcePreparer.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Skip role assignment handling for emulators
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@eerhardt can you backport this change to 9.3? |
Yes. Will do. |
- Updated `BuildRoleAssignmentAnnotations` to skip processing for container emulators. - Added a new test `DoesNotApplyRoleAssignmentsInRunModeForEmulators` to verify that role assignments are not applied to emulator resources.
- Updated `BuildRoleAssignmentAnnotations` to skip processing for container emulators. - Added a new test `DoesNotApplyRoleAssignmentsInRunModeForEmulators` to verify that role assignments are not applied to emulator resources. Co-authored-by: David Fowler <davidfowl@gmail.com>
Patched in 9.3.1. To pick up this fix if you need it, For existing projects targeting 9.3.0, please update as follows; If you're creating new projects, you can just install and use the updated project templates: |
Description
BuildRoleAssignmentAnnotations
to skip processing for container emulators.DoesNotApplyRoleAssignmentsInRunModeForEmulators
to verify that role assignments are not applied to emulator resources.Fixes #9422
Checklist