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: Correct google stow item url format #17

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

fg91
Copy link
Member

@fg91 fg91 commented Dec 17, 2024

For RFC flyteorg/flyte#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 the URL format in the underlying stow library.

@@ -113,22 +113,34 @@ func (l *Location) RemoveContainer(id string) error {
// ItemByURL retrieves a stow.Item by parsing the URL, in this
// case an item is an object.
func (l *Location) ItemByURL(url *url.URL) (stow.Item, error) {
Copy link
Member Author

@fg91 fg91 Dec 17, 2024

Choose a reason for hiding this comment

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

Adapting this function was required for google/stow_test.go to pass.

Note that on master and on this branch I needed to disable this check for the test to pass tough: t.Fatalf("Leaked %d TCP file descriptor", diffFDs).

Choose a reason for hiding this comment

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

interesting. Can you paste the error? I'm unable to repro it on a Mac (I also added #18 and all tests pass on linux/amd64 too).

@fg91 fg91 requested a review from eapolinario December 17, 2024 21:33
@fg91 fg91 self-assigned this Dec 17, 2024
@fg91 fg91 added the bug Something isn't working label Dec 17, 2024
@eapolinario eapolinario merged commit fcb9bf9 into master Dec 18, 2024
2 checks passed
@eapolinario eapolinario deleted the fg91/fix/google-url-format branch December 18, 2024 22:14
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