feat: support new tokenless protocol#447
Conversation
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
3 similar comments
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
|
Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time. ❌ Failed Test Results:Completed 3455 tests with View the full list of failed tests
|
b03ad4a to
0de0517
Compare
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
1 similar comment
❌ Failed Test Results:Completed 693 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
1 similar comment
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
| if is_fork_pr(pull_dict): | ||
| headers = {"X-Tokenless": pull_dict["head"]["slug"], "X-Tokenless-PR": pr} | ||
| branch = pull_dict["head"]["slug"] + ":" + branch | ||
| tokenless = os.environ.get |
There was a problem hiding this comment.
I think this is missing an arg?
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
1 similar comment
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
1 similar comment
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
568ac88 to
e5f9f17
Compare
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
2 similar comments
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
| } | ||
| else: | ||
| headers = get_token_header_or_fail(token) | ||
| headers = get_token_header(token) |
There was a problem hiding this comment.
Why are some commands using get_token_header vs get_token_header_or_fail? How do we know when to use which?
There was a problem hiding this comment.
get_token_header is for supporting tokenless, if someone tries to upload using tokenless get_token_header_or_fail just fails and prevents them from doing anything
There was a problem hiding this comment.
Ahh that makes sense, worth leaving another comment here? 😅
| if is_fork_pr(pull_dict): | ||
| headers = {"X-Tokenless": pull_dict["head"]["slug"], "X-Tokenless-PR": pr} | ||
| branch = pull_dict["head"]["slug"] + ":" + branch | ||
| tokenless = os.environ.get("TOKENLESS") |
There was a problem hiding this comment.
gonna leave a comment explaining this but this is how the CLI receives the username of the user to whom the fork belongs to and the branch name from the action
There was a problem hiding this comment.
that makes sense, a comment here would be pretty helpful thanks
adrian-codecov
left a comment
There was a problem hiding this comment.
Some questions, otherwise very excited for this 👀
We no longer have to send the X-Tokenless header anymore. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
we no longer want to make the github API call to check if the current ref we are uploading from is a PR to determine what to set the tokenless header to. It's no longer necessary and all that is needed for tokenless is to pass the correct branch name (containing a ':') to the create commit step so that tokenless works. The CLI will automatically check if the TOKENLESS env var has been set by the action. The action will set this env var when it detects it's running on a fork. Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
adrian-codecov
left a comment
There was a problem hiding this comment.
Lgtm! Did you confirm with @thomasrockhu-codecov that this is covered? #447 (comment)
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
4 similar comments
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
4 similar comments
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
4 similar comments
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
❌ Failed Test Results:Completed 691 tests with View the full list of failed tests
|
it's no longer necessary for us to use the
X-Tokenless header to provide tokenless
information to the API, the information in the
regular request bodies will suffice.