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

[bugfix] Make ScheduleDefinition.with_job pass tags correctly #26042

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

smackesey
Copy link
Collaborator

@smackesey smackesey commented Nov 20, 2024

Linear: https://linear.app/dagster-labs/issue/BUILD-435/fix-scheduledefinitionwith-updated-job

Summary & Motivation

Make ScheduleDefinition.with_updated_job correctly copy the tags on the ScheduleDefinition.

How I Tested These Changes

New unit test.

@smackesey smackesey marked this pull request as ready for review November 20, 2024 16:51
Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@smackesey smackesey force-pushed the sean/schedule-with-updated-job-pass-tags branch from b5d3172 to e7c1e7f Compare December 2, 2024 20:42
Copy link
Contributor

@jamiedemaria jamiedemaria left a comment

Choose a reason for hiding this comment

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

couple small comment things, but the change seems fine!

@@ -559,7 +559,7 @@ def with_updated_job(self, new_job: ExecutableDefinition) -> "ScheduleDefinition
required_resource_keys=self._raw_required_resource_keys,
run_config=None, # run_config, tags, should_execute encapsulated in execution_fn
Copy link
Contributor

Choose a reason for hiding this comment

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

is this comment incorrect then? maybe it's meant to be tags_fn?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@@ -559,7 +559,7 @@ def with_updated_job(self, new_job: ExecutableDefinition) -> "ScheduleDefinition
required_resource_keys=self._raw_required_resource_keys,
run_config=None, # run_config, tags, should_execute encapsulated in execution_fn
run_config_fn=None,
tags=None,
tags=self.tags,
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to this PR, but while you're here, i noticed that the docstring at line 546 uses the wrong param name

@smackesey smackesey force-pushed the sean/schedule-with-updated-job-pass-tags branch from e7c1e7f to 86bbb1f Compare December 4, 2024 14:55
@smackesey smackesey merged commit 4ab2e72 into master Dec 4, 2024
1 check was pending
@smackesey smackesey deleted the sean/schedule-with-updated-job-pass-tags branch December 4, 2024 14:56
cmpadden pushed a commit that referenced this pull request Dec 5, 2024
Linear:
https://linear.app/dagster-labs/issue/BUILD-435/fix-scheduledefinitionwith-updated-job

## Summary & Motivation

Make `ScheduleDefinition.with_updated_job` correctly copy the `tags` on
the `ScheduleDefinition`.

## How I Tested These Changes

New unit test.
pskinnerthyme pushed a commit to pskinnerthyme/dagster that referenced this pull request Dec 16, 2024
…r-io#26042)

Linear:
https://linear.app/dagster-labs/issue/BUILD-435/fix-scheduledefinitionwith-updated-job

## Summary & Motivation

Make `ScheduleDefinition.with_updated_job` correctly copy the `tags` on
the `ScheduleDefinition`.

## How I Tested These Changes

New unit test.
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