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

feat(tests): Enable supabase integration tests #2190

Merged
merged 5 commits into from
May 2, 2023
Merged

feat(tests): Enable supabase integration tests #2190

merged 5 commits into from
May 2, 2023

Conversation

Xuanwo
Copy link
Member

@Xuanwo Xuanwo commented May 1, 2023

This PR will enable supabase integration tests


failures:
    services_supabase::write_test_create_dir
    services_supabase::write_test_create_dir_existing
    services_supabase::write_test_delete
    services_supabase::write_test_delete_empty_dir
    services_supabase::write_test_delete_not_existing
    services_supabase::write_test_delete_stream
    services_supabase::write_test_delete_with_special_chars
    services_supabase::write_test_fuzz_offset_reader
    services_supabase::write_test_fuzz_part_reader
    services_supabase::write_test_fuzz_range_reader
    services_supabase::write_test_read_full
    services_supabase::write_test_read_large_range
    services_supabase::write_test_read_not_exist
    services_supabase::write_test_read_range
    services_supabase::write_test_read_with_dir_path
    services_supabase::write_test_read_with_special_chars
    services_supabase::write_test_reader_from
    services_supabase::write_test_reader_range
    services_supabase::write_test_reader_tail
    services_supabase::write_test_stat
    services_supabase::write_test_stat_dir
    services_supabase::write_test_stat_not_cleaned_path
    services_supabase::write_test_stat_not_exist
    services_supabase::write_test_stat_with_special_chars
    services_supabase::write_test_write
    services_supabase::write_test_write_with_special_chars

test result: FAILED. 101 passed; 26 failed; 0 ignored; 0 measured; 1651 filtered out; finished in 17.56s

Hi, @Ji-Xinyou, many write related tests failed, would like to take a look?

@xyjixyjixyji
Copy link
Contributor

Hi, @Ji-Xinyou, many write related tests failed, would like to take a look?

Sure, I will have a look at it.

PsiACE
PsiACE previously approved these changes May 1, 2023
@PsiACE PsiACE self-requested a review May 1, 2023 17:17
@PsiACE PsiACE dismissed their stale review May 1, 2023 17:18

Does not appear to have met the set target

@PsiACE PsiACE marked this pull request as draft May 1, 2023 17:18
@xyjixyjixyji
Copy link
Contributor

Seems supabase does not support special characters

In test_delete_with_special_chars

thread 'services_supabase::write_test_delete_with_special_chars' panicked at
'write must succeed: Unexpected (permanent) at Writer::write =>
SupabaseError { status_code: "400", error: "Invalid Input", message: "The object name contains invalid characters" }

Any ideas on this test?

@Xuanwo
Copy link
Member Author

Xuanwo commented May 2, 2023

Seems supabase does not support special characters

Supabase said:

File, Folder, and Bucket names must follow AWS object key naming guidelines and avoid use of any other characters.

Maybe we just need to make sure the path has been percent encoded?

@xyjixyjixyji
Copy link
Contributor

Maybe we just need to make sure the path has been percent encoded?

Following the first line is what we are using in our behavior tests. As I tested, the third line which removed '#', '%' and '^' works out fine.

let path = format!("{} !@#$%^&()_+-=;',.txt", uuid::Uuid::new_v4());
// remove # % and ^
let path = format!("{} !@$&()_+-=;',.txt", uuid::Uuid::new_v4());

In the Characters to avoid section from the this, we can see Caret ("^"), Percent character ("%") and 'Pound' character ("#") should be avoided.

Maybe we should remove these three characters, at least from the amazon's spec we should avoid these three.

@Xuanwo
Copy link
Member Author

Xuanwo commented May 2, 2023

More like a bug: supabase/storage#133

As Supabase Storage is an open-source project, I would rather collaborate with the upstream team than find workarounds.

@Xuanwo
Copy link
Member Author

Xuanwo commented May 2, 2023

Before this bug addressed, you can add code like the following for test_delete_with_special_chars to move on:

// Ignore test for supabase until https://github.com/apache/incubator-opendal/issues/2194 addressed.
if op.info().scheme() == Scheme::Supabase {  
    warn!("ignore test for supabase unitl https://github.com/apache/incubator-opendal/issues/2194 addressed")
    return Ok(());
}

@Xuanwo
Copy link
Member Author

Xuanwo commented May 2, 2023

Hi, @suyanhanx, I think we can merge this PR first and create a tracking issue for supabase's not passed test cases.

@Xuanwo Xuanwo marked this pull request as ready for review May 2, 2023 17:46
@suyanhanx
Copy link
Member

Hi, @suyanhanx, I think we can merge this PR first and create a tracking issue for supabase's not passed test cases.

It‘s ok to me. Just merge after the conflict is resolved.

@Xuanwo
Copy link
Member Author

Xuanwo commented May 2, 2023

Hi, @suyanhanx, I think we can merge this PR first and create a tracking issue for supabase's not passed test cases.

Tracked at #2199

Copy link
Member

@suyanhanx suyanhanx left a comment

Choose a reason for hiding this comment

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

Thanks.

@Xuanwo Xuanwo merged commit 564ad8d into main May 2, 2023
41 checks passed
@Xuanwo Xuanwo deleted the supabase-test branch May 2, 2023 18:21
@Xuanwo Xuanwo mentioned this pull request May 6, 2023
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.

None yet

4 participants