-
Notifications
You must be signed in to change notification settings - Fork 682
Optimize required unix file modes #7781
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
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 11 out of 11 changed files in this pull request and generated no comments.
@@ -1206,6 +1188,8 @@ private async Task CreateContainerAsync(AppResource cr, ILogger resourceLogger, | |||
spec.Ports = BuildContainerPorts(cr); | |||
} | |||
|
|||
spec.VolumeMounts = BuildBindMounts(modelContainerResource); |
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.
The idea is to be able to add container mount annotations during the AftertEndpointAllocated
. The same way endpoints are built in CreateContainerAsync
. Otherwise we can't create file mounts with deterministic names based on the file content (for persistent containers).
NB: In the case of MySql/PgSql the target ports are currently used, which are static. Resolution is done thought host name since it's docker to docker communication. This means that at least this part of the configuration in invariant across restarts.
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.
FYI - @mitchdenny @karolz-ms @danegsta
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.
Can we write a persistence container test for MySQL and PostgreSQL?
@@ -1206,6 +1188,8 @@ private async Task CreateContainerAsync(AppResource cr, ILogger resourceLogger, | |||
spec.Ports = BuildContainerPorts(cr); | |||
} | |||
|
|||
spec.VolumeMounts = BuildBindMounts(modelContainerResource); |
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.
FYI - @mitchdenny @karolz-ms @danegsta
tests/Aspire.Hosting.SqlServer.Tests/SqlServerFunctionalTests.cs
Outdated
Show resolved
Hide resolved
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.
This change looks really nice. Nice work here! Thanks for the persistence to figure this all out.
@@ -101,25 +101,15 @@ public static IResourceBuilder<SqlServerServerResource> WithDataVolume(this IRes | |||
/// <param name="source">The source directory on the host to mount into the container.</param> | |||
/// <param name="isReadOnly">A flag that indicates if this is a read-only mount.</param> | |||
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns> | |||
/// <remarks> | |||
/// The container starts up as non-root and the <paramref name="source"/> directory must be readable by the user that the container runs as. |
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.
/// The container starts up as non-root and the <paramref name="source"/> directory must be readable by the user that the container runs as. | |
/// The container starts up as non-root and the <paramref name="source"/> directory must be readable and writeable by the user that the container runs as. |
Description
AfterEndpointsAllocatedEvent
.Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):