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

Return None for SyncCheckpoint.read() when src is empty #1189

Merged
merged 1 commit into from
Sep 24, 2022

Conversation

andrewwdye
Copy link
Contributor

Signed-off-by: Andrew Dye [email protected]

TL;DR

SyncCheckpoint.read() should return None when src path is empty rather than raising an exception

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

Intra task checkpointing in Flyte passes a src path to the task in all attempts > 0. There is no guarantee that the prior attempt will have written checkpoint content. SyncCheckpoint.read() should return None when src path is empty rather than raising an exception. Tasks must already handle this case, as None is returned on attempt 0.

Tracking Issue

NA

Follow-up issue

NA

@welcome
Copy link

welcome bot commented Sep 24, 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 Sep 24, 2022

Codecov Report

Merging #1189 (941dd74) into master (245c414) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1189      +/-   ##
==========================================
+ Coverage   68.53%   68.55%   +0.01%     
==========================================
  Files         288      288              
  Lines       26191    26201      +10     
  Branches     2925     2926       +1     
==========================================
+ Hits        17951    17961      +10     
  Misses       7762     7762              
  Partials      478      478              
Impacted Files Coverage Δ
flytekit/core/checkpointer.py 62.35% <100.00%> (+0.90%) ⬆️
tests/flytekit/unit/core/test_checkpoint.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pingsutw pingsutw merged commit 41f7750 into flyteorg:master Sep 24, 2022
@welcome
Copy link

welcome bot commented Sep 24, 2022

Congrats on merging your first pull request! 🎉

Ln11211 pushed a commit to Ln11211/flytekit that referenced this pull request Oct 2, 2022
eapolinario added a commit that referenced this pull request Oct 7, 2022
…mote.sync (#1212)

* Open HashMethod to all types (#1171)

* Open HashMethod to all types

* Fix test in test_type_hints.py

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

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

* Return None for SyncCheckpoint.read() when src is empty (#1189)

Signed-off-by: Andrew Dye <[email protected]>

Signed-off-by: Andrew Dye <[email protected]>
Signed-off-by: LN <[email protected]>

* fix: plugins/flytekit-k8s-pod/requirements.txt to reduce vulnerabilities (#1192)

The following vulnerabilities are fixed by pinning transitive dependencies:
- https://snyk.io/vuln/SNYK-PYTHON-PROTOBUF-3031740

Signed-off-by: LN <[email protected]>

* pyflyte non-fast register (#1205)

* pyflyte run non-fast register

Signed-off-by: Kevin Su <[email protected]>

* lint

Signed-off-by: Kevin Su <[email protected]>

Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: LN <[email protected]>

* Update control_plane.rst

Added about large response  while using Remote.Sync() and how to handle it in the doc

Signed-off-by: LN <[email protected]>

* Update docs/source/design/control_plane.rst

updating FlyteRemote sync message

Co-authored-by: Samhita Alla <[email protected]>

* Update control_plane.rst

Updated the fix for the error and also removed the repeated error message line.

Signed-off-by: LN <[email protected]>

Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: LN <[email protected]>
Signed-off-by: Andrew Dye <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: LN <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Co-authored-by: Andrew Dye <[email protected]>
Co-authored-by: Snyk bot <[email protected]>
Co-authored-by: Kevin Su <[email protected]>
Co-authored-by: Samhita Alla <[email protected]>
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.

3 participants