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

s3select - Add tests (and some optional funcationality for them) #7222

Merged
merged 1 commit into from
Apr 23, 2023

Conversation

alphaprinz
Copy link
Contributor

@alphaprinz alphaprinz commented Mar 2, 2023

Explain the changes

First commit adds some optional functionality which is tested in ceph s3select tests.
Second commit adds tests.

Issues: Fixed #xxx / Gap #xxx

1a. End message on error.
1b. Stats message on completion.
1c. FileHeaderInfo=IGNORE (it's a different field in s3selct csv_definitions struct).

New unit tests.
Most ceph tests related to s3select were removed from pending list.
(Remaining tests have bugs in tests)
A manual fix is applied to test code so that bucket name would conform to bucket name pattern.
After fix teardown properly deletes the bucket created by test.
Without fix only one test passes. The second test fails when it tries to create an already existing bucket.

Testing Instructions:

@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 14, 2023
@alphaprinz alphaprinz force-pushed the s3select branch 4 times, most recently from b3307a8 to bd017ad Compare March 15, 2023 13:44
@alphaprinz alphaprinz changed the title s3select - Implement Stats message. Send End message on errors. Add F… s3select - Add tests (and some optional funcationality for them) Mar 16, 2023
]
`;

class S3SelectStream extends Transform {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why aren't you using the S3SelectStream in util/s3select?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The "real" S3SelectStream in util/s3select also has the AWS chunk enconding.
If we want to reuse it we need to make the encoding optional (eg add parameter/move to a different stream).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a comment to explain rationale of the new class.

src/endpoint/s3/ops/s3_post_object_select.js Outdated Show resolved Hide resolved
src/native/s3select/s3select_napi.cpp Show resolved Hide resolved
src/test/system_tests/ceph_s3_tests/test_ceph_s3_deploy.sh Outdated Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Show resolved Hide resolved
@alphaprinz alphaprinz force-pushed the s3select branch 3 times, most recently from 02a5fb0 to d1ec6ff Compare April 3, 2023 10:27
src/test/system_tests/ceph_s3_tests/test_ceph_s3_deploy.sh Outdated Show resolved Hide resolved
src/test/unit_tests/index.js Show resolved Hide resolved
src/util/s3select.js Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_s3select.js Outdated Show resolved Hide resolved
Copy link
Contributor

@shirady shirady left a comment

Choose a reason for hiding this comment

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

LGTM
@alphaprinz, Thank you for adding comments with detailed explanations!

2 (last) comments:

  1. @guymguym, would you please review tests double pipe close and async loop error?
  2. @alphaprinz, would please organize the PR description?
    For example:
  • add testing instructions for running the file you created
  • add the gap of parquet file (it can be a Jira link)
  • add to the changes updating to test_s3select.js

@alphaprinz alphaprinz force-pushed the s3select branch 2 times, most recently from ea9ee81 to 6d349c2 Compare April 17, 2023 07:17
Implement Stats message. Send End message on errors. Add FileHeaderInfo=IGNORE.
Add unit tests.
Uncomment most ceph s3select tests from pending list.
Add a manual patch for ceph tests code so teardown will delete bucket created by test.

Signed-off-by: Amit Prinz Setter <aprinzse@ibm.com>
@alphaprinz alphaprinz merged commit ddd9518 into noobaa:master Apr 23, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants