-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
update idempotency key for scheduled runs to disambiguate schedules #17123
Conversation
CodSpeed Performance ReportMerging #17123 will not alter performanceComparing Summary
|
accept defeat
68c7956
to
4acf27b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits, but the fix looks good!
src/prefect/_result_records.py
Outdated
def coerce_old_format(cls, value: dict[str, Any]) -> dict[str, Any]: | ||
if isinstance(value, dict): # type: ignore[reportUnnecessaryIsInstance] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worthwhile to keep this typing since the value can be Any
.
@@ -149,7 +149,7 @@ | |||
|
|||
|
|||
@overload | |||
def get_client( | |||
def get_client( # type: ignore # TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed when we merge the pyproject migration.
src/prefect/_result_records.py
Outdated
if not isinstance(other, ResultRecord): | ||
return False | ||
return self.metadata == other.metadata and self.result == other.result | ||
return self.metadata == other.metadata and self.result == other.result # type: ignore[reportUnknownVariableType] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can flip the conditional to appease pyright
?
if isinstance(other, ResultRecord):
return self.metadata == other.metadata and self.result == other.result
else:
return False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm that didn't work, but a model_dump(include
did!
closes #17115
using the MRE in the linked issue we see that we were clobbering scheduled runs bc the idempotency key didn't consider uniqueness wrt deployment schedule id
before
after
also defers fixing
get_client
overloads and type errors in_result_records
that have started failing onmain