Add a flag to override release artifacts
Add a way to make the release file upload idempotent by replacing whatever is already there if needed.
This is very necessary!
+1
We need this to update source maps for a react-native app.
@mgiachetti can you clarify this a bit?
@mitsuhiko We are using sentry for production and for our testing environment. In production we create a new release every time the code changes so here we do not have problems because we do not need to update any artifact. For our testing environment we have one release for every pull request so all issues are grouped in the same release. Every time the pull request is updated a new version of the source maps need to be pushed and we need to update the existing source map artifact.
The current api doesn't support update an artifact just create and if the file already exists it fails. So it would be awesome if you could add a flag to the create file endpoint.
this is how we are using the endpoint:
# Upload the source map
$ curl https://sentry.io/api/0/projects/$ORGANIZATION/$PROJECT/releases/$RELEASE/files/ \
-X POST \
-H 'Authorization: Bearer $TOKEN' \
-F [email protected] \
-F name="/main.jsbundle.map"
We could create a new release for each time a pull request change, but this will be unmanageable, for the amount of new releases. also the issues would not be grouped under the same release.
@mgiachetti did you see the sentry-cli binary? It deals with all of this automatically and also supports sourcemap rewriting which is necessary for latest react-native versions from what i can tell (though that part is not documented yet. But we're trying to work on that atm).
@mitsuhiko nice cli! I didn't know that, but the cli can replace an existing source map on sentry's server? As far as I know the api doesn't support to replace an artifact. You need to delete the file first then upload the new one. The cli does that automatically. Nice! Thanks you for your help!
+1
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Accepted, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀