Skip to content

Update kombu version to 5.7.0a1 - #10677

Merged
auvipy merged 1 commit into
mainfrom
kombu57
Sep 21, 2026
Merged

auvipy merged 1 commit into
mainfrom
kombu57

Conversation

@auvipy

@auvipy auvipy commented Sep 21, 2026

Copy link
Copy Markdown
Member

No description provided.

@auvipy auvipy added this to the 5.7.0 milestone Sep 21, 2026
@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.28%. Comparing base (263584b) to head (230a311).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10677   +/-   ##
=======================================
  Coverage   89.28%   89.28%           
=======================================
  Files         153      153           
  Lines       20391    20391           
  Branches     2430     2430           
=======================================
  Hits        18206    18206           
  Misses       1881     1881           
  Partials      304      304           
Flag Coverage Δ
unittests 89.26% <ø> (ø)

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.

@auvipy
auvipy marked this pull request as ready for review September 21, 2026 10:44
@blacksmith-sh

blacksmith-sh Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Found 3 test failures on Blacksmith runners:

Failures

Test View Logs
test_chord/
test_chord_error_propagation_with_different_body_types[celery_setup_worker-celery_rabbi
tmq_broker-celery_redis_backend-body is a group]
View Logs
test_chord/
test_chord_error_propagation_with_different_body_types[celery_setup_worker-celery_rabbi
tmq_broker-celery_redis_backend-body is a group]
View Logs
test_chord/
test_chord_error_propagation_with_different_body_types[celery_setup_worker-celery_rabbi
tmq_broker-celery_redis_backend-body is a group]
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@auvipy

auvipy commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

The job is failing consistently in the Redis-backend smoke test for the group-body chord case:

  • The header contains one successful task and one failing task.
  • Redis correctly detects the header failure and creates a ChordError.
  • Error handling then revokes the two tasks belonging to the group body.
  • result.get() observes TaskRevokedError: revoked, while the test expects the original ExpectedException.

The failure is therefore in chord error propagation for a group callback, not in Redis startup or the GitHub Actions configuration.

Relevant code:

Recommended fix

Update the common chord-error handler, rather than the Redis backend, so a group callback is failed with the original chord exception instead of being revoked.

The relevant logic is called here:

except ChordError as exc:
    logger.exception('Chord %r raised: %r', request.group, exc)
    return self.chord_error_from_stack(callback, exc)

chord_error_from_stack() should special-case a group callback:

def chord_error_from_stack(self, callback, exc=None):
    callback = maybe_signature(callback, app=self.app)

    # A group callback has no single task result to fail. Propagate the
    # chord failure to each child result instead of revoking the children.
    if isinstance(callback, group):
        for child in callback.tasks:
            child = maybe_signature(child, app=self.app)

            if child.id is None:
                child.freeze()

            self.mark_as_failure(
                child.id,
                exc,
                request=Context(
                    id=child.id,
                    group=callback.options.get("group"),
                ),
            )
        return

    # Existing handling for single-task, chain, and chord callbacks.
    return self._chord_error_from_stack(callback, exc)

Use the project’s existing request/context construction and error serialization helpers rather than introducing a new Context shape if base.py already has an internal helper for this. The important behavior is:

  1. Preserve the original exception as the failure result.
  2. Assign IDs to group-body signatures before storing results.
  3. Do not revoke group-body result IDs when the header has failed.
  4. Leave the existing single-task, chain, and nested-chord handling unchanged.

If the current implementation deliberately revokes body tasks to prevent execution, the equivalent safer implementation is to revoke them only after storing a FAILURE result for each child. Otherwise GroupResult.get() will always surface TaskRevokedError instead of the header exception.

Add a regression assertion covering the failing body type:

with pytest.raises(ExpectedException, match="Task expected to fail"):
    result.get(timeout=RESULT_TIMEOUT)

The existing test already covers this scenario; once group callback error propagation stores the original failure instead of producing revoked child results, the 3.13-smoke job should pass without changing the workflow or increasing retries.

@auvipy

auvipy commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@phanky1 is this failure related to your finding in a redis related merged pr here #10671? or it is unrelated

@auvipy

auvipy commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@GangEunzzang do you have time working on the fix? or investigate the kombu compatibility issues?

@GangEunzzang

Copy link
Copy Markdown
Contributor

@auvipy Yes, looking into it now.

@GangEunzzang

Copy link
Copy Markdown
Contributor

@auvipy Looked into the body is a group failure. It isn't a Kombu incompatibility as such: the same test fails for me locally with Kombu 5.6.2 too, and the worker log shows why. On a header failure _handle_group_chord_error revokes the body task ids and then stores FAILURE for each of them, but since #9869 the worker's revoke handler also writes REVOKED to the backend for any id it isn't running, and it does that ~15ms later from the main process. Whichever write lands last wins, so the client sees TaskRevokedError instead of the header's exception. Kombu 5.7.0a1 just shifts the broadcast timing enough for that to lose on CI.

Skipping the REVOKED write in _revoke when the backend already holds a ready state fixes it here: the failing case passes 3/3 with 5.7.0a1 (it failed every time before), the other body types still pass, and t/unit/worker is unchanged. I have that ready as a PR against main if you agree; the version bump itself looks fine.

@auvipy

auvipy commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

please come with the pr

@auvipy
auvipy merged commit 1ba6258 into main Sep 21, 2026
387 of 393 checks passed
@auvipy
auvipy deleted the kombu57 branch September 21, 2026 12:19
@auvipy

auvipy commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

intentionally merging this. lets fix the CI failures in another pr

@GangEunzzang

Copy link
Copy Markdown
Contributor

Opened as #10679.

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