Fix race condition in test_prompt_webhook_with_mixed_events#18859
Merged
harupy merged 3 commits intomlflow:masterfrom Nov 17, 2025
Merged
Fix race condition in test_prompt_webhook_with_mixed_events#18859harupy merged 3 commits intomlflow:masterfrom
test_prompt_webhook_with_mixed_events#18859harupy merged 3 commits intomlflow:masterfrom
Conversation
The test was failing due to a race condition where webhooks were being delivered out of order. The test assumed webhooks would arrive in the exact sequential order they were triggered, but webhook processing is asynchronous. Failed CI job: https://github.com/mlflow/mlflow/actions/runs/19416355823/job/55545319550?pr=18858 Error message: AssertionError: assert {'description...t/model', ...} == {'description...', 'tags': {}} Differing items: {'description': None} != {'description': 'Prompt description'} {'name': 'regular_model'} != {'name': 'test_prompt_mixed'} The fix sorts both the expected and actual webhook payloads before comparison, making the test order-independent while still verifying all expected webhooks are delivered correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
403f090 to
af1a01d
Compare
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
test_prompt_webhook_with_mixed_events
mprahl
pushed a commit
to opendatahub-io/mlflow
that referenced
this pull request
Nov 21, 2025
…#18859) Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Tian-Sky-Lan
pushed a commit
to Tian-Sky-Lan/mlflow
that referenced
this pull request
Nov 24, 2025
…#18859) Signed-off-by: harupy <17039389+harupy@users.noreply.github.com> Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues/PRs
Fixes flaky test failure from https://github.com/mlflow/mlflow/actions/runs/19416355823/job/55545319550?pr=18858
What changes are proposed in this pull request?
Fix a race condition in the
test_prompt_webhook_with_mixed_eventstest where webhooks were being delivered out of order, causing intermittent test failures.The test was assuming webhooks would arrive in sequential order, but webhook processing is asynchronous. The failure manifested as:
The fix sorts both expected and actual webhook payloads before comparison, making the test order-independent while still verifying all expected webhooks are delivered.
How is this PR tested?
Verified that
test_prompt_webhook_with_mixed_eventsand all other webhook tests pass consistently.Does this PR require documentation update?
Release Notes
Is this a user-facing change?
How should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionShould this PR be included in the next patch release?
🤖 Generated with Claude Code