Code cleanup#3927
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR removes many deprecated v1 APIs and implementations (AWS ElasticTranscoder types, WebDAV service, multiple exception types), trims public v1 service interfaces, deletes several Groovy page/scripts and utilities, migrates selected implementations to the v2 ContentService, and updates Spring wiring and constants. ChangesV1 API Deprecation and Cleanup
🎯 4 (Complex) | ⏱️ ~60 minutes Possibly Related PRs
Suggested Reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/java/org/craftercms/studio/api/v1/constant/DmConstants.java (1)
23-59:⚠️ Potential issue | 🟠 Major | ⚡ Quick winKeep deprecated aliases or explicitly treat this as a breaking API change.
org.craftercms.studio.api.v1.constantis still an exported v1 surface. Removing public fields fromDmConstantsturns existing imports into compile failures and can also triggerNoSuchFieldErrorfor already-compiled extensions. If these constants are being retired, please keep deprecated aliases for a release or add explicit migration/release-note coverage for the break.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/main/java/org/craftercms/studio/api/v1/constant/DmConstants.java` around lines 23 - 59, The PR removed or renamed public constants from DmConstants which breaks the v1 API; restore any removed fields (e.g., INDEX_FILE, SLASH_INDEX_FILE, SLASH_SITE_WEBSITE, XML_PATTERN, KEY_CONTENT_TYPE, KEY_PATH, KEY_SITE, KEY_USER, KEY_SOURCE_PATH, KEY_CONTENT_LOADER, ROOT_PATTERN_PAGES, ROOT_PATTERN_COMPONENTS, ROOT_PATTERN_ASSETS, ROOT_PATTERN_DOCUMENTS, CONTENT_LIFECYCLE_OPERATION, JSON_KEY_ORDER_DEFAULT, KEY_APPLICATION_CONTEXT) as deprecated aliases that forward to the new names, annotate them with `@Deprecated` and a Javadoc pointing to the replacement constant, or alternatively document this as a breaking change by keeping them removed only if you add explicit migration notes and bump the public API version; update DmConstants accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/java/org/craftercms/studio/api/v1/asset/processing/AssetProcessingConfigReader.java`:
- Around line 23-25: Update the AssetProcessingConfigReader interface Javadoc to
remove any mention of accepting an Apache Commons Configuration object and
instead document the single exposed method readConfig(InputStream): describe
that callers supply an InputStream, what format(s) are expected, and that the
implementation maps that input to ProcessorPipelineConfiguration and
ProcessorConfiguration objects; reference the interface name
AssetProcessingConfigReader and the method readConfig(InputStream) in the
updated description so the Javadoc matches the current API surface.
---
Outside diff comments:
In `@src/main/java/org/craftercms/studio/api/v1/constant/DmConstants.java`:
- Around line 23-59: The PR removed or renamed public constants from DmConstants
which breaks the v1 API; restore any removed fields (e.g., INDEX_FILE,
SLASH_INDEX_FILE, SLASH_SITE_WEBSITE, XML_PATTERN, KEY_CONTENT_TYPE, KEY_PATH,
KEY_SITE, KEY_USER, KEY_SOURCE_PATH, KEY_CONTENT_LOADER, ROOT_PATTERN_PAGES,
ROOT_PATTERN_COMPONENTS, ROOT_PATTERN_ASSETS, ROOT_PATTERN_DOCUMENTS,
CONTENT_LIFECYCLE_OPERATION, JSON_KEY_ORDER_DEFAULT, KEY_APPLICATION_CONTEXT) as
deprecated aliases that forward to the new names, annotate them with `@Deprecated`
and a Javadoc pointing to the replacement constant, or alternatively document
this as a breaking change by keeping them removed only if you add explicit
migration notes and bump the public API version; update DmConstants accordingly.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d8dbea3b-c443-40c4-a4fd-353515640a5f
📒 Files selected for processing (42)
src/main/java/org/craftercms/studio/api/v1/asset/processing/AssetProcessingConfigReader.javasrc/main/java/org/craftercms/studio/api/v1/aws/elastictranscoder/ElasticTranscoder.javasrc/main/java/org/craftercms/studio/api/v1/aws/elastictranscoder/TranscoderJob.javasrc/main/java/org/craftercms/studio/api/v1/aws/elastictranscoder/TranscoderOutput.javasrc/main/java/org/craftercms/studio/api/v1/aws/elastictranscoder/TranscoderProfile.javasrc/main/java/org/craftercms/studio/api/v1/aws/mediaconvert/MediaConvertJob.javasrc/main/java/org/craftercms/studio/api/v1/aws/s3/S3Output.javasrc/main/java/org/craftercms/studio/api/v1/constant/DmConstants.javasrc/main/java/org/craftercms/studio/api/v1/constant/DmXmlConstants.javasrc/main/java/org/craftercms/studio/api/v1/constant/StudioConstants.javasrc/main/java/org/craftercms/studio/api/v1/exception/ContentNotAllowedException.javasrc/main/java/org/craftercms/studio/api/v1/exception/ContentProcessException.javasrc/main/java/org/craftercms/studio/api/v1/exception/SiteCreationException.javasrc/main/java/org/craftercms/studio/api/v1/exception/repository/RemoteRepositoryNotBareException.javasrc/main/java/org/craftercms/studio/api/v1/service/content/ContentService.javasrc/main/java/org/craftercms/studio/api/v1/service/security/SecurityService.javasrc/main/java/org/craftercms/studio/api/v1/service/webdav/WebDavService.javasrc/main/java/org/craftercms/studio/api/v1/to/SiteConfigTO.javasrc/main/java/org/craftercms/studio/impl/v1/asset/processing/AssetProcessingConfigReaderImpl.javasrc/main/java/org/craftercms/studio/impl/v1/aws/elastictranscoder/TranscoderProfileMapper.javasrc/main/java/org/craftercms/studio/impl/v1/service/configuration/ServicesConfigImpl.javasrc/main/java/org/craftercms/studio/impl/v1/service/content/ContentServiceImpl.javasrc/main/java/org/craftercms/studio/impl/v1/service/security/SecurityServiceImpl.javasrc/main/java/org/craftercms/studio/impl/v1/service/webdav/WebDavServiceImpl.javasrc/main/java/org/craftercms/studio/impl/v1/util/config/profiles/SiteAwareConfigProfileLoader.javasrc/main/java/org/craftercms/studio/impl/v2/service/scripting/internal/ScriptingServiceInternalImpl.javasrc/main/java/org/craftercms/studio/impl/v2/upgrade/operations/db/MigrateWorkflowUpgradeOperation.javasrc/main/java/org/craftercms/studio/model/Entity.javasrc/main/java/org/craftercms/studio/model/Site.javasrc/main/resources/crafter/studio/studio-services-context.xmlsrc/main/resources/crafter/studio/studio-upgrade-context.xmlsrc/main/webapp/default-site/scripts/api/ContentServices.groovysrc/main/webapp/default-site/scripts/api/impl/content/SpringContentServices.groovysrc/main/webapp/default-site/scripts/api/impl/user/SpringUserServices.groovysrc/main/webapp/default-site/scripts/libs/HTMLCompareTools.groovysrc/main/webapp/default-site/scripts/pages/analytics-dashboard.groovysrc/main/webapp/default-site/scripts/pages/browse.groovysrc/main/webapp/default-site/scripts/pages/browseS3.groovysrc/main/webapp/default-site/scripts/pages/browseWebDAV.groovysrc/main/webapp/default-site/scripts/pages/diff.groovysrc/main/webapp/default-site/scripts/pages/overlay-css.groovysrc/main/webapp/default-site/scripts/pages/overlayhook.groovy
💤 Files with no reviewable changes (32)
- src/main/java/org/craftercms/studio/api/v1/exception/ContentProcessException.java
- src/main/java/org/craftercms/studio/api/v1/aws/elastictranscoder/TranscoderOutput.java
- src/main/java/org/craftercms/studio/api/v1/exception/ContentNotAllowedException.java
- src/main/java/org/craftercms/studio/api/v1/aws/elastictranscoder/ElasticTranscoder.java
- src/main/webapp/default-site/scripts/pages/analytics-dashboard.groovy
- src/main/java/org/craftercms/studio/api/v1/aws/elastictranscoder/TranscoderJob.java
- src/main/java/org/craftercms/studio/model/Entity.java
- src/main/java/org/craftercms/studio/api/v1/aws/s3/S3Output.java
- src/main/webapp/default-site/scripts/api/ContentServices.groovy
- src/main/webapp/default-site/scripts/pages/overlay-css.groovy
- src/main/java/org/craftercms/studio/api/v1/aws/mediaconvert/MediaConvertJob.java
- src/main/webapp/default-site/scripts/pages/browseWebDAV.groovy
- src/main/webapp/default-site/scripts/api/impl/user/SpringUserServices.groovy
- src/main/java/org/craftercms/studio/impl/v1/service/configuration/ServicesConfigImpl.java
- src/main/java/org/craftercms/studio/api/v1/to/SiteConfigTO.java
- src/main/java/org/craftercms/studio/api/v1/aws/elastictranscoder/TranscoderProfile.java
- src/main/java/org/craftercms/studio/api/v1/exception/SiteCreationException.java
- src/main/webapp/default-site/scripts/pages/browse.groovy
- src/main/java/org/craftercms/studio/impl/v1/aws/elastictranscoder/TranscoderProfileMapper.java
- src/main/webapp/default-site/scripts/pages/diff.groovy
- src/main/java/org/craftercms/studio/impl/v1/service/webdav/WebDavServiceImpl.java
- src/main/resources/crafter/studio/studio-upgrade-context.xml
- src/main/java/org/craftercms/studio/impl/v2/upgrade/operations/db/MigrateWorkflowUpgradeOperation.java
- src/main/java/org/craftercms/studio/api/v1/service/content/ContentService.java
- src/main/webapp/default-site/scripts/pages/overlayhook.groovy
- src/main/java/org/craftercms/studio/api/v1/constant/StudioConstants.java
- src/main/webapp/default-site/scripts/libs/HTMLCompareTools.groovy
- src/main/java/org/craftercms/studio/api/v1/service/security/SecurityService.java
- src/main/webapp/default-site/scripts/pages/browseS3.groovy
- src/main/java/org/craftercms/studio/api/v1/service/webdav/WebDavService.java
- src/main/webapp/default-site/scripts/api/impl/content/SpringContentServices.groovy
- src/main/java/org/craftercms/studio/api/v1/exception/repository/RemoteRepositoryNotBareException.java
|
@coderabbitai do you think this is ready for a human to review? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Get PR details
gh pr view 3927 --repo craftercms/studio --json state,isDraft,reviewDecision,statusCheckRollup,title
echo "---REVIEW_COMMENTS---"
# List review comments (inline)
gh api repos/craftercms/studio/pulls/3927/comments --jq '[.[] | {id, path, body: .body[0:120], resolved: .resolved}]' 2>/dev/null | head -100
echo "---ISSUE_COMMENTS---"
# List PR-level (issue) comments
gh api repos/craftercms/studio/issues/3927/comments --jq '[.[] | {id, user: .user.login, body: .body[0:200]}]' 2>/dev/null | head -100
echo "---CHECKS---"
gh pr checks 3927 --repo craftercms/studio 2>/dev/null | head -40Length of output: 2768
Once the CI build is green and that Javadoc nit is addressed, this PR looks ready for a human reviewer — the overall scope (removing deprecated v1 APIs, dead code, and migrating bean wiring to v2) is well-contained and the intent is clear. |
|
@coderabbitai check again, can't find that unresolved comment in AssetProcessingConfigReader |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# List all review comments on the PR
echo "---REVIEW_COMMENTS---"
gh api repos/craftercms/studio/pulls/3927/comments \
--jq '[.[] | {id, path, body: .body[0:200], resolved: (.resolved // "N/A")}]' 2>/dev/null
echo "---PR STATE---"
gh pr view 3927 --repo craftercms/studio --json state,isDraft,reviewDecision,title
echo "---CHECKS---"
gh pr checks 3927 --repo craftercms/studio 2>/dev/nullLength of output: 1455 🏁 Script executed: #!/bin/bash
# Get the HTML URL of the specific comment
gh api repos/craftercms/studio/pulls/comments/3283788718 \
--jq '{id, path, html_url, body: .body[0:300]}'Length of output: 755
It's on |
|
@coderabbitai the comment has been addressed and resolved |
|
Tip For best results, initiate chat on the files or code changes.
(╯✿◕‿◕)╯ If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
Code cleanup
craftercms/craftercms#6061
Summary by CodeRabbit
Deprecations & Removals
Infrastructure Updates