-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Creating a release through Sentry in MSBuild results in incorrect release name #4005
Comments
I suspect this is because of the single quote in the
From the msbuild docs, exec relies on Command Prompt to invoke the command. Command prompt doesn't remove quotes from variables by default. Maybe it's related? |
Thanks for raising this. Seems like you're right. Is this something you could put up a PR to help fix? |
Absolutely! After looking at how Command Prompt deals with quotes, I think the easiest solution is to just remove the quotes in question. A release name shouldn't have spaces or special characters anyway. Do you have any concerns with this approach? |
thanks! no concerns. I mean it's a good point that we should check if all valid characters defined in release (https://docs.sentry.io/cli/releases/ ) will work in linux mac and windows when running the cli via msbuild. But we have CI already set up in all of these OSs so should be OK. We had tests for symbol upload I think so we could check if the right release string is sent, in our "fake server". |
We do have a set of Pester-based integration tests: https://github.com/getsentry/sentry-dotnet/tree/main/integration-test They import a common sentry-CLI integration-test module from https://github.com/getsentry/github-workflows/tree/main/sentry-cli/integration-test but the server there currently doesn't do anything for releases: https://github.com/getsentry/github-workflows/blob/main/sentry-cli/integration-test/sentry-server.py#L79 because it was originally aimed at verifying we upload debug symbols correctly, nothing else. It's possible to extend tests to verify this too - whether it's worth it in this case (i.e. the chance of this regressing is high enough), I don't know. |
Package
Sentry
.NET Flavor
Other
.NET Version
UWP
OS
Windows
SDK Version
5.1.1
Self-Hosted Sentry Version
25.1.0
Steps to Reproduce
Build an application with MSBuild with
[email protected]
and-p:SentryCreateRelease=true
. I build and release my app in GitHub Actions. The full step can be found here: https://github.com/huynhsontung/Screenbox/blob/3b1d40519a1215d63cc97d3fa7ac0b8ea8ca449a/.github/workflows/main.yml#L75Expected Result
For the package name and version to not have extra quotes. In my case package should be
screenbox
and version should be0.15.0
Actual Result
The new version has a single quote
'
suffix, and the package name has a single quote'
prefix. Package is'screenbox
and version is0.15.0'
.The text was updated successfully, but these errors were encountered: