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

feat: adjust for tokenless v3 #434

Closed
wants to merge 3 commits into from
Closed

feat: adjust for tokenless v3 #434

wants to merge 3 commits into from

Conversation

joseph-sentry
Copy link
Contributor

we are no longer sending the X-Tokenless-PR header and we are changing the format of the contents of the X-Tokenless header

The X-Tokenless header will now be set to <fork user name>:<branch name> and will be the only extra header we send for tokenless requests. We get the value of this header from the TOKENLESS environment variable that will be set by the Codecov action.

Copy link

github-actions bot commented May 6, 2024

❌ Failed Test Results:

Completed 666 tests with 1 failed, 665 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

3 similar comments
Copy link

github-actions bot commented May 6, 2024

❌ Failed Test Results:

Completed 666 tests with 1 failed, 665 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 6, 2024

❌ Failed Test Results:

Completed 666 tests with 1 failed, 665 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 6, 2024

❌ Failed Test Results:

Completed 666 tests with 1 failed, 665 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

codecov bot commented May 6, 2024

Test Failures Detected: Due to failing tests, we cannot provide coverage reports at this time.

❌ Failed Test Results:

Completed 2668 tests with 4 failed, 2664 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.8
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.9
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.10
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError
Testsuite:
pytest

Test name:
api.temp.calculator.test_calculator::test_divide

Envs:
- python3.11
def
test_divide():
> assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = <function Calculator.divide at 0x104c9eb90>(1, 2)
E + where <function Calculator.divide at 0x104c9eb90> = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 6, 2024

❌ Failed Test Results:

Completed 666 tests with 1 failed, 665 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

3 similar comments
Copy link

github-actions bot commented May 6, 2024

❌ Failed Test Results:

Completed 666 tests with 1 failed, 665 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 6, 2024

❌ Failed Test Results:

Completed 666 tests with 1 failed, 665 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 6, 2024

❌ Failed Test Results:

Completed 666 tests with 1 failed, 665 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@@ -13,15 +13,6 @@
@click.option(
"--code", help="The code of the report. If unsure, leave default", default="default"
)
@click.option(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a breaking change. I think that users that run the CLI in a workflow_dispatch need this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just don't know if it makes sense for the create-report command

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh I see, that does make sense. however, we should probably for now make it a deprecated field

@@ -95,6 +96,15 @@ def get_token_header_or_fail(token: str) -> dict:
return {"Authorization": f"token {token}"}


def get_auth_header(token):
tokenless = os.environ.get("TOKENLESS", None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we making this change for the orb and step too? Why doesn't the CLI just do this itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think the CLI has access to the same context as the action but i can double check, but you are correct we should make a similar change the the orb and step as well

Copy link

github-actions bot commented May 8, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

3 similar comments
Copy link

github-actions bot commented May 8, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 8, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 8, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

codecov_cli/commands/report.py Outdated Show resolved Hide resolved
@@ -18,7 +18,7 @@
"--pr",
"--pull-request-number",
"pull_request_number",
help="Specify the pull request number mannually. Used to override pre-existing CI environment variables",
help="Deprecated option, this option has no effect on the execution of this command anymore. Specify the pull request number mannually. Used to override pre-existing CI environment variables",
cls=CodecovOption,
fallback_field=FallbackFieldEnum.pull_request_number,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we don't need this anymore either

Copy link

github-actions bot commented May 9, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

3 similar comments
Copy link

github-actions bot commented May 9, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 9, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 9, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

@joseph-sentry joseph-sentry requested review from a team and removed request for a team May 9, 2024 15:24
joseph-sentry and others added 3 commits May 9, 2024 11:24
we are no longer sending the X-Tokenless-PR header and we are changing
the format of the contents of the X-Tokenless header

Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
Co-authored-by: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com>
Copy link

github-actions bot commented May 9, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

1 similar comment
Copy link

github-actions bot commented May 9, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

Copy link

github-actions bot commented May 9, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

1 similar comment
Copy link

github-actions bot commented May 9, 2024

❌ Failed Test Results:

Completed 667 tests with 1 failed, 666 passed and 0 skipped.

View the full list of failed tests
Test Description Failure message
Testsuite:
api.temp.calculator.test_calculator::test_divide

Test name:
pytest
def
test_divide():
&gt; assert Calculator.divide(1, 2) == 0.5
E assert 1.0 == 0.5
E + where 1.0 = &lt;function Calculator.divide at 0x104c9eb90&gt;(1, 2)
E + where &lt;function Calculator.divide at 0x104c9eb90&gt; = Calculator.divide
.../temp/calculator/test_calculator.py:30: AssertionError

pull_dict = get_pull(service, decoded_slug, pr) if not token else None
if is_fork_pr(pull_dict):
headers = {"X-Tokenless": pull_dict["head"]["slug"], "X-Tokenless-PR": pr}
branch = pull_dict["head"]["slug"] + ":" + branch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we still need this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants