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

Remove content md5 requirement #587

Merged
merged 4 commits into from
Jul 13, 2023
Merged

Remove content md5 requirement #587

merged 4 commits into from
Jul 13, 2023

Conversation

wild-endeavor
Copy link
Contributor

@wild-endeavor wild-endeavor commented Jul 10, 2023

TL;DR

Remove the requirement that content md5 is provided.

Depends on flyteorg/flytestdlib#160

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

If the full native path is fully specified, not random, then we check to see if it exists.
If it exists then the user needs to have given a hash, which admin will check against the etags.
etags are computed differently for different stores, so we try a few different ways.
if the tag doesn't match, then we error. if no hash was given then also error.

Tracking Issue

This is related to flyteorg/flytekit#1674

Signed-off-by: Yee Hing Tong <[email protected]>
@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #587 (e72f5e3) into master (05981db) will increase coverage by 1.63%.
The diff coverage is 66.66%.

❗ Current head e72f5e3 differs from pull request most recent head 139e7e3. Consider uploading reports for the commit 139e7e3 to get more accurate results

@@            Coverage Diff             @@
##           master     #587      +/-   ##
==========================================
+ Coverage   58.58%   60.22%   +1.63%     
==========================================
  Files         168      168              
  Lines       16262    13312    -2950     
==========================================
- Hits         9527     8017    -1510     
+ Misses       5893     4445    -1448     
- Partials      842      850       +8     
Flag Coverage Δ
unittests ?

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

Impacted Files Coverage Δ
dataproxy/service.go 67.05% <66.66%> (+10.10%) ⬆️

... and 154 files with indirect coverage changes

Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor wild-endeavor marked this pull request as ready for review July 10, 2023 19:00
@wild-endeavor wild-endeavor changed the title remove content md5 requirement Remove content md5 requirement Jul 10, 2023
EngHabu
EngHabu previously approved these changes Jul 10, 2023
if err != nil {
return nil, errors.NewFlyteAdminErrorf(codes.Internal, "failed to check if file exists at location [%s], Error: %v", knownLocation.String(), err)
}
if metadata.Exists() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a comment that this is best effort and acknowledge the racing issue?

Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
@wild-endeavor
Copy link
Contributor Author

@EngHabu bumped stdlib and added comment.... one more look whenever you get a chance please?

@wild-endeavor wild-endeavor merged commit b93457f into master Jul 13, 2023
@wild-endeavor wild-endeavor deleted the no-hash branch July 13, 2023 17:01
eapolinario pushed a commit that referenced this pull request Sep 6, 2023
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