-
Notifications
You must be signed in to change notification settings - Fork 188
Fail PUT object with match on non-existent keys & code optimizations #2503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Overlooked the potential NPE here...
Make them a bit easier to read.
Exclusion is brittle as new StorageClass values may break tests.
5fa1cb1
to
2ba51da
Compare
There was a problem hiding this comment.
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 implements correct failure behavior for PUT requests with If-Match
on non-existent keys, cleans up unused imports and tooling configs, updates Kotlin compiler settings, refactors test support for stability, and bumps the version to 4.6.0-SNAPSHOT.
- Enforce
NO_SUCH_KEY
exception whenIf-Match
is used on missing objects inObjectService
- Added integration tests for
if-match
/if-none-match
PUT semantics and fixed storage-class test enumeration - Bumped project version and Kotlin compiler api/language levels, updated changelog, and removed unused imports
Reviewed Changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
testsupport/*/pom.xml | Bumped snapshot versions to 4.6.0-SNAPSHOT |
testsupport/common/src/.../S3MockStarter.java and DigestUtil.java | Removed unused @NonNull imports |
server/src/.../StoreConfiguration.java | Switched to mockRegion.id() for bucket creation |
server/src/.../ObjectService.java | Throw NO_SUCH_KEY when matching non-existent objects and refactored conditions |
server/src/.../S3MockProperties.java | Removed unused Region import |
pom.xml (root) | Updated Kotlin compiler settings for 2.2 |
integration-tests/src/.../*.kt | Migrated Java-style annotations to Kotlin annotation class and added PUT tests |
integration-tests/src/.../S3TestBase.kt | Replaced dynamic StorageClass stream with fixed list |
Makefile | Added build , verify , and install targets |
CHANGELOG.md | Advanced planned release to 4.7.0, added 4.6.0 release notes |
Comments suppressed due to low confidence (2)
pom.xml:24
- The CHANGELOG shows '4.7.0 - PLANNED', but the POM is set to 4.6.0-SNAPSHOT. Consider bumping the project version to 4.7.0-SNAPSHOT to match the planned release.
<version>4.6.0-SNAPSHOT</version>
pom.xml:86
- The CHANGELOG indicates bumping aws-v2.version to 2.31.77, but this property is still 2.31.67. Update it to 2.31.77 for consistency.
<aws-v2.version>2.31.67</aws-v2.version>
server/src/main/java/com/adobe/testing/s3mock/service/ObjectService.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
StorageClass
values in tests. New values added by AWS sometimes break tests. We want to make sure to test a few different storage classes, no need to test every one.Related Issue
#2502
Tasks