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

worker: Log which outputs are missing when task is unexpectedly incomplete #3258

Merged
merged 2 commits into from Oct 21, 2023

Conversation

progval
Copy link
Contributor

@progval progval commented Oct 17, 2023

Motivation and Context

When a task ran but did not write all its outputs, Luigi errors with:

RuntimeError: Unfulfilled dependency at run time: NodeProperties_graph__tmp_pytest_of_d_cnt_dir_rev_rel__02a93cea21

which can be hard to debug for tasks with many outputs. After this PR, it lists which outputs are missing. For example:

RuntimeError: Unfulfilled dependency at run time: NodeProperties_graph__tmp_pytest_of_d_cnt_dir_rev_rel__02a93cea21 (/tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.committer_timestamp.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.message.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.tag_name.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.content.is_skipped.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.tag_name.offset.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.committer_id.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.content.length.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.author_id.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.message.offset.bin, /tmp/pytest-of-dev/pytest-512/test_compressgraph_None_0/compressed_graph/graph.property.committer_timestamp_offset.bin)

Description

I implemented a basic __str__ for all target types, using either the path if it's filesystem-like, or a table name for database-like targets (to be consistent with BigQueryTarget).

Have you tested this? If so, how?

Unit tests are not broken, and this works for me (only tested with local filesystem)

@progval progval requested review from dlstadther and a team as code owners October 17, 2023 13:11
Copy link
Collaborator

@dlstadther dlstadther 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 submitting this quality of life improvement.
I do have a couple comments/questions.

luigi/contrib/sqla.py Outdated Show resolved Hide resolved
luigi/contrib/mongodb.py Outdated Show resolved Hide resolved
luigi/worker.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@dlstadther dlstadther merged commit d86b97e into spotify:master Oct 21, 2023
37 of 38 checks passed
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.

None yet

2 participants