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

Cache Serialize API #326

Merged
merged 18 commits into from
Dec 1, 2021
Merged

Conversation

hamersaw
Copy link
Contributor

@hamersaw hamersaw commented Sep 23, 2021

TL;DR

Implemented cache reservations reducing the amount of duplicate work for long running cachable tasks. If enabled, a task acquires a reservation which is released upon completed (after the results are written to the cache). All other identical instances (ie. same task and inputs) wait for the reservation to expire or the cached results to become available.

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

RFC - flyteorg/flyte#1461

Tracking Issue

fixes flyteorg/flyte#267
fixes flyteorg/flyte#420
fixes flyteorg/flyte#872

Follow-up issue

NA

@hamersaw hamersaw force-pushed the feature/cache-reservation-api branch from b62adfe to 0d288d5 Compare September 24, 2021 20:31
@hamersaw hamersaw marked this pull request as ready for review September 28, 2021 13:00
@hamersaw hamersaw changed the title Cache Reservation API Cache Serialize API Sep 28, 2021
@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #326 (63fbf72) into master (a2bfb99) will increase coverage by 0.14%.
The diff coverage is 68.83%.

@hamersaw hamersaw requested a review from kumare3 November 29, 2021 13:55
EngHabu
EngHabu previously approved these changes Nov 30, 2021
go.mod Outdated
@@ -33,3 +33,5 @@ require (
)

replace github.com/aws/amazon-sagemaker-operator-for-k8s => github.com/aws/amazon-sagemaker-operator-for-k8s v1.0.1-0.20210303003444-0fb33b1fd49d

replace github.com/flyteorg/flyteplugins => github.com/hamersaw/flyteplugins v0.6.2-0.20211129132447-34fdd4b8118e
Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder to replace this

@EngHabu EngHabu merged commit b5b5e09 into flyteorg:master Dec 1, 2021
@hamersaw hamersaw deleted the feature/cache-reservation-api branch December 1, 2021 18:41
eapolinario pushed a commit to eapolinario/flytepropeller that referenced this pull request Aug 9, 2023
* added cache reservation logic to task execution

Signed-off-by: Daniel Rammer <[email protected]>

* setting reservation heartbeat to workflow reeval duration

Signed-off-by: Daniel Rammer <[email protected]>

* releasing reservation on completion

Signed-off-by: Daniel Rammer <[email protected]>

* fixed lint errors

Signed-off-by: Daniel Rammer <[email protected]>

* updated task metadata field to DiscoverySerializable in accordance with name change

Signed-off-by: Daniel Rammer <[email protected]>

* not allowing cache serialization without specifying cachable as well

Signed-off-by: Daniel Rammer <[email protected]>

* added datacatalog unit tests

Signed-off-by: Daniel Rammer <[email protected]>

* added handler unit tests

Signed-off-by: Daniel Rammer <[email protected]>

* fixed lint issues

Signed-off-by: Daniel Rammer <[email protected]>

* updated flyteidl and flyteplugins versions - change before merging

Signed-off-by: Daniel Rammer <[email protected]>

* updated flyteidl and flyteplugin version to reflect latest changes

Signed-off-by: Daniel Rammer <[email protected]>

* remove flyteidl replace in go.mod and updating to latest version

Signed-off-by: Daniel Rammer <[email protected]>

* moving release reservation to node finalize function

Signed-off-by: Daniel Rammer <[email protected]>

* updated go.mod and added missing docs on public types

Signed-off-by: Daniel Rammer <[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
3 participants