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

Update shared to fix repo language validation #1079

Closed
wants to merge 1 commit into from

Conversation

michelletran-codecov
Copy link
Contributor

Purpose/Motivation

The repo language validation is only validating only a subset of the languages that are supported. This fixes it so that the validation list is the same as the supported values on the database.

Links to relevant tickets

codecov/engineering-team#2061

What does this PR do?

Include a brief description of the changes in this PR. Bullet points are your friend.

Notes to Reviewer

Anything to note to the team? Any tips on how to review, or where to start?

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link
Contributor

github-actions bot commented Jan 2, 2025

This PR includes changes to shared. Please review them here: codecov/shared@abc6b36...7935e52

@michelletran-codecov michelletran-codecov marked this pull request as ready for review January 2, 2025 15:13
@michelletran-codecov michelletran-codecov requested review from a team January 2, 2025 15:14
@codecov-staging
Copy link

codecov-staging bot commented Jan 2, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2674 1 2673 6
View the top 1 failed tests by shortest run time
codecov_auth/tests/unit/test_repo_authentication.py::TestUploadTokenRequiredAuthenticationCheck::test_token_not_required_unknown_repository
Stack Traces | 0.014s run time
self = <codecov_auth.tests.unit.test_repo_authentication.TestUploadTokenRequiredAuthenticationCheck object at 0x7ffb0bde5ee0>
db = None

    def test_token_not_required_unknown_repository(self, db):
        an_owner = OwnerFactory(upload_token_required_for_public_repos=False)
        # their repo
        RepositoryFactory(author=an_owner, private=False)
        request_uri = f"/upload/github/{an_owner.username}::::bad/commits"
        request = APIRequestFactory().post(
            request_uri, {"branch": "branch"}, format="json"
        )
        authentication = UploadTokenRequiredAuthenticationCheck()
        res = authentication.authenticate(request)
>       assert res is None
E       assert (<codecov_auth.authentication.types.RepositoryAsUser object at 0x7ffae03ca240>, <codecov_auth.authentication.repo_auth.TokenlessAuth object at 0x7ffae0b735c0>) is None

.../tests/unit/test_repo_authentication.py:586: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented Jan 2, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2674 1 2673 6
View the top 1 failed tests by shortest run time
codecov_auth/tests/unit/test_repo_authentication.py::TestUploadTokenRequiredAuthenticationCheck::test_token_not_required_unknown_repository
Stack Traces | 0.014s run time
self = <codecov_auth.tests.unit.test_repo_authentication.TestUploadTokenRequiredAuthenticationCheck object at 0x7ffb0bde5ee0>
db = None

    def test_token_not_required_unknown_repository(self, db):
        an_owner = OwnerFactory(upload_token_required_for_public_repos=False)
        # their repo
        RepositoryFactory(author=an_owner, private=False)
        request_uri = f"/upload/github/{an_owner.username}::::bad/commits"
        request = APIRequestFactory().post(
            request_uri, {"branch": "branch"}, format="json"
        )
        authentication = UploadTokenRequiredAuthenticationCheck()
        res = authentication.authenticate(request)
>       assert res is None
E       assert (<codecov_auth.authentication.types.RepositoryAsUser object at 0x7ffae03ca240>, <codecov_auth.authentication.repo_auth.TokenlessAuth object at 0x7ffae0b735c0>) is None

.../tests/unit/test_repo_authentication.py:586: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2673 1 2672 6
View the top 1 failed tests by shortest run time
codecov_auth/tests/unit/test_repo_authentication.py::TestUploadTokenRequiredAuthenticationCheck::test_token_not_required_unknown_repository
Stack Traces | 0.014s run time
self = <codecov_auth.tests.unit.test_repo_authentication.TestUploadTokenRequiredAuthenticationCheck object at 0x7ffb0bde5ee0>
db = None

    def test_token_not_required_unknown_repository(self, db):
        an_owner = OwnerFactory(upload_token_required_for_public_repos=False)
        # their repo
        RepositoryFactory(author=an_owner, private=False)
        request_uri = f"/upload/github/{an_owner.username}::::bad/commits"
        request = APIRequestFactory().post(
            request_uri, {"branch": "branch"}, format="json"
        )
        authentication = UploadTokenRequiredAuthenticationCheck()
        res = authentication.authenticate(request)
>       assert res is None
E       assert (<codecov_auth.authentication.types.RepositoryAsUser object at 0x7ffae03ca240>, <codecov_auth.authentication.repo_auth.TokenlessAuth object at 0x7ffae0b735c0>) is None

.../tests/unit/test_repo_authentication.py:586: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Copy link
Contributor

github-actions bot commented Jan 2, 2025

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

Copy link

codecov bot commented Jan 2, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2674 1 2673 6
View the top 1 failed tests by shortest run time
codecov_auth/tests/unit/test_repo_authentication.py::TestUploadTokenRequiredAuthenticationCheck::test_token_not_required_unknown_repository
Stack Traces | 0.014s run time
self = <codecov_auth.tests.unit.test_repo_authentication.TestUploadTokenRequiredAuthenticationCheck object at 0x7ffb0bde5ee0>
db = None

    def test_token_not_required_unknown_repository(self, db):
        an_owner = OwnerFactory(upload_token_required_for_public_repos=False)
        # their repo
        RepositoryFactory(author=an_owner, private=False)
        request_uri = f"/upload/github/{an_owner.username}::::bad/commits"
        request = APIRequestFactory().post(
            request_uri, {"branch": "branch"}, format="json"
        )
        authentication = UploadTokenRequiredAuthenticationCheck()
        res = authentication.authenticate(request)
>       assert res is None
E       assert (<codecov_auth.authentication.types.RepositoryAsUser object at 0x7ffae03ca240>, <codecov_auth.authentication.repo_auth.TokenlessAuth object at 0x7ffae0b735c0>) is None

.../tests/unit/test_repo_authentication.py:586: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@michelletran-codecov
Copy link
Contributor Author

Test was flaky. I reran it in CI and it passed. I'm not sure why it's not updating the comment.

@michelletran-codecov
Copy link
Contributor Author

Released in another PR.

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.

2 participants