Skip to content

Code / repository directory monitoring for triggering job subsets #17971

Answered by sryza
SgtGilly asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @SgtGilly the most relevant functionality in Dagster is that you can set code_versions on ops or software-defined assets. However, Dagster doesn't have the built-in functionality for automatically determining code versions based on the content of Python files, so it would be up to you to implement that.

E.g. you could do something like:

def get_file_hash(path: str) -> str:
    """Some code that loads the file contents as a string and computes its hash"""


@asset(code_version=get_file_hash(__file__))
def asset1():
    ...

Once you've assigned a code version to an asset, the UI will show you which assets have changed code versions since their latest materailization. And you can select t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sryza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants