https://dagster.io/ logo
#ask-ai
Title
# ask-ai
d

David Takacs

03/04/2024, 2:47 PM
how do I modify a tag value once it's created? And can i do it throu the ExecuteJobResult class?
s

Scout

03/04/2024, 2:47 PM
The documentation does not provide a direct method for modifying a tag value once it's created through the
ExecuteJobResult
class. The
ExecuteJobResult
class is used for retrieving run success, events, and outputs from
execute_job
, and while it does provide access to the run's metadata, such as the run ID and job definition, it does not offer a method to modify tags post-execution. If you need to modify tags, you would typically do so before the job execution starts. Tags are often set when defining a job or when launching a run, and they are intended to be metadata that describes the run rather than mutable state. However, if you need to modify the behavior of a job based on certain conditions, such as a retry after a failure, you might consider designing your job to accept configuration that can be adjusted at runtime. This way, you can provide different configurations for each run, which can include different resource allocations or settings that might otherwise be controlled by tags. For modifying tags for retried operations, there is an open issue discussing the ability to change tags for retried ops, particularly in the context of allocating more resources in case of failure (e.g., OOMKilled event). This indicates that the feature is not currently supported but is recognized as a potential enhancement for future releases. If you have a specific use case or requirement to modify tags after a job has been executed, you might want to explore the Dagster API or the Dagit UI to see if there are any workarounds or if the feature has been introduced in a newer version beyond my knowledge cutoff date. Additionally, you can follow or contribute to discussions and issues on the Dagster GitHub repository to stay updated on this feature's development.
3 Views