-
Notifications
You must be signed in to change notification settings - Fork 685
Ensure containers EH and SB files can be used from non-root containers #7764
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
4952a9b
to
3dc36e6
Compare
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.
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/Shared/DistributedApplicationTestingBuilderExtensions.cs:32
- Ensure that the temporary directory created via CreateTempSubdirectory() is appropriately cleaned up after tests run to prevent leaving unused directories on disk.
builder.Configuration["Aspire:Store:Path"] = Directory.CreateTempSubdirectory().FullName;
tests/Aspire.Hosting.Azure.Tests/AzureEventHubsExtensionsTests.cs
Outdated
Show resolved
Hide resolved
/backport to release/9.1 |
Started backporting to release/9.1: https://github.com/dotnet/aspire/actions/runs/13512541462 |
// The docker container runs as a non-root user, so we need to grant other user's read/write permission | ||
if (!OperatingSystem.IsWindows()) | ||
{ | ||
var mode = UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute | |
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.
Do we need the execute privileges here and elsewhere?
// We create the Aspire Store in a folder with user-only access. This way non-root containers won't be able | ||
// to access the files unless they correctly assign the required permissions for the container to work. | ||
|
||
builder.Configuration["Aspire:Store:Path"] = Directory.CreateTempSubdirectory().FullName; |
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.
Do we need to do any exception handling here in case we're not able to create the temporary subdirectory?
@@ -110,6 +110,46 @@ public async Task VerifyAzureEventHubsEmulatorResource(bool referenceHub) | |||
} | |||
} | |||
|
|||
[Fact] | |||
[RequiresDocker] | |||
public async Task AzureEventHubsNs_ProducesAndConsumes() |
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.
Why this versus a playground test?
@captainsafia I think these are good questions, we hopefully have a plane for changing the way we deal with permissions like this for mounts coming from DCP in 9.2. But I think this is OK for 9.1. |
Description
IAspireStore
Fixes #7759
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):