-
Notifications
You must be signed in to change notification settings - Fork 158
Add CAP Java 5.0 OpenRewrite recipes to migration table #2647
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
Open
rjayasinghe
wants to merge
3
commits into
main
Choose a base branch
from
update_recipe_list
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+13
−2
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,10 +37,10 @@ As migration is a one-time operation, run the OpenRewrite `recipes` as a command | |
| ```bash-vue | ||
| mvn org.openrewrite.maven:rewrite-maven-plugin:run \ | ||
| -Drewrite.recipeArtifactCoordinates=com.sap.cds:cds-services-recipes:{{ versions.java_services }} \ | ||
| -Drewrite.activeRecipes=com.sap.cds.services.migrations.Cap_4.9 | ||
| -Drewrite.activeRecipes=com.sap.cds.services.migrations.Cap_5.0 | ||
| ``` | ||
|
|
||
| Here, the *recipe* `com.sap.cds.services.migrations.Cap_4.9` from CAP Java's OpenRewrite Maven artifact `com.sap.cds:cds-services-recipes` is called in the given project context. The *recipe* is a container for one or more recipes. A recipe is a rule that tells OpenRewrite how to transform code. | ||
| Here, the *recipe* `com.sap.cds.services.migrations.Cap_5.0` from CAP Java's OpenRewrite Maven artifact `com.sap.cds:cds-services-recipes` is called in the given project context. The *recipe* is a container for one or more recipes. A recipe is a rule that tells OpenRewrite how to transform code. | ||
|
|
||
| ### Currently Released CAP Java Migrations | ||
|
|
||
|
|
@@ -52,6 +52,17 @@ The following table lists the individual recipes provided by CAP for APIs that h | |
| |[com.sap.cds.services.migrations.ServiceExceptionUtils](#removed-java-apis-4-to-5)|Replaces deprecated methods in `ServiceExceptionUtils`.|4.9.0| | ||
| |[com.sap.cds.services.migrations.MigrateSaasRegistryDependency](#removed-java-apis-4-to-5)|Replaces deprecated `SaasRegistryDependency` methods `setAppId`/`setAppName`/`getAppId`/`getAppName` with their `xsappname`-based replacements.|4.9.0| | ||
| |[com.sap.cds.services.migrations.UclMigration](#removed-java-apis-4-to-5)|Migrates deprecated UCL result getter and setter methods to the new API.|4.9.0| | ||
| |com.sap.cds.services.migrations.Cap_4.9_Properties|Replaces deprecated application properties with their CAP Java 4.9 equivalents (for example `cds.mcp.autoConfig.*` → `cds.mcp.autoWired.*`, `cds.taskScheduler.enabled` → `cds.outbox.persistent.scheduler.enabled`).|4.9.0| | ||
| |[com.sap.cds.services.migrations.Cap_5.0_Properties](#removed-properties-4-to-5)|Removes application properties that are no longer supported in CAP Java 5.0 and have no replacement (for example `cds.errors.combined`, `cds.sql.collate`, `cds.sql.hana.optimizationMode`, `cds.odataV4.searchMode`, `cds.odataV2.searchMode`, and the removed `cds.multiTenancy.serviceManager.*` flags).|5.0.0| | ||
| |[com.sap.cds.services.migrations.Cap_5.0_OutboxOrdered](#adjusted-defaults-4-to-5)|Adds `ordered: true` to every custom entry under `cds.outbox.services` (except the built-in `DefaultOutboxOrdered`/`DefaultOutboxUnordered`) to preserve the previous behavior, as the default of `cds.outbox.services.<name>.ordered` changes from `true` to `false` in CAP Java 5.0.|5.0.0| | ||
|
|
||
| In addition, the following umbrella recipes are provided per release. Each one includes all individual recipes for APIs deprecated in this AND previous releases, plus Maven dependency upgrades for all CAP Java modules to the matching version. Run the latest umbrella recipe matching the version of the CAP Java SDK you are upgrading to. | ||
|
|
||
| |Name |Description|Available since| | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The table feels redundant as the table above already specifies the initial release of the recipe. It´s the same information in a different representation. Maybe it is sufficient to tell that each release gets a dedicated umbrella recipe. |
||
| |--------|-----------|---------------| | ||
| |com.sap.cds.services.migrations.Cap_4.8|Migrates an application to CAP Java SDK 4.8. Includes `MigrateStatements` and upgrades all CAP Java Maven dependencies to `4.8.x`.|4.8.0| | ||
| |com.sap.cds.services.migrations.Cap_4.9|Migrates an application to CAP Java SDK 4.9. Includes `Cap_4.8`, `UclMigration`, `MigrateSaasRegistryDependency`, `ServiceExceptionUtils`, `Cap_4.9_Properties`, and upgrades all CAP Java Maven dependencies to `4.9.x`.|4.9.0| | ||
| |com.sap.cds.services.migrations.Cap_5.0|Migrates an application to CAP Java SDK 5.0. Includes `Cap_4.9`, `Cap_5.0_Properties`, `Cap_5.0_OutboxOrdered`, and upgrades all CAP Java Maven dependencies to `5.0.x`.|5.0.0| | ||
|
|
||
| ## CAP Java 4.9 to CAP Java 5.0 (TBA) { #four-to-five } | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
So far we didn´t put the CAP version as part of recipe name for individual recipes. except the ones for properties and the umbrella ones. But that´s not changeable anymore I guess.