Skip to content

Fix intermittent failure in backend teardown integration test - #10662

Merged
auvipy merged 5 commits into
celery:mainfrom
phanky1:backend-leak
Sep 18, 2026
Merged

auvipy merged 5 commits into
celery:mainfrom
phanky1:backend-leak

Conversation

@phanky1

@phanky1 phanky1 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR updates the backend teardown regression test to track Redis backend sockets using weak references and check that some are reclaimed during repeated fixture cycles.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The test stabilization changes address intermittent teardown failures with no unresolved review issues.

Pull request overview

Stabilizes the backend teardown integration test by explicitly triggering garbage collection and tightening the leak assertion.

Changes:

  • Calls gc.collect() before measuring file-descriptor growth.
  • Requires no descriptor growth after repeated fixture cycles.
File summaries
File Description
t/integration/test_backend_leak_in_fixture_teardown.py Makes backend connection cleanup verification deterministic.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.12%. Comparing base (23dc22d) to head (88ce655).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10662      +/-   ##
==========================================
- Coverage   89.13%   89.12%   -0.01%     
==========================================
  Files         153      153              
  Lines       20257    20257              
  Branches     2395     2395              
==========================================
- Hits        18056    18055       -1     
  Misses       1898     1898              
- Partials      303      304       +1     
Flag Coverage Δ
unittests 89.10% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused change removes reliance on nondeterministic garbage-collection timing.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@auvipy
auvipy self-requested a review September 17, 2026 16:12
@auvipy auvipy added this to the 5.7.0 milestone Sep 17, 2026
@auvipy

auvipy commented Sep 17, 2026

Copy link
Copy Markdown
Member

lets wait for the CI

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused test change correctly isolates backend socket reclamation without retaining the resources under test.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@auvipy

auvipy commented Sep 17, 2026

Copy link
Copy Markdown
Member

i was about to suggest kind of related change suggested by my copilot analysis

@phanky1

phanky1 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor Author

lets wait for the CI

These smoke tests still fail because the current requirement, billiard>=4.2.1,<5.0, still allows billiard 4.3.0.

ảnh

@auvipy

auvipy commented Sep 17, 2026

Copy link
Copy Markdown
Member

so the billiard new release has the source of new regressions or incompatibility? @GangEunzzang

@auvipy

auvipy commented Sep 17, 2026

Copy link
Copy Markdown
Member

also the smoke tests taking so long to execute is not a great sign

@auvipy

auvipy commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

lets try billiard 4.3.0rc1 to see if that can stablize or not, otherwise will roll back to 4.2.x https://github.com/celery/celery/pull/10659/changes

@phanky1

phanky1 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

lets try billiard 4.3.0rc1 to see if that can stablize or not, otherwise will roll back to 4.2.x https://github.com/celery/celery/pull/10659/changes

I've tried Billiard 4.3.0rc1, and the entire test suite passed twice.

@auvipy

auvipy commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Ok so my one with billiard 4.3.0rc1 failed as it didnt have the change of this pr @GangEunzzang

@auvipy
auvipy merged commit 4b36594 into celery:main Sep 18, 2026
17 of 19 checks passed
@phanky1
phanky1 deleted the backend-leak branch September 18, 2026 11:22
@GangEunzzang

Copy link
Copy Markdown
Contributor

@auvipy Yes, the teardown failure was separate from the Billiard 4.3.0 smoke failures; this PR addressed the former, and #10667 fixed the shutdown and SystemExit cases.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants