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

[Jobs] Refactor: Extract task failure state update helper #4185

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

andylizf
Copy link
Contributor

Extract repeated task failure state update logic into _update_failed_task_state() helper to reduce code duplication.

          Good catch! Could submit this change to master first.

Originally posted by @cblmemo in #4128 (comment)

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: conda deactivate; bash -i tests/backward_compatibility_tests.sh

@andylizf andylizf marked this pull request as ready for review October 26, 2024 03:30
@andylizf andylizf changed the title refactor: Extract task failure state update helper [Jobs] Refactor: Extract task failure state update helper Oct 26, 2024
@andylizf
Copy link
Contributor Author

@cblmemo PTAL, thanks!

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @andylizf ! Left a discussion.

Comment on lines 384 to 385
if task_id is None:
return
Copy link
Collaborator

Choose a reason for hiding this comment

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

In what case will we enter this branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Thanks for pointing out.

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks for the prompt fix @andylizf ! LGTM.

@cblmemo cblmemo added this pull request to the merge queue Oct 26, 2024
Merged via the queue into skypilot-org:master with commit c0c1748 Oct 26, 2024
20 checks passed
@cblmemo cblmemo deleted the refactor-except branch October 26, 2024 23:36
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