fix(connect): do not print stack when s3 error#3155
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds S3 readiness checking before initializing AutoMQ components that depend on object storage, preventing unnecessary stack traces when S3 is unavailable or misconfigured. The main addition is the S3PermissionProbe utility class that validates S3 bucket access before initialization.
Changes:
- Added
S3PermissionProbeutility class to check S3 bucket readiness and configuration validity - Modified
AbstractConnectClito conditionally initialize S3 log uploader and telemetry exporter based on probe results - Added comprehensive unit tests for various S3 configuration scenarios
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
connect/runtime/src/main/java/org/apache/kafka/connect/automq/s3/S3PermissionProbe.java |
New utility class that probes S3 bucket readiness for log uploading and metrics exporting |
connect/runtime/src/main/java/org/apache/kafka/connect/cli/AbstractConnectCli.java |
Updated to use S3PermissionProbe before initializing S3-dependent components |
connect/runtime/src/test/java/org/apache/kafka/connect/automq/s3/S3PermissionProbeTest.java |
Comprehensive test suite covering configuration scenarios and readiness failures |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
superhx
previously approved these changes
Jan 15, 2026
superhx
approved these changes
Jan 16, 2026
woshigaopp
added a commit
that referenced
this pull request
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new mechanism to check S3 readiness before initializing key AutoMQ components that rely on object storage, such as the S3 log uploader and the AutoMQ telemetry exporter. The main changes include the addition of the
S3PermissionProbeutility, its integration into the CLI startup flow, and corresponding unit tests to ensure correct behavior.S3 readiness and initialization improvements:
S3PermissionProbethat centralizes logic for probing S3 bucket readiness for both log uploading and metrics exporting. It checks configuration, validates bucket access, and reports whether initialization should proceed.AbstractConnectClito useS3PermissionProbebefore initializing the S3 log uploader and AutoMQ telemetry exporter, ensuring these components only start if S3 is ready and logging a warning if not. [1] [2]Testing enhancements:
S3PermissionProbeTestto verify correct behavior for various configuration scenarios, including missing buckets, readiness failures, and non-S3 exporters.