-
Notifications
You must be signed in to change notification settings - Fork 10
chore(deps): bump django from 4.2.25 to 4.2.27 #595
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #595 +/- ##
==========================================
+ Coverage 93.85% 93.87% +0.01%
==========================================
Files 1284 1284
Lines 46528 46672 +144
Branches 1522 1524 +2
==========================================
+ Hits 43671 43813 +142
- Misses 2547 2548 +1
- Partials 310 311 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #595 will not alter performanceComparing Summary
Footnotes |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
pyproject.toml
Outdated
| "django-postgres-extra>=2.0.8", | ||
| "django-prometheus>=2.3.1", | ||
| "django>=4.2.25,<5.0.0", | ||
| "django=4.2.26,<5.0.0", |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| db_config["CONN_HEALTH_CHECKS"] = False | ||
| if "TEST" not in db_config: | ||
| db_config["TEST"] = {} | ||
| db_config["TEST"]["CONN_HEALTH_CHECKS"] = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Health check fix missing from API test settings
The CONN_HEALTH_CHECKS = False fix was applied only to shared.django_apps.settings_test, but codecov.settings_test (used for API tests) follows a different import chain through settings_dev → settings_base → db_settings, which does not include this override. If Django 4.2.26+ connection health checks interfere with test database setup/teardown as the comment indicates, API tests could still experience these issues since they inherit the default CONN_HEALTH_CHECKS = True from db_settings.
| if "TEST" not in db_config: | ||
| db_config["TEST"] = {} | ||
| db_config["TEST"]["CONN_HEALTH_CHECKS"] = False | ||
|
|
||
| # # Database | ||
| # # https://docs.djangoproject.com/en/4.2/ref/settings/#databases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: CodecovAPI tests will fail or hang due to CONN_HEALTH_CHECKS=True with Django 4.2.26+, as the fix in settings_test.py is not applied.
Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
The CodecovAPI application's test suite will run with CONN_HEALTH_CHECKS=True when using Django 4.2.26/4.2.27 because its settings inheritance chain does not include shared.django_apps.settings_test. This will cause database connection issues during test setup/teardown, leading to test failures or hangs. The pull request intended to set CONN_HEALTH_CHECKS=False for Django 4.2.26+ to avoid these issues, but the fix was not applied to CodecovAPI.
💡 Suggested Fix
Ensure apps/codecov-api/codecov/settings_test.py or its imported settings correctly inherit or explicitly set CONN_HEALTH_CHECKS=False for Django 4.2.26+ to prevent test failures.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: libs/shared/shared/django_apps/settings_test.py#L92-L97
Potential issue: The `CodecovAPI` application's test suite will run with
`CONN_HEALTH_CHECKS=True` when using Django 4.2.26/4.2.27 because its settings
inheritance chain does not include `shared.django_apps.settings_test`. This will cause
database connection issues during test setup/teardown, leading to test failures or
hangs. The pull request intended to set `CONN_HEALTH_CHECKS=False` for Django 4.2.26+ to
avoid these issues, but the fix was not applied to `CodecovAPI`.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 5891920
Bumps django to >=
4.2.26(in this case4.2.2.7)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.
Note
Updates Django to >=4.2.26 (resolved to 4.2.27) and disables DB connection health checks in test settings, with minor test/cassette cleanups.
djangoconstraint to>=4.2.26,<5.0.0(resolved to4.2.27) acrosspyproject.toml,libs/shared/pyproject.toml, anduv.lock.shared/django_apps/settings_test.py, setDATABASES[*].CONN_HEALTH_CHECKS = FalseandTEST.CONN_HEALTH_CHECKS = Falseto avoid issues in tests.@respx.mockfrom two tests inapps/worker/tasks/tests/unit/test_sync_repos_task.py./in.../test_simple_call_status_and_notifiers.yaml.Written by Cursor Bugbot for commit d9fb1b0. This will update automatically on new commits. Configure here.