Skip to content
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

Sign task-erred with run_id and reject outdated responses #7933

Merged
merged 15 commits into from Jul 4, 2023

Conversation

hendrikmakait
Copy link
Member

Closes #7489

  • Tests added / passed
  • Passes pre-commit run --all-files

@hendrikmakait hendrikmakait changed the title Sign task-erred with run_id and reject outdated responses # Sign task-erred with run_id and reject outdated responses Jun 19, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jun 19, 2023

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

       20 files  +       20         20 suites  +20   11h 27m 10s ⏱️ + 11h 27m 10s
  3 700 tests +  3 700    3 589 ✔️ +  3 589     106 💤 +   106  4 +4  1 🔥 +1 
35 787 runs  +35 787  34 033 ✔️ +34 033  1 748 💤 +1 748  5 +5  1 🔥 +1 

For more details on these failures and errors, see this check.

Results for commit 23259b1. ± Comparison against base commit cf97a7c.

♻️ This comment has been updated with latest results.

@hendrikmakait hendrikmakait marked this pull request as ready for review June 21, 2023 13:21
Copy link
Collaborator

@crusaderky crusaderky left a comment

Choose a reason for hiding this comment

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

Could use an extra test; but on the other hand it could be left to a separate PR

instructions.append(TaskErredMsg.from_task(ts, stimulus_id=ev.stimulus_id))
instructions.append(
TaskErredMsg.from_task(ts, run_id=ev.run_id, stimulus_id=ev.stimulus_id)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

coverage says we never test this use case.
This is not something you did; but would you mind taking the opportunity to add a unit test for it? It's a fairly big blind spot.

Copy link
Member

Choose a reason for hiding this comment

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

I'm not even sure if the code here is correct. I would assume that in this case (especially with the task-erred signing) this task should rather be released and recomputed instead of being reported erred.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed, I think that in this case as well as the case above for ts.state == "memory", we should probably recompute instead of acting based on the existing result. I will create a follow-up issue.

distributed/tests/test_cancelled_state.py Outdated Show resolved Hide resolved
Copy link
Member

@fjetter fjetter left a comment

Choose a reason for hiding this comment

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

Changes LGTM

I agree with @crusaderky that we should write a test for that one case but I suggest to do this in a separate PR. As it is, this PR is improving main and the additional edge case is an increase in scope, particularly since I'm not entirely certain if the current code is even correct.

Considering this is not urgent, I'll leave merging up to @hendrikmakait once he's back

instructions.append(TaskErredMsg.from_task(ts, stimulus_id=ev.stimulus_id))
instructions.append(
TaskErredMsg.from_task(ts, run_id=ev.run_id, stimulus_id=ev.stimulus_id)
)
Copy link
Member

Choose a reason for hiding this comment

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

I'm not even sure if the code here is correct. I would assume that in this case (especially with the task-erred signing) this task should rather be released and recomputed instead of being reported erred.

Co-authored-by: crusaderky <crusaderky@gmail.com>
@hendrikmakait hendrikmakait merged commit c6f451a into dask:main Jul 4, 2023
20 of 27 checks passed
@hendrikmakait hendrikmakait deleted the sign-task-erred branch July 4, 2023 15:15
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.

Sign task-erred with run_id and reject outdated responses
3 participants