[NAE-2406] S3 storage bucket alias#437
[NAE-2406] S3 storage bucket alias#437renczesstefan wants to merge 3 commits intorelease/7.0.0-rev10from
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
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe pull request extends MinIO storage configuration with bucket alias support. A new field is added to 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. Review rate limit: 0/1 reviews remaining, refill in 42 minutes and 6 seconds.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
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