Skip to content
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

Upload a New File API endpoint does not work in EU orgs #81232

Closed
InterstellarStella opened this issue Nov 25, 2024 · 10 comments
Closed

Upload a New File API endpoint does not work in EU orgs #81232

InterstellarStella opened this issue Nov 25, 2024 · 10 comments

Comments

@InterstellarStella
Copy link

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

Follow these docs to upload a .zip file to a Sentry org in the EU data center.

Expected Result

The file is uploaded.

Actual Result

We get the error:

{"detail":"The requested resource does not exist"}% 

Using the same command but for a US org works normally.

Product Area

APIs

Link

No response

DSN

No response

Version

No response

@getsantry
Copy link
Contributor

getsantry bot commented Nov 25, 2024

Assigning to @getsentry/support for routing ⏲️

@getsantry
Copy link
Contributor

getsantry bot commented Nov 25, 2024

Routing to @getsentry/product-owners-apis for triage ⏲️

@getsantry getsantry bot moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 25, 2024
@getsantry
Copy link
Contributor

getsantry bot commented Nov 26, 2024

Routing to @getsentry/product-owners-ingestion-and-filtering for triage ⏲️

@sentaur-athena
Copy link
Member

This API is owned by the ingest team. Re-routing

@jjbayer
Copy link
Member

jjbayer commented Nov 26, 2024

@InterstellarStella are you able to get a list of dsyms for your project? E.g. when i navigate to https://MY_ORG.sentry.io/api/0/projects/MY_ORG/MY_PROJECT/files/dsyms/ in the browser i get

[]

@InterstellarStella
Copy link
Author

@jjbayer I do get a list when I use this link in my US org, but I'll have to work on getting some debug files uploaded to my EU org too.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Nov 28, 2024
@jjbayer jjbayer self-assigned this Nov 28, 2024
@jjbayer
Copy link
Member

jjbayer commented Dec 3, 2024

I do get a list when I use this link in my US org, but I'll have to work on getting some debug files uploaded to my EU org too.

@InterstellarStella You can also just verify that you get an empty list in your EU org, that's what I did.

@jjbayer jjbayer removed their assignment Dec 3, 2024
@InterstellarStella
Copy link
Author

@jjbayer Yes, I do get an empty list.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Dec 4, 2024
@jjbayer
Copy link
Member

jjbayer commented Dec 5, 2024

I can confirm that for a US org, I get a different result than for a EU org:

# US returns a 500, that's an unrelated bug in the endpoint because I'm not uploading a valid ZIP:
$ curl  https://{MY_US_ORG}.sentry.io/api/0/projects/{MY_US_ORG}/python/files/dsyms/ -H 'Authorization: Bearer {MY_US_TOKEN}' -F file=/tmp/test-file
{"detail":"Internal Error","errorId":"f1b9e82ca740491b93473a850c00833f"}%

# EU returns a 401
$ curl  https://{MY_EU_ORG}.sentry.io/api/0/projects/{MY_EU_ORG}/python/files/dsyms/ -H 'Authorization: Bearer {MY_EU_TOKEN}' -F file=/tmp/test-file
{"detail":"Invalid org token"}%

The exception seems to be coming from

raise AuthenticationFailed("Invalid org token")
. @corps any idea what could be wrong here?

@getsantry getsantry bot removed the status in GitHub Issues with 👀 3 Dec 5, 2024
markstory added a commit that referenced this issue Dec 16, 2024
The file upload endpoints have special cased behavior for backwards
compatibility reasons that result in slug.sentry.io being pinned to the
US region. This can create confusing scenarios for customers in other
regions.

Refs #81232
markstory added a commit that referenced this issue Dec 16, 2024
Several of our files endpoints require usage of the region domains
instead of sentry.io or slug.sentry.io. Having the server context
defined in these endpoints will enable us to generate better example
code in the docs.

Refs #81232
markstory added a commit that referenced this issue Dec 16, 2024
The file upload endpoints have special cased behavior for backwards
compatibility reasons that result in slug.sentry.io being pinned to the
US region. This can create confusing scenarios for customers in other
regions.

Refs #81232
markstory added a commit that referenced this issue Dec 16, 2024
Several of our files endpoints require usage of the region domains
instead of sentry.io or slug.sentry.io. Having the server context
defined in these endpoints will enable us to generate better example
code in the docs.

Refs #81232
@jjbayer
Copy link
Member

jjbayer commented Dec 17, 2024

@InterstellarStella due to the particularities of our regional setup, requests to the /dsyms/ endpoint must go to https://{region}.sentry.io instead of https://{org}.sentry.io. @markstory is working on improving the docs around this.

I can confirm that I can successfully upload zip archives to my EU test org if I replace {MY_EU_ORG} with de:

curl  https://de.sentry.io/api/0/projects/{MY_EU_ORG}/python/files/dsyms/ \
-H 'Authorization: Bearer {MY_EU_TOKEN}' \
-F [email protected]

As input I zipped the file we use in tests: https://github.com/getsentry/sentry/blob/master/tests/sentry/models/fixtures/crash.dsym

Feel free to reopen if you encounter more issues.

@jjbayer jjbayer closed this as completed Dec 17, 2024
evanh pushed a commit that referenced this issue Dec 17, 2024
The file upload endpoints have special cased behavior for backwards
compatibility reasons that result in slug.sentry.io being pinned to the
US region. This can create confusing scenarios for customers in other
regions.

Refs #81232
evanh pushed a commit that referenced this issue Dec 17, 2024
Several of our files endpoints require usage of the region domains
instead of sentry.io or slug.sentry.io. Having the server context
defined in these endpoints will enable us to generate better example
code in the docs.

Refs #81232
markstory added a commit to getsentry/sentry-docs that referenced this issue Dec 17, 2024
Some of our endpoints require customers to use region domains in order
to have APIs work correctly across DE and US regions. I've already
updated those endpoints in getsentry/sentry#82159.

Refs getsentry/sentry#81232
markstory added a commit to getsentry/sentry-docs that referenced this issue Dec 17, 2024
Some of our endpoints require customers to use region domains in order
to have APIs work correctly across DE and US regions. I've already
updated those endpoints in getsentry/sentry#82159.

Refs getsentry/sentry#81232
@github-actions github-actions bot locked and limited conversation to collaborators Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants