Switch to null as default for owner and group in WithContainerFiles#8557
Merged
danegsta merged 4 commits intodotnet:mainfrom Apr 4, 2025
Merged
Switch to null as default for owner and group in WithContainerFiles#8557danegsta merged 4 commits intodotnet:mainfrom
danegsta merged 4 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (5)
src/Aspire.Hosting/Dcp/Model/Container.cs:296
- The comment still indicates a default of 0 for root, but the property is now nullable with a default of null. Please update the comment to accurately reflect the new behavior.
// The default owner UID to use for created (or updated) file system entries. Defaults to 0 for root.
src/Aspire.Hosting/Dcp/Model/Container.cs:301
- The comment indicates a default of 0 for root, but since the property type is now nullable, it should be updated to state that the default is null.
// The default group GID to use for created (or updated) file system entries. Defaults to 0 for root.
src/Aspire.Hosting/ContainerResourceBuilderExtensions.cs:773
- Since the parameter now has a null default, the documentation should be updated to indicate that the default value is null rather than 0 for root.
/// <param name="defaultGroup">The default group ID for the created or updated file system. Defaults to 0 for root if not set.</param>
src/Aspire.Hosting/ApplicationModel/ContainerFileSystemCallbackAnnotation.cs:85
- The comment mentions a default of 0 for root while the property is now nullable. Update the comment to reflect the new default, which is null.
/// The UID of the default owner for files/directories to be created or updated in the container. Defaults to 0 for root.
src/Aspire.Hosting/ApplicationModel/ContainerFileSystemCallbackAnnotation.cs:90
- Since the property is now a nullable int with a default of null, the documentation should be updated to remove the reference to a default value of 0 for root.
/// The GID of the default group for files/directories to be created or updated in the container. Defaults to 0 for root.
eerhardt
reviewed
Apr 4, 2025
src/Aspire.Hosting/ApplicationModel/ContainerFileSystemCallbackAnnotation.cs
Show resolved
Hide resolved
eerhardt
approved these changes
Apr 4, 2025
Member
eerhardt
left a comment
There was a problem hiding this comment.
LGTM. Just one question on the docs.
karolz-ms
approved these changes
Apr 4, 2025
Member
Author
|
/backport to release/9.2 |
Contributor
|
Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14271876544 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
To keep things future proof in case we ever want to change the default behavior, this switches the defaults for defaultOwner and defaultGroup to null instead of 0.
Checklist
<remarks />and<code />elements on your triple slash comments?breaking-changetemplate):doc-ideatemplate):