| Files | Last commit | Last update |
|---|---|---|
feat: add version.properties to core and service jars (#7432) * feat: add version.properties to core module jars Generate META-INF/software.amazon.awssdk/<artifactId>/version.properties in every core module jar so build tooling can read the SDK version without loading SDK classes. The build fails if a module does not produce it. * feat: write minor version and cover service jars Write the SDK minor version (for example 2.56.x) to version.properties instead of the full version, so the file only changes on minor version bumps. Generate the file for service modules as well, using one shared definition in the root pom that core and services opt into, and move the template to build-tools. Fail the build if the minor version was not parsed. | 1 month ago | |
feat: add @SdkAdvancedApi annotation for error-prone APIs (#7203) * feat: add @SdkAdvancedApi annotation for error-prone APIs Introduce @SdkAdvancedApi in core/annotations to mark APIs that are error-prone to implement, override, call, or configure: misuse compiles cleanly but can fail or misbehave at runtime rather than reporting a clear error. The annotation carries structured, machine-readable guidance (caution kind, contract explanation, safer alternative, and a documentation link) with CLASS retention so build-time or static-analysis tooling can consume it, matching the existing @NotThreadSafe/@Immutable markers. Apply it to the streaming and interceptor extension points identified as error-prone: AsyncRequestBody (type + fromPublisher), AsyncResponseTransformer (type + toPublisher overloads), ResponseTransformer, ContentStreamProvider, the mutating ExecutionInterceptor content hooks (modifyHttpContent, modifyAsyncHttpContent), and the FUTURE_COMPLETION_EXECUTOR advanced client option. This is an advisory marker only: it does not gate compilation and adds no runtime behavior, so it is source and binary compatible. * build: cap @SdkAdvancedApi guidance and saferAlternative length Add a source-AST checkstyle check that fails the build when a guidance or saferAlternative value on @SdkAdvancedApi exceeds 1000 characters. Values are multi-line string concatenations, so the check sums the decoded length of every concatenated literal. Keeps the text short enough to be useful inline; the longest current message is 637. * Address PR review feedback on @SdkAdvancedApi guidance Correct the ResponseTransformer guidance: the SDK (via CombinedResponseHandler) drains and closes the response stream after transform() returns, so the implementation does not need to close it; the prior 'must close' wording contradicted the interface Javadoc. Reword the FUTURE_COMPLETION_EXECUTOR guidance to describe the risky executor as one that does not dispatch to a separate thread rather than naming an I/O thread. Minor formatting reflow in the AsyncResponseTransformer guidance string. * Remove @SdkAdvancedApi from ResponseTransformer Scope the initial rollout to the higher-severity extension points. The sync ResponseTransformer is a plain callback whose only contract is thread-interrupt handling (low priority); revisit if warranted. * Rename @SdkAdvancedApi caution() to cautionWhen() and Caution to Usage Per API review feedback: cautionWhen = Usage.IMPLEMENTED reads more naturally than caution = Caution.WHEN_IMPLEMENTED. Values drop the WHEN_ prefix since the member now carries it. | 3 months ago |