Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Conversation

@adrian-codecov
Copy link
Contributor

Purpose/Motivation

What is the feature? Why is this being done?
Seemingly we don't check for timeseries enabled in API while we do so in worker. This has worked so far cause our pods define that variable. This actually reads from your config file and makes it dynamic for people not wanting to opt to the feature.

I defaulted to false but please let me know if that's a wrong assumption.

Screenshot 2024-12-19 at 1 32 05 PM

Links to relevant tickets

codecov/engineering-team#1514

@codecov-notifications
Copy link

codecov-notifications bot commented Dec 19, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2665 1 2664 6
View the top 1 failed tests by shortest run time
billing/tests/test_views.py::StripeWebhookHandlerTests::test_customer_subscription_deleted_deactivates_all_repos_multiple_owner
Stack Traces | 0.081s run time
self = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos_multiple_owner>

    def test_customer_subscription_deleted_deactivates_all_repos_multiple_owner(self):
        self.add_second_owner()
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
    
        self.owner.refresh_from_db()
        self.other_owner.refresh_from_db()
    
        assert (
            self.owner.repository_set.filter(activated=True, active=True).count() == 3
        )
>       assert (
            self.other_owner.repository_set.filter(activated=True, active=True).count()
            == 3
        )
E       assert 2 == 3
E        +  where 2 = <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>>()
E        +    where <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>> = <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>.count
E        +      where <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]> = <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>>(activated=True, active=True)
E        +        where <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>> = <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>.filter
E        +          where <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970> = <Owner: Owner<github/ireed>>.repository_set
E        +            where <Owner: Owner<github/ireed>> = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos_multiple_owner>.other_owner

billing/tests/test_views.py:424: 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 Dec 19, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2665 1 2664 6
View the top 1 failed tests by shortest run time
billing/tests/test_views.py::StripeWebhookHandlerTests::test_customer_subscription_deleted_deactivates_all_repos_multiple_owner
Stack Traces | 0.081s run time
self = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos_multiple_owner>

    def test_customer_subscription_deleted_deactivates_all_repos_multiple_owner(self):
        self.add_second_owner()
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
    
        self.owner.refresh_from_db()
        self.other_owner.refresh_from_db()
    
        assert (
            self.owner.repository_set.filter(activated=True, active=True).count() == 3
        )
>       assert (
            self.other_owner.repository_set.filter(activated=True, active=True).count()
            == 3
        )
E       assert 2 == 3
E        +  where 2 = <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>>()
E        +    where <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>> = <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>.count
E        +      where <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]> = <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>>(activated=True, active=True)
E        +        where <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>> = <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>.filter
E        +          where <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970> = <Owner: Owner<github/ireed>>.repository_set
E        +            where <Owner: Owner<github/ireed>> = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos_multiple_owner>.other_owner

billing/tests/test_views.py:424: AssertionError

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

@codecov-public-qa
Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2665 1 2664 6
View the top 1 failed tests by shortest run time
billing/tests/test_views.py::StripeWebhookHandlerTests::test_customer_subscription_deleted_deactivates_all_repos_multiple_owner
Stack Traces | 0.081s run time
self = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos_multiple_owner>

    def test_customer_subscription_deleted_deactivates_all_repos_multiple_owner(self):
        self.add_second_owner()
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
    
        self.owner.refresh_from_db()
        self.other_owner.refresh_from_db()
    
        assert (
            self.owner.repository_set.filter(activated=True, active=True).count() == 3
        )
>       assert (
            self.other_owner.repository_set.filter(activated=True, active=True).count()
            == 3
        )
E       assert 2 == 3
E        +  where 2 = <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>>()
E        +    where <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>> = <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>.count
E        +      where <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]> = <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>>(activated=True, active=True)
E        +        where <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>> = <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>.filter
E        +          where <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970> = <Owner: Owner<github/ireed>>.repository_set
E        +            where <Owner: Owner<github/ireed>> = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos_multiple_owner>.other_owner

billing/tests/test_views.py:424: AssertionError

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

@github-actions
Copy link
Contributor

✅ All tests successful. No failed tests were found.

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

@trent-codecov
Copy link
Contributor

dc30d7f

https://github.com/codecov/shared/blob/main/shared/django_apps/db_settings.py#L52

Looks like we did this intentionally to defer it to shared. Is that not working?

@adrian-codecov
Copy link
Contributor Author

You are correct, this also is working. Correct work in this PR codecov/worker#975. Closing this one.

@codecov
Copy link

codecov bot commented Dec 19, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
2665 1 2664 6
View the top 1 failed tests by shortest run time
billing/tests/test_views.py::StripeWebhookHandlerTests::test_customer_subscription_deleted_deactivates_all_repos_multiple_owner
Stack Traces | 0.081s run time
self = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos_multiple_owner>

    def test_customer_subscription_deleted_deactivates_all_repos_multiple_owner(self):
        self.add_second_owner()
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
        RepositoryFactory(author=self.other_owner, activated=True, active=True)
    
        self.owner.refresh_from_db()
        self.other_owner.refresh_from_db()
    
        assert (
            self.owner.repository_set.filter(activated=True, active=True).count() == 3
        )
>       assert (
            self.other_owner.repository_set.filter(activated=True, active=True).count()
            == 3
        )
E       assert 2 == 3
E        +  where 2 = <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>>()
E        +    where <bound method QuerySet.count of <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>> = <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]>.count
E        +      where <RepositoryQuerySet [<Repository: Repo<Owner<github/ireed>/vote>>, <Repository: Repo<Owner<github/ireed>/yeah>>]> = <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>>(activated=True, active=True)
E        +        where <bound method QuerySet.filter of <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>> = <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970>.filter
E        +          where <django.db.models.fields.related_descriptors.create_reverse_many_to_one_manager.<locals>.RelatedManager object at 0x7f3ee07b9970> = <Owner: Owner<github/ireed>>.repository_set
E        +            where <Owner: Owner<github/ireed>> = <billing.tests.test_views.StripeWebhookHandlerTests testMethod=test_customer_subscription_deleted_deactivates_all_repos_multiple_owner>.other_owner

billing/tests/test_views.py:424: AssertionError

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants