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

Updates to cache policies #14164

Merged
merged 9 commits into from
Jun 20, 2024
Merged

Updates to cache policies #14164

merged 9 commits into from
Jun 20, 2024

Conversation

cicdw
Copy link
Member

@cicdw cicdw commented Jun 20, 2024

In preparation for a docs PR (incoming), this PR adjusts our cache policies to include:

  • a new FLOW_PARAMETERS policy
  • a new RUN_ID policy that returns either the flow run ID or task run ID depending on what's available
  • a new DEFAULT which is a compound policy of INPUTS + TASKDEF + RUN_ID

@cicdw cicdw requested a review from desertaxle June 20, 2024 00:10
@cicdw cicdw requested a review from a team as a code owner June 20, 2024 00:10
src/prefect/cache_policies.py Show resolved Hide resolved
src/prefect/cache_policies.py Show resolved Hide resolved
tests/test_cache_policies.py Show resolved Hide resolved
src/prefect/cache_policies.py Show resolved Hide resolved
Copy link
Collaborator

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

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

Same feedback as Alex, a few docstrings and I agree we should keep a test that just asserts what the default policy is in case we ever inadvertently knock that askew

@cicdw
Copy link
Member Author

cicdw commented Jun 20, 2024

@chrisguidry @desertaxle great suggestions, I've added more tests and more docstrings 👍

@cicdw cicdw merged commit 7caeb2f into main Jun 20, 2024
26 checks passed
@cicdw cicdw deleted the updates-to-cache-policies branch June 20, 2024 16:35
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

3 participants