Skip to content

fix: ignore blank initialBuckets entries during startup#3085

Merged
afranken merged 1 commit into
mainfrom
fix/blank-initial-buckets
Jun 20, 2026
Merged

fix: ignore blank initialBuckets entries during startup#3085
afranken merged 1 commit into
mainfrom
fix/blank-initial-buckets

Conversation

@afranken

Copy link
Copy Markdown
Member

Description

Rebased branch from #3071 onto main.

Related Issue

N/A

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copilot AI review requested due to automatic review settings June 20, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a startup edge case where initialBuckets containing blank entries (e.g., [""]) could trigger creation of an invalid persisted bucket at the storage root, leading to bad state after restart.

Changes:

  • Filter out blank/whitespace-only initialBuckets entries during bucket store initialization.
  • Add a regression test asserting that blank initialBuckets does not create buckets or write files to the root store directory.
  • Document the fix in CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
server/src/main/kotlin/com/adobe/testing/s3mock/store/StoreConfiguration.kt Filters blank initialBuckets entries before attempting bucket creation.
server/src/test/kotlin/com/adobe/testing/s3mock/store/StoreConfigurationTest.kt Adds regression test for initialBuckets = listOf(\"\").
CHANGELOG.md Notes the bug fix in the planned release section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/src/test/kotlin/com/adobe/testing/s3mock/store/StoreConfigurationTest.kt Outdated
Comment thread CHANGELOG.md
@afranken afranken force-pushed the fix/blank-initial-buckets branch from 1fc8c6f to 4a47101 Compare June 20, 2026 20:32
@afranken afranken merged commit 439bd93 into main Jun 20, 2026
7 checks passed
@afranken afranken deleted the fix/blank-initial-buckets branch June 20, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants