Skip to content

[#223] List one S3 object per iRODS object in ListObjectsV2/ListObjects#232

Merged
alanking merged 5 commits into
irods:mainfrom
alanking:223.m
Jun 9, 2026
Merged

[#223] List one S3 object per iRODS object in ListObjectsV2/ListObjects#232
alanking merged 5 commits into
irods:mainfrom
alanking:223.m

Conversation

@alanking

Copy link
Copy Markdown
Contributor

Addresses #223

Not my finest work, but it seems to work. Tests are passing.

Leaving in draft til I get a chance to test with Cyberduck and S3 Browser. I'd also like to add some more tests (like, retroactively) but I may punt that to another issue.

@alanking

Copy link
Copy Markdown
Contributor Author

Naturally, I noticed only after opening this that the statement in my commit message about using the latest not-good replica is false. Right now, it just uses the first replica that comes back if no good replica is found.

Comment thread core/src/session.cpp
Comment thread endpoints/s3/src/listobjects.cpp Outdated
Comment thread endpoints/s3/src/listobjectsv2.cpp Outdated
Comment thread endpoints/s3/src/listobjects_common.cpp
@korydraughn

Copy link
Copy Markdown
Collaborator

Will review once this is out of draft.

@alanking

alanking commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Ignoring clang-format because it is - for some reason - suggesting replacing tabs with spaces even though the file is using tabs.

Added a bunch of new test cases which significantly increase the amount of time it takes to run the tests. However, we know that all the possible scenarios are being covered here for at-rest data.

All tests are passing.

And yet... I will leave this in draft until I get around to testing with Cyberduck and S3 Browser in the Windows VM. Still haven't gotten around to that.

@alanking

alanking commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Rebased to include fix for Minio CLI in GHA workflow

@alanking

alanking commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Basic manual testing with S3 Browser and Cyberduck shows that things seem to be working.

Gonna look into these failing 4.x tests and then will take out of draft.

@alanking

alanking commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Fixed failing tests - it had to do with the iRODS server not recognizing itself by the Docker Compose service name hostname scheme. Ready for review.

@alanking alanking marked this pull request as ready for review June 8, 2026 19:56
@alanking

alanking commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Okay, apparently, 4.3.2 tests are failing as well. Will look into those as well. I do not anticipate any changes to the C++ - just test stuff.

@korydraughn korydraughn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Noticed a few minor things.

Comment thread tests/listobject_test.py Outdated
Comment thread core/src/session.cpp
Comment thread core/src/session.cpp
Comment thread endpoints/s3/include/irods/private/s3_api/listobjects.hpp Outdated
Comment thread endpoints/s3/include/irods/private/s3_api/listobjects.hpp Outdated
Comment thread endpoints/s3/src/listobjects.cpp Outdated
Comment thread endpoints/s3/src/listobjects.cpp
Comment thread endpoints/s3/src/listobjects_common.cpp Outdated
Comment thread endpoints/s3/src/listobjectsv2.cpp Outdated
@alanking

alanking commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Ran tests against packages built with 4.3.2 and everything passed, so I'm not sure what happened on that last run. We shall see if things get better this time, I guess.

@korydraughn

Copy link
Copy Markdown
Collaborator

GHA are happy.

Squash if ready.

@alanking

alanking commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Squashed

alanking added 5 commits June 9, 2026 10:53
This adds many test cases to ensure that listing an iRODS object with
multiple replicas uses the expected replica information. The test cases
use 3 replicas and manipulates the replica statuses, mtimes, and sizes
to make sure that the expected behavior occurs in all possible cases.
…Objects

This commit separates the ListObjects and ListObjectsV2 endpoints. The
only meaningful difference at this time is that ListObjects will include
prefixes in the Contents of the ListBucketResult returned to the client
when no delimiter is specified, and ListObjectsV2 does not.

This commit also makes sure that iRODS objects with multiple replicas are
listed only once by ListObjectsV2 and ListObjects. This is done by examining
all of the replicas and selecting the latest, marked-good one. If no good
replica exists, the replica with the latest timestamp is chosen.

@korydraughn korydraughn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Pound it.

@alanking

alanking commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

#'d, mergin

@alanking alanking merged commit e44dc50 into irods:main Jun 9, 2026
5 checks passed
@alanking alanking deleted the 223.m branch June 9, 2026 15:06
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.

3 participants