dschmidt / ember-cli-deploy-sentry

An ember-cli-deploy-plugin to upload javascript sourcemaps to Sentry
MIT License
42 stars 51 forks source link

Not able to handle an existing release with existing artifacts #73

Closed timjcook closed 2 years ago

timjcook commented 3 years ago

Issue

When I try to deploy a certain version multiple times I am getting the following error:

StatusCodeError: 409 - {"detail":"A file matching this name already exists for the given release"}

because artifacts already are associated with that release.

I also get the following error log

SilentError: Creating release failed

Looking through the source code it looks to me like this should be handled in handleExistingRelease but looking at the logs it doesn't seem to be following that code path in the instances that it fails.

It leads me to suspect that something in doesReleaseExist is throwing an exception when it should be returning a 200.

My ideal solution in this case the one described in handleExistingRelease where we delete all the existing artifacts and upload new ones.

I'm on v0.7.0 and in cases where a release doesn't already exist, deploying creates one and uploads artifacts fine.

dschmidt commented 3 years ago

Thanks for your report!

Sounds good, would you like to give implementing it a shot?

timjcook commented 3 years ago

Sure thing. I'll get back to you.

veelci commented 2 years ago

@timjcook, I have a PR out that may address the error you are encountering.