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

Fix flytestdlib's stowStore.List for google cloud storage #6098

Closed
wants to merge 1 commit into from

Conversation

fg91
Copy link
Member

@fg91 fg91 commented Dec 10, 2024

Why are the changes needed?

For RFC #5598, flytepropeller was given the ability to list error files in the so-called raw output prefix bucket of an execution with the goal of identifying which worker pod in a failed distributed task experienced the first error.

For this purpose, the StowStore in flytestdlib was given a List function.

For google cloud storage buckets, the listing and subsequent access of the error files currently does not work: When listing a bucket gs://some-bucket/..., one receives items in the form google://storage.googleapis.com/download/storage/v1/b/some-bucket/... which then cannot be found by the stow store for the gs:// prefix.
This PR fixes this.

What changes were proposed in this pull request?

Don't use item.URL() but construct the url from the protocol, the container name (bucket name), and the item name.

How was this patch tested?

Tested in a GCP deployment and adapted unit test.

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

Related PRs

@fg91 fg91 self-assigned this Dec 10, 2024
@fg91 fg91 added the bug Something isn't working label Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.10%. Comparing base (4a7f4c2) to head (644d803).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6098   +/-   ##
=======================================
  Coverage   37.10%   37.10%           
=======================================
  Files        1318     1318           
  Lines      132403   132413   +10     
=======================================
+ Hits        49122    49132   +10     
- Misses      79008    79009    +1     
+ Partials     4273     4272    -1     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.10% <ø> (ø)
unittests-flytecopilot 30.99% <ø> (ø)
unittests-flytectl 62.29% <ø> (-0.05%) ⬇️
unittests-flyteidl 7.23% <ø> (ø)
unittests-flyteplugins 53.82% <ø> (ø)
unittests-flytepropeller 42.60% <ø> (ø)
unittests-flytestdlib 57.66% <100.00%> (+0.13%) ⬆️

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.

Comment on lines +299 to +304
u := url.URL{
Scheme: protocol,
Host: containerName,
Path: item.Name(),
}
results[index] = DataReference(u.String())
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we fix this in our fork of stow? It looks like we change the scheme here, which is used in gcs implementation of convertToStowItem.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do, overlooked we use a fork of stow 👌

@fg91
Copy link
Member Author

fg91 commented Dec 17, 2024

Can we fix this in our fork of stow? It looks like we change the scheme here, which is used in gcs implementation of convertToStowItem.

Closing this PR in favour of flyteorg/stow#17 @eapolinario

@fg91 fg91 closed this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants