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

Add an error for file size exceeded to prevent system retries #5725

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

wild-endeavor
Copy link
Contributor

@wild-endeavor wild-endeavor commented Sep 6, 2024

Tracking issue

See the original slack thread.

Why are the changes needed?

Even when upload of a file fails because the file is too large, we retry many times. This is not needed.

What changes were proposed in this pull request?

  • Add a new error type and test for it, returning a not IsRecoverable error.

How was this patch tested?

Tested locally with the following workflow

from flytekit import task, workflow


@task
def print_arrays(arr1: str) -> None:
    print(f"Array 1: {arr1}")


@task  # (container_image=normal_image)
def increase_size_of_of_arrays(n: int) -> str:
    arr1 = "a" * n * 1024
    return arr1


@workflow
def simple_pipeline(n: int) -> int:
    arr1 = increase_size_of_of_arrays(n=n)
    print_arrays(arr1)
    return 2

Setup process

Screenshots

Before
image

After
image

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Tangentially related to this PR: flyteorg/flytekit#2700, which solves a similar issue but from within the container.

Docs link

Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.77%. Comparing base (a058fd1) to head (4bbae21).
Report is 43 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5725       +/-   ##
===========================================
+ Coverage   36.21%   50.77%   +14.56%     
===========================================
  Files        1303     1158      -145     
  Lines      109560    73757    -35803     
===========================================
- Hits        39675    37451     -2224     
+ Misses      65765    32320    -33445     
+ Partials     4120     3986      -134     
Flag Coverage Δ
unittests-datacatalog 51.37% <ø> (ø)
unittests-flyteadmin 55.57% <ø> (-0.07%) ⬇️
unittests-flytecopilot 12.17% <ø> (ø)
unittests-flytectl 62.21% <ø> (+0.04%) ⬆️
unittests-flyteidl ?
unittests-flyteplugins 53.45% <100.00%> (+0.10%) ⬆️
unittests-flytepropeller 42.04% <100.00%> (+0.28%) ⬆️
unittests-flytestdlib 55.37% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
@wild-endeavor wild-endeavor marked this pull request as ready for review October 14, 2024 21:17
@wild-endeavor wild-endeavor changed the title [wip] add an error in base case for file size exceeded Add an error for file size exceeded to prevent system retries Oct 14, 2024
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
@hamersaw hamersaw self-requested a review October 15, 2024 09:03
hamersaw
hamersaw previously approved these changes Oct 15, 2024
Signed-off-by: Yee Hing Tong <wild-endeavor@users.noreply.github.com>
@wild-endeavor wild-endeavor enabled auto-merge (squash) October 15, 2024 19:48
@wild-endeavor wild-endeavor merged commit 66391ff into master Oct 15, 2024
49 of 50 checks passed
@wild-endeavor wild-endeavor deleted the prop/large-file-no-retry branch October 15, 2024 20:00
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