Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Take literal hash into account during cache key calculation #406

Merged
merged 14 commits into from
Mar 3, 2022

Conversation

eapolinario
Copy link
Contributor

TL;DR

This PR implements the backend support for overriding the cache key calculation in the case of offloaded objects.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Complete description

As defined in flyteorg/flyte#1893, we're going to expose the ability to set a hash in the literal for caching purposes. This hash will take precedence over the representation of the literal during cache key calculation. Specifically, if a hash is set in a literal (including collections and maps), we use that literal hash to build the cache key (instead of the the literal value). In other words, we recursively traverse the literal to ensure all literals have their hash set iff the hash is set and use the resulting literal to generate a cache key.

Tracking Issue

fixes flyteorg/flyte#1581

Follow-up issue

NA

Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
@welcome
Copy link

welcome bot commented Mar 1, 2022

Thank you for opening this pull request! 🙌

These tips will help get your PR across the finish line:

  • Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
  • Sign off your commits (Reference: DCO Guide).

@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #406 (46c5080) into master (3baef11) will increase coverage by 0.12%.
The diff coverage is 100.00%.

@eapolinario eapolinario changed the title Set hash tag in datacatalog Take literal hash into account during cache key calculation Mar 1, 2022
Signed-off-by: Eduardo Apolinario <[email protected]>
EngHabu
EngHabu previously approved these changes Mar 1, 2022
propeller-config.yaml Outdated Show resolved Hide resolved
Signed-off-by: Eduardo Apolinario <[email protected]>
This reverts commit 983ee6c.

Signed-off-by: Eduardo Apolinario <[email protected]>
@eapolinario eapolinario merged commit 4d1a371 into master Mar 3, 2022
@eapolinario eapolinario deleted the set-hash-tag-in-datacatalog branch March 3, 2022 18:10
@welcome
Copy link

welcome bot commented Mar 3, 2022

Congrats on merging your first pull request! 🎉

eapolinario added a commit to eapolinario/flytepropeller that referenced this pull request Aug 9, 2023
…#406)

* Point to flyteidl branch

Signed-off-by: Eduardo Apolinario <[email protected]>

* Set tag

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add replaceHashInLiteral function

Signed-off-by: Eduardo Apolinario <[email protected]>

* Changes to propeller-config.yaml to run locally

Signed-off-by: Eduardo Apolinario <[email protected]>

* Pick up latest flyteidl@add-hash-to-literal

Signed-off-by: Eduardo Apolinario <[email protected]>

* Rename variables

Signed-off-by: Eduardo Apolinario <[email protected]>

* Add unit tests

Signed-off-by: Eduardo Apolinario <[email protected]>

* s/replaceHashInLiteral/hashify/g

Signed-off-by: Eduardo Apolinario <[email protected]>

* s/literalMapCopy/hashifiedLiteralMap/g

Signed-off-by: Eduardo Apolinario <[email protected]>

* Bump flyteidl

Signed-off-by: Eduardo Apolinario <[email protected]>

* Use flyteidl 0.23.0

Signed-off-by: Eduardo Apolinario <[email protected]>

* Revert "Changes to propeller-config.yaml to run locally"

This reverts commit 983ee6c.

Signed-off-by: Eduardo Apolinario <[email protected]>

Co-authored-by: Eduardo Apolinario <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Core feature] Caching for non-flyte specific offloaded objects
2 participants