getsentry/sentry-symfony

Release reported as "1.0.0+no-version-set@{no ref"

cancan101 opened this issue · 5 comments

How do you use Sentry?

Self-hosted / on-premises

SDK version

4.14.0

Steps to reproduce

Trigger an error

Expected result

a clean string, perhaps the git hash.

Actual result

In JSON payload

"release":"1.0.0+no-version-set@{no ref",

Perhaps related to: #366
image

This happens when Sentry is not able to automatically detect the version of your codebase (for example because Git is not available) and no value has been provided to manually set it.

But why the mis matched braces?

@cancan101 Can you set the release manually when you init the SDK?
Like @Jean85 mentioned, we try to pick up the hash from Git but it seems not to work correctly for whatever reason

Yes, I can try to set the hash.

My more immediate concern was why does this show as {no ref rather than {no ref} or no ref?

Ah it might just be some small parsing error, probably not relevant.
Does this maybe run on a CI or somewhere and you don't correctly clone/checkout a repo?

Regardless I don't think this is a bug here since we just try to read env and print the string, the workaround is just set the release directly yourself.