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

Skipping of cached task outputs via execution config #489

Merged

Conversation

MorpheusXAUT
Copy link
Contributor

TL;DR

Cached output of tasks can now be skipped and overwritten for single executions.

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

flytepropeller now supports the new cache skip flag via execution configuration, causing it to ignore any cached outputs and re-running all tasks. Any stored data will be overwritten with the new results of the execution.
As the HTTP verb PUT can either be used to create or update data, I've decided to extend the Put method of CatalogClient to allow for either creation or updating of artifacts instead of creating a separate new method.

As this uses currently unmerged versions of flyteidl, flyteplugins and flytestdlib, the PR is created as a draft (for review) until the respective new versions are available.

Tracking Issue

flyteorg/flyte#2867

Follow-up issue

NA

@MorpheusXAUT MorpheusXAUT changed the title Skipping of cached task outputs via execution config Skipping of cached task outputs via execution config #minor Oct 5, 2022
@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

Merging #489 (612ad89) into master (3405a04) will increase coverage by 0.14%.
The diff coverage is 72.41%.

❗ Current head 612ad89 differs from pull request most recent head 7edfbfe. Consider uploading reports for the commit 7edfbfe to get more accurate results

Nick Müller added 3 commits November 4, 2022 12:22
CatalogClient.Put can now create or update/overwrite artifacts and their data

Signed-off-by: Nick Müller <[email protected]>
Updated to latest released versions of flyteidl and flytestdlib

Signed-off-by: Nick Müller <[email protected]>
@MorpheusXAUT MorpheusXAUT force-pushed the cache-eviction-execution-override branch from b28ee5e to a739fa4 Compare November 4, 2022 11:24
@MorpheusXAUT
Copy link
Contributor Author

@hamersaw Just pushed an update that renamed the flag from skipCache to overwriteCache and handles NotFound while updating gracefully.
Last thing that should be missing for this PR to be ready for merge is the discussion in the flyteplugins PR to be resolved and for that to be merged so I can remove the replace directive in go.mod.

@MorpheusXAUT MorpheusXAUT marked this pull request as ready for review November 4, 2022 14:06
@hamersaw
Copy link
Contributor

hamersaw commented Nov 7, 2022

@MorpheusXAUT looks like we need to manually specify the go version for codeql, can you add the middle "step" the .github/workflows/codeql-analysis.yml file?

    - name: Checkout repository
      uses: actions/checkout@v2

    - uses: actions/setup-go@v2
      with:
        go-version: '1.18'

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v1
      with:
        languages: ${{ matrix.language }}
        # If you wish to specify custom queries, you can do so here or in a config file.
        # By default, queries listed here will override any specified in a config file.
        # Prefix the list here with "+" to use these queries and those in the config file.
        # queries: ./path/to/local/query, your-org/your-repo/queries@main

@hamersaw hamersaw changed the title Skipping of cached task outputs via execution config #minor Skipping of cached task outputs via execution config Nov 7, 2022
Signed-off-by: Nick Müller <[email protected]>
@MorpheusXAUT
Copy link
Contributor Author

@hamersaw Pushed, seems to be working now 👍

@hamersaw hamersaw merged commit 01ec214 into flyteorg:master Nov 8, 2022
@MorpheusXAUT MorpheusXAUT deleted the cache-eviction-execution-override branch November 8, 2022 15:54
eapolinario pushed a commit to eapolinario/flytepropeller that referenced this pull request Aug 9, 2023
* Implemented skipping of cached task results via execution config
CatalogClient.Put can now create or update/overwrite artifacts and their data

Signed-off-by: Nick Müller <[email protected]>

* Renamed SkipCache flag to OverwriteCache
Updated to latest released versions of flyteidl and flytestdlib

Signed-off-by: Nick Müller <[email protected]>

* datacatalog client now handles NotFound errors gracefully while overwriting artifact

Signed-off-by: Nick Müller <[email protected]>

* Refactored updating of artifact data into separate Update method of datacatalog client

Signed-off-by: Nick Müller <[email protected]>

* Updated to latest released flyteplugins version

Signed-off-by: Nick Müller <[email protected]>

* Use go 1.18 for CodeQL GHA

Signed-off-by: Nick Müller <[email protected]>

Signed-off-by: Nick Müller <[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.

2 participants