bug-2037388: Implement the /upload/auth_info/ endpoint.#3311
Open
smarnach wants to merge 1 commit into
Open
Conversation
5f3b7f4 to
8c62795
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an /upload/auth_info/ endpoint intended to be used by the upload-symbols CLI tool.
The code is mostly straight-forward. The client-otel.py module exists for two reasons. First, as a container to hold the global OTel configuration provider, so we don't have to reinitialize the
IAMCredentialsClienton every request. Second, probably more importantly, as a way to inject a mock version of theIAMCredentialsClientfor tests.We will need to create new service accounts with permission to submit telemetry and give Tecken permissions to create access tokens for these service accounts, which will happen later. In the meantime, the /upload/auth_info/ endpoint won't include any OTel configuration.
As a minor deviation from the proposed JSON response in the bug, the token expiry time is returned as a Unix timestamp rather than a ISO-formatted time string. This API is meant for machine consumption, and a Unix timestamp is easier to consume for machines than a formatted string.
This PR depends on #3310. The migration needs to be deployed and manually run in both stage and prod before we can deploy this PR.