Skip to content

Conversation

danegsta
Copy link
Member

@danegsta danegsta commented Apr 4, 2025

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

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Apr 4, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one question on the docs.

@danegsta danegsta enabled auto-merge (squash) April 4, 2025 18:11
@danegsta danegsta merged commit 6656af4 into dotnet:main Apr 4, 2025
174 checks passed
@danegsta
Copy link
Member Author

danegsta commented Apr 4, 2025

/backport to release/9.2

Copy link
Contributor

github-actions bot commented Apr 4, 2025

Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14271876544

@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants