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

Skip copying files to the remote path if the directory is empty #1345

Merged
merged 8 commits into from
Nov 30, 2022

Conversation

pingsutw
Copy link
Member

TL;DR

test_union_type failed if the fsspec is installed because the fsspec will fail to copy the directory to the remote path if the directory is empty.

In some cases, flyte schema could be empty if people forget to use flyteSchema.open().write to write the data to local path

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

^^^

Tracking Issue

NA

Follow-up issue

NA

Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Merging #1345 (1ef06da) into master (430795d) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1345      +/-   ##
==========================================
+ Coverage   68.94%   69.04%   +0.10%     
==========================================
  Files         291      291              
  Lines       26656    26699      +43     
  Branches     2508     2514       +6     
==========================================
+ Hits        18377    18435      +58     
+ Misses       7789     7772      -17     
- Partials      490      492       +2     
Impacted Files Coverage Δ
tests/flytekit/unit/core/test_type_hints.py 96.24% <100.00%> (+<0.01%) ⬆️
tests/flytekit/unit/core/test_promise.py 89.18% <0.00%> (-0.10%) ⬇️
flytekit/core/type_engine.py 58.77% <0.00%> (ø)
tests/flytekit/unit/cli/pyflyte/test_run.py 99.20% <0.00%> (+0.03%) ⬆️
flytekit/core/promise.py 52.70% <0.00%> (+0.74%) ⬆️
flytekit/types/schema/types.py 38.30% <0.00%> (+0.75%) ⬆️
flytekit/core/data_persistence.py 35.52% <0.00%> (+1.72%) ⬆️
flytekit/clis/sdk_in_container/run.py 84.15% <0.00%> (+4.29%) ⬆️
tests/flytekit/unit/cli/pyflyte/workflow.py 100.00% <0.00%> (+13.04%) ⬆️

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

try:
lpaths = lfs.expand_path(from_path, recursive=recursive)
except FileNotFoundError:
# In some cases, there is no file in the original directory, so we just skip copying the file to the remote path
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add a debug log here mentioning that the file does not exist?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah let's do that @pingsutw

Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@wild-endeavor wild-endeavor merged commit c0d7fca into master Nov 30, 2022
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