[NAE-2406] S3 storage bucket alias#437
Conversation
- Extended `MinIoHostInfo` class to support `bucketAliases` mapping for enhanced bucket aliasing functionality. - Updated `MinIoStorageService`: - Modified `createStorage` to attach bucket aliases dynamically based on the host. - Introduced `getMappedBucketIfExists` for resolving bucket aliases. - Adjusted `getBucketOrDefault` to work with the new alias mapping implementation. - Minor refactoring and cleanup, such as removing unused annotations.
- updated resolution of mapped buckets
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe pull request adds per-host bucket aliases to MinIO host configuration and updates MinIoStorageService to resolve buckets using host-aware alias mappings; two unused imports were removed. ChangesMinIO Bucket Alias Resolution
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@application-engine/src/main/java/com/netgrif/application/engine/files/minio/MinIoStorageService.java`:
- Around line 163-170: getMappedBucketIfExists performs four redundant calls to
properties.getMinIo().getHosts(host); cache the result in a local variable
(e.g., var hostConfig or hosts) at the start of the method and use that variable
in the null checks, getBucketAliases() call, containsKey(aliasKey) check and
get(aliasKey) retrieval inside getMappedBucketIfExists to avoid repeated
lookups.
- Around line 52-64: In createStorage in MinIoStorageService, the inner
null-check around data.getStorage().getBucket() prevents getBucketOrDefault from
applying the DEFAULT_BUCKET fallback; remove that inner if and always call
storage.setBucket(getBucketOrDefault(storage.getHost(),
data.getStorage().getBucket())) when data.getStorage().getHost() is non-null so
MinIoStorage.bucket is set (possibly to DEFAULT_BUCKET) as intended; keep the
existing enabled check (properties.getMinIo().isEnabled()) and
StorageNotEnabledException handling unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 876f6072-63f2-4039-9a40-24dded3e9005
📒 Files selected for processing (4)
application-engine/src/main/java/com/netgrif/application/engine/files/minio/MinIoHostInfo.javaapplication-engine/src/main/java/com/netgrif/application/engine/files/minio/MinIoStorageService.javaapplication-engine/src/main/java/com/netgrif/application/engine/files/minio/StorageConfigurationProperties.javaapplication-engine/src/main/java/com/netgrif/application/engine/startup/runner/StorageRunner.java
💤 Files with no reviewable changes (2)
- application-engine/src/main/java/com/netgrif/application/engine/startup/runner/StorageRunner.java
- application-engine/src/main/java/com/netgrif/application/engine/files/minio/StorageConfigurationProperties.java
- updated according to PR
|
@coderabbitai please recheck the PR |
|
Tip For best results, initiate chat on the files or code changes.
[full_review] |
|
@coderabbitai is there any other issue? You did not add new comments, but you are still requesting changes. |
|
Review rate limit: 1/1 review remaining, available now. |
|
@coderabbitai pls accept this if there is nothing to do. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chainLet me check the current state of review comments before approving. 🏁 Script executed: Length of output: 12449 Let me verify the fixes in the current code before approving. 🏁 Script executed: Length of output: 7154
Everything looks good — approving now! [approve] |
✅ Actions performedReview triggered.
|
Description
Implements NAE-2406
Dependencies
No new dependencies were introduced
Third party dependencies
No new dependencies were introduced
Blocking Pull requests
There are no dependencies on other PR
How Has Been This Tested?
This was tested manually and with unit tests. File attached to task.
Test Configuration
Checklist:
Summary by CodeRabbit
New Features
Chores