feat(usage): deprecate legacy periodic-usage endpoints [MOI-7252] - #224
Conversation
Changelist by BitoThis pull request implements the following key changes.
|
|
| Source | Requirement / Code Area | Status | Notes |
|---|---|---|---|
| MOI-7252 | Add Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag to ModuleOrganizationUsage#fetchAll methods (sync + async) in ModuleOrganizationUsage.java with sunset date 2027-02-28 | ✅ Met | Both sync and async fetchAll methods in src/main/java/com/contentful/java/cma/ModuleOrganizationUsage.java now have Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag with sunset date 2027-02-28, matching the pattern from contentful-management.js (PR #3088). |
| MOI-7252 | Add Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag to ModuleSpaceUsage#fetchAll methods (sync + async) in ModuleSpaceUsage.java with sunset date 2027-02-28 | ✅ Met | Both sync and async fetchAll methods in src/main/java/com/contentful/java/cma/ModuleSpaceUsage.java now have Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag with sunset date 2027-02-28, matching the pattern from contentful-management.js (PR #3088). |
| MOI-7252 | Add Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag to ServiceOrganizationUsage#fetchAll methods (both overloads) in ServiceOrganizationUsage.java with sunset date 2027-02-28 | ✅ Met | Both fetchAll method overloads in src/main/java/com/contentful/java/cma/ServiceOrganizationUsage.java now have Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag with sunset date 2027-02-28, matching the pattern from contentful-management.js (PR #3088). |
| MOI-7252 | Add Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag to ServiceSpaceUsage#fetchAll methods (both overloads) in ServiceSpaceUsage.java with sunset date 2027-02-28 | ✅ Met | Both fetchAll method overloads in src/main/java/com/contentful/java/cma/ServiceSpaceUsage.java now have Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag with sunset date 2027-02-28, matching the pattern from contentful-management.js (PR #3088). |
| MOI-7252 | Add Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag to CMAUsage model class in model/CMAUsage.java with sunset date 2027-02-28 | ✅ Met | The CMAUsage model class in src/main/java/com/contentful/java/cma/model/CMAUsage.java now has Daniel Edeling (@deprecated) annotation and Javadoc Daniel Edeling (@deprecated) tag with sunset date 2027-02-28, matching the pattern from contentful-management.js (PR #3088). |
Impact Analysis by BitoInteraction DiagramsequenceDiagram
participant App as Application<br/>🔄 Updated | ●○○ Low
participant Client as CMAClient<br/>🔄 Updated | ●○○ Low
participant ModOrg as ModuleOrganizationUsage<br/>🔄 Updated | ●●○ Medium
participant ModSpace as ModuleSpaceUsage<br/>🔄 Updated | ●●○ Medium
participant SvcOrg as ServiceOrganizationUsage<br/>🔄 Updated | ●●○ Medium
participant SvcSpace as ServiceSpaceUsage<br/>🔄 Updated | ●●○ Medium
participant Model as CMAUsage Model<br/>🔄 Updated | ●●○ Medium
participant API as Contentful REST API<br/>🔄 Updated | ●●○ Medium
Note over ModOrg, ModSpace: Deprecated annotation added<br/>Endpoints return 410 Gone after 2027-02-28
App->>Client: Get usage module instance
Client->>ModOrg: Instantiate ModuleOrganizationUsage
Client->>ModSpace: Instantiate ModuleSpaceUsage
App->>ModOrg: Call fetchAll(orgId, query)
ModOrg->>SvcOrg: Delegate HTTP request
SvcOrg->>API: GET organization_periodic_usages
Note over API: Returns CMAArray of CMAUsage objects
API-->>SvcOrg: Flowable response
SvcOrg-->>ModOrg: CMAArray<CMAUsage>
ModOrg-->>App: CMAArray<CMAUsage>
App->>ModSpace: Call fetchAll(orgId, query)
ModSpace->>SvcSpace: Delegate HTTP request
SvcSpace->>API: GET space_periodic_usages
API-->>SvcSpace: Flowable response
SvcSpace-->>ModSpace: CMAArray<CMAUsage>
ModSpace-->>App: CMAArray<CMAUsage>
This PR marks the organization and space periodic usage API endpoints as deprecated across the SDK. The Daniel Edeling (@deprecated) annotation is added to 5 files: ModuleOrganizationUsage, ModuleSpaceUsage, ServiceOrganizationUsage, ServiceSpaceUsage, and CMAUsage model. These endpoints will return 410 Gone responses after February 28, 2027. No upstream or downstream cross-repo impact detected. Applications using the CMAClient to fetch usage data will now see deprecation warnings at compile time, prompting migration to the new Usage API. Cross-Repository Impact Analysis
Code Paths AnalyzedImpact: Flow: Direct Changes (Diff Files): Repository Impact: Cross-Repository Dependencies: Database/Caching Impact: API Contract Violations: Infrastructure Dependencies: Additional Insights: Testing RecommendationsFrontend Impact: Service Integration: Data Serialization: Privacy Compliance: Backward Compatibility: OAuth Functionality: Cross-Service Communication: Reliability Testing: Additional Insights: Analysis based on known dependency patterns and edges. Actual impact may vary. |
There was a problem hiding this comment.
Code Review Agent Run #cc5538
Actionable Suggestions - 1
-
src/main/java/com/contentful/java/cma/model/CMAUsage.java - 1
- Deprecation notice inconsistent · Line 6-8
Additional Suggestions - 1
-
src/main/java/com/contentful/java/cma/ModuleSpaceUsage.java - 1
-
Annotation style inconsistency · Line 44-44The `@Deprecated` annotation placement at line 44 has a blank line before and after it, diverging from the established style in `ModuleOrganizationUsage` (lines 44, 77) where `@Deprecated` is placed inline immediately before `public` with no blank lines. For consistent deprecation signaling across both deprecated usage modules, align the annotation style.
-
Review Details
-
Files reviewed - 5 · Commit Range:
b660fe0..b660fe0- src/main/java/com/contentful/java/cma/ModuleOrganizationUsage.java
- src/main/java/com/contentful/java/cma/ModuleSpaceUsage.java
- src/main/java/com/contentful/java/cma/ServiceOrganizationUsage.java
- src/main/java/com/contentful/java/cma/ServiceSpaceUsage.java
- src/main/java/com/contentful/java/cma/model/CMAUsage.java
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- Java-google-format (Linter) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at jared.jolton@contentful.com.
Documentation & Help
✅ Review Settings OverriddenStatus: Guidelines:
Note: Extra guidelines beyond 3 general purpose guidelines and 1 language specific guideline per language are not processed. Guidelines are fetched from the source branch. |
|
Re: the "Additional Suggestions" item flagging an annotation-style inconsistency in |
b660fe0 to
73ae393
Compare
Code Review Agent Run #3a6b08Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Bumps cma-sdk from 3.4.23 to 3.5.0. Minor bump rather than patch: this release deprecates the legacy periodic-usage endpoints, which is a public-API signal to consumers. The change itself is additive (annotations only), so nothing breaks. Contents: - deprecate legacy periodic-usage endpoints [MOI-7252] (#224) - redact Authorization header in LogInterceptor [AIS-247] (#212) - Renovate setup, devcontainer workflow, CI alert routing, Golden Context docs Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bumps cma-sdk from 3.4.23 to 3.5.0. Minor bump rather than patch: this release deprecates the legacy periodic-usage endpoints, which is a public-API signal to consumers. The change itself is additive (annotations only), so nothing breaks. Contents: - deprecate legacy periodic-usage endpoints [MOI-7252] (#224) - redact Authorization header in LogInterceptor [AIS-247] (#212) - Renovate setup, devcontainer workflow, CI alert routing, Golden Context docs Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Ticket: https://contentful.atlassian.net/browse/MOI-7252
Summary by Bito
This PR deprecates the legacy organization_periodic_usages and space_periodic_usages API endpoints in the Contentful Management Java SDK by adding Daniel Edeling (@deprecated) annotations and Javadoc warnings across five files, indicating these endpoints will be removed on 2027-02-28.
Detailed Changes