Sentry: Release API: "Enter a valid value"

Created on 22 Feb 2017  路  8Comments  路  Source: getsentry/sentry

Our version numbers contain a comma separating the version and the build number, eg: "2.3.4, 243"

Trying to POST to the releases endpoint results in a 400 error with the detail "Enter a valid value".

Upon some inspection it seems you are validating version numbers with a regex (See https://github.com/getsentry/sentry/blob/master/src/sentry/api/endpoints/project_releases.py#L46)

Can you please either add a comma to this regular expression or (perhaps more preferably) remove this validation.

Easy Task

Most helpful comment

I'm hitting a similar issue with our releases after recent changes to this regex. Our version numbers are semver+git sha (e.g. 1.0.2+030b665d). We have many existing releases in this format, but creating new ones fails.

All 8 comments

We can probably accept commas, but we can't remove restrictions. One complexity around release versions is we use them as primary identifiers, which also means they're used in URLs.

I'm hitting a similar issue with our releases after recent changes to this regex. Our version numbers are semver+git sha (e.g. 1.0.2+030b665d). We have many existing releases in this format, but creating new ones fails.

Hi, we also hit similar issues in creating new releases. Our existing releases include + character and we currently couldn't create a new release with + character in our release version.

Hi, my release system also uses semver+git shaformat and was broken today.
Can you consider allowing the + symbol again please?

+1. It would be great if sentry releases supported semver+git sha again.

This constraint doesn't seem to apply to versions created by way of an error report.

Perhaps you could add a slug field for the URL and remove the constraint on the actual version?

We could consider using the internal ID in the slug field, or building a numeric ID for it in addition to the version, but that's a pretty significant change.

The + char seems to be accepted again:
https://github.com/getsentry/sentry/commit/29075396b4d4157a37e42f661c5064620a9f0469

I think this issue can be closed now.

Was this page helpful?
0 / 5 - 0 ratings