Skip to content
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

Create rules for backwards compatibility with database-specific error codes #148

Open
jmle opened this issue Oct 2, 2024 · 3 comments
Open
Assignees
Labels
needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. spring-migration/6 Label for Spring Migration path 5 -> 6 spring-migration/6.0 Label for Spring Migration path 5.x -> 6.0

Comments

@jmle
Copy link
Contributor

jmle commented Oct 2, 2024

According to the migration guide:

For full backwards compatibility with database-specific error codes, consider re-enabling the legacy SQLErrorCodeSQLExceptionTranslator. This translator kicks in for user-provided sql-error-codes.xml files. It can simply pick up Spring's legacy default error code mappings as well when triggered by an empty user-provided file in the root of the classpath.

Investigate and create rules if necessary.

In the rule description and message, try to be as verbose and clear as possible. Code examples are always welcome and useful. Feel free to use markdown syntax for these.

@jmle jmle added spring-migration/6 Label for Spring Migration path 5 -> 6 spring-migration/6.0 Label for Spring Migration path 5.x -> 6.0 labels Oct 2, 2024
@konveyor-ci-bot konveyor-ci-bot bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 2, 2024
@konveyor-ci-bot
Copy link

This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.
The triage/accepted label can be added by org members.

@konveyor-ci-bot konveyor-ci-bot bot added needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. labels Oct 2, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Planning Oct 2, 2024
@jmle
Copy link
Contributor Author

jmle commented Oct 24, 2024

Look for presence of sql-error-codes.xml and create an optional or potential rule, otherwise it might be difficult to know whether this needs to be triggered.

Apparently there is no way of knowing if the SQLErrorCodeSQLExceptionTranslator is being used in an application. If custom error codes are present, then there will be a sql-error-codes.xml file, and the translator will kick in. But if it's not present, it can still be used.

@jmle jmle added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Oct 24, 2024
@konveyor-ci-bot konveyor-ci-bot bot removed the needs-priority Indicates an issue or PR lacks a `priority/foo` label and requires one. label Oct 29, 2024
@jmle jmle moved this from 🆕 New to 📋 Backlog in Planning Nov 18, 2024
@jayfray12 jayfray12 self-assigned this Dec 17, 2024
@jayfray12 jayfray12 moved this from 🔖 Ready to 🏗 In progress in Planning Dec 17, 2024
@jayfray12
Copy link
Contributor

jayfray12 commented Dec 19, 2024

PR for this issue found here:
#205

jayfray12 added a commit to jayfray12/rulesets that referenced this issue Dec 20, 2024
jayfray12 added a commit to jayfray12/rulesets that referenced this issue Dec 20, 2024
jmle pushed a commit that referenced this issue Jan 7, 2025
jmle pushed a commit that referenced this issue Jan 7, 2025
@jayfray12 jayfray12 moved this from 🏗 In progress to ✅ Done in Planning Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. spring-migration/6 Label for Spring Migration path 5 -> 6 spring-migration/6.0 Label for Spring Migration path 5.x -> 6.0
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants