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

   # Description
   
   [CAMEL-25770](https://issues.apache.org/jira/browse/CAMEL-25770)
   
   The minio consumer stats every listed object when it creates the exchanges, 
and gets the body of each object when it routes the batch. An object that no 
longer exists is skipped (CAMEL-25512); any other failure was rethrown: a 
failed stat dropped every exchange of the poll, and a failed get stopped the 
batch, so the objects listed after it were not consumed. The next poll lists 
the same objects again, so one object whose stat or get always fails (access 
denied for that object, an object encrypted with another SSE-C key) kept the 
consumer from consuming the objects listed after it, until someone removed the 
object.
   
   This change does what camel-aws2-s3 does since CAMEL-25558 (and what 
CAMEL-25760 does for camel-alibaba-oss and camel-huaweicloud-obs):
   - a failed stat or get of one listed object is collected, the object is 
released from the in-progress set, skipped for this poll and reported to the 
consumer's exception handler with its name, and the other objects are consumed;
   - the poll still fails (with the first failure) when none of the objects 
could be got, as for expired credentials, so the error handling and the backoff 
of the scheduled consumer apply;
   - a failure of the listing, and a failure with `objectName` set, still fail 
the poll as before.
   
   The behaviour change (a skipped object is reported at every poll that lists 
it) is in the 4.24 upgrade guide.
   
   Tests:
   - New `MinioConsumerObjectThatCannotBeGotTest` (3 tests): the real Minio 
client against the module's in-process fake S3 server, which can now refuse the 
stats and gets of an object with 403 AccessDenied. Without the fix 
`objectWhoseBodyCannotBeGotDoesNotBlockTheOtherObjects` (a.txt, b.txt whose get 
is refused, c.txt) receives 1 of the 2 expected objects, and 
`objectThatCannotBeStatedDoesNotBlockTheOtherObjects` receives none. 
`pollFailsWhenNoListedObjectCanBeGot` passes with and without the fix; it is 
there because the fix must not swallow that case.
   - camel-minio unit tests: 10 run, 0 failures (formatter and import sort run 
in the same build).
   - Not run: against a MinIO server.
   
   How it was found: variant analysis of the camel-aws2-s3 fix CAMEL-25558 
across the object-store consumers (a Semgrep rule for a batch consumer that 
gets every listed item in one try block and rethrows the first failure). 
camel-google-storage, camel-azure-storage-blob and camel-azure-storage-datalake 
have the same defect and are fixed in separate PRs.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [ ] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
     (I built and tested camel-minio, including the formatter and import-sort 
plugins. I did not run the full root build.)
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
     This PR was prepared with Claude Code (Claude Opus 5.5). The commit 
carries a `Co-Authored-By` trailer.
   
   _Claude Code on behalf of allthingssecurity_
   
   🤖 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