Fix IAST JDBC instrumentation when getMetadata throws non-SQLException#11420
Fix IAST JDBC instrumentation when getMetadata throws non-SQLException#11420smola wants to merge 1 commit into
Conversation
|
362658e to
6a51445
Compare
jandro996
left a comment
There was a problem hiding this comment.
LGTM! Thanks for catch this :)
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a51445772
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| } | ||
|
|
||
| void 'metadata runtime exception does not report unexpected exception on connection method'() { |
There was a problem hiding this comment.
Move the new JDBC coverage to JUnit 5
The repository guidance in /workspace/dd-trace-java/AGENTS.md says test changes must use JUnit 5 and explicitly says not to write new Groovy/Spock tests, migrating existing Groovy tests instead. This adds a new Spock feature method in IastJDBCTest.groovy, so the change violates the local test-framework rule even though it covers the intended scenario; please add this coverage in JUnit 5 rather than extending the Groovy spec.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not migrating a full test class in the same PR.
What Does This Do
JDBCDecoratorhandle non-SQLException exception fromconnection.getMetadata(), and handle it like any other exception.Motivation
SQLException.Additional Notes
Throwable.beforePrepare.Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.