oscerd opened a new pull request, #31262:
URL: https://github.com/apache/camel/pull/31262

   ## Problem
   
   `listObjects` built a `ListObjectsV2Request` with bucket, delimiter and 
prefix, called the service once and set the first page as the body. The 
continuation token was neither followed nor surfaced, and `maxKeys` was never 
set, so a bucket with more than 1000 keys was **silently truncated** with no 
way to reach the rest. `AWS2S3Constants` had no token, marker, max-keys or 
truncated constant at all. `listBuckets` had the same shape — it called the 
no-arg overload.
   
   Separately, the producer operations table advertised `uploadObject` and 
`multipartUpload` as operations. Neither is an `AWS2S3Operations` constant: the 
first is what the producer does when no operation is set, the second is the 
`multiPartUpload` **option**. Copying the table gave `Unsupported operation`.
   
   ## Changes
   
   Three new headers, both operations:
   
   | header | direction | meaning |
   |---|---|---|
   | `CamelAwsS3ContinuationToken` | in and out | resume point; set to the next 
page's token, **removed** on the last page |
   | `CamelAwsS3MaxKeys` | in | page size (S3 caps at 1000) |
   | `CamelAwsS3IsTruncated` | out | whether more pages follow |
   
   Removing the token on the last page means a route can loop while the header 
is present and stop by itself. POJO mode reads the token from the request body 
and still gets both headers on the answer.
   
   Docs: the two phantom rows now describe what they actually are, the two list 
rows point at a new paging section with an example.
   
   ## Test
   
   `AWS2S3ProducerListObjectsPagingTest` runs against `FakeS3Server`, which 
already implemented paginated ListObjectsV2. It walks a 5-object bucket two at 
a time and asserts the full key list, the truncation flag, and that the token 
is dropped on the last page. Three of its four cases fail against unmodified 
code (`expected: <2> but was: <5>`, and a null `CamelAwsS3IsTruncated`).
   
   ## One existing test changed
   
   `AWS2S3ProducerHttpResponseCodeTest.listBucketsShouldSetHttpResponseCode` 
stubbed only the no-arg `listBuckets()`. Since the producer now passes a 
request, the stub moves to `listBuckets(any(ListBucketsRequest.class))` — which 
is what the SDK's no-arg overload delegates to anyway.
   
   ## Testing
   
   `mvn test` in `components/camel-aws/camel-aws2-s3`: 166 tests, all passing.
   
   _Claude Code on behalf of oscerd_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to