Skip to content
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

Ignore commented <UserSecretsId> tag in .csproj #4268

Merged

Conversation

FiftyNine
Copy link
Contributor

Currently the extension employs this simple regex /UserSecretsId/i to detect if .NET project file uses values stored in Secret Manager. If this string is found in the project file, than the "docker-run" task generates a command that attempts to mount the secrets folder onto the container. If this folder does not exist than the command fails.
Problem is that this regex doesn't consider that the tag may be commented out.
I propose removing all commented sections from the .csproj contents before testing UserSecretsId regex against it.

@FiftyNine FiftyNine requested a review from a team as a code owner March 23, 2024 20:39
Copy link
Collaborator

@bwateratmsft bwateratmsft left a comment

Choose a reason for hiding this comment

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

This looks good, thank you @FiftyNine!

@bwateratmsft bwateratmsft added this to the 1.30.0 milestone Apr 3, 2024
@bwateratmsft bwateratmsft merged commit 263672f into microsoft:main Apr 3, 2024
2 checks passed
@bwateratmsft bwateratmsft modified the milestones: 1.30.0, 1.29.1 Apr 24, 2024
@bwateratmsft
Copy link
Collaborator

This should be released now in version Docker extension version 1.29.1.

@microsoft microsoft locked and limited conversation to collaborators May 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants