prefect icon indicating copy to clipboard operation
prefect copied to clipboard

Add a `deployment_version` field to the database

Open Ben-Epstein opened this issue 1 year ago • 0 comments

First check

  • [X] I added a descriptive title to this issue.
  • [X] I used the GitHub search to find a similar request and didn't find it.
  • [X] I searched the Prefect documentation for this feature.

Prefect Version

2.x

Describe the current behavior

relates to https://github.com/PrefectHQ/prefect/issues/10494 in part. The cache in perfect is a little tricky, because it's not clear how to invalidate it. One pretty helpful way around this would be to incorporate a deployment version, such that, any time you run prefect deploy on a deployment, the version gets bumped.

Then, in your prefect task that you are caching, you can either manually include the deployment version in the hash function, or prefect add an option to include the deployment version in the cache hash function, and then include that in the best practices guide.

Without this kind of functionality, it's pretty difficult, as a prefect cloud user, to effectively manage cache invalidation (i've manually implemented the above design)

Ben-Epstein avatar Jan 15 '24 18:01 Ben-Epstein