Repository navigation
[PECOBLR-595] Add vendor codes for incorrect token and host - #910
Merged
Merged
Conversation
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
…r-codes-2 # Conflicts: # src/main/java/com/databricks/jdbc/common/util/ValidationUtil.java # src/main/java/com/databricks/jdbc/exception/DatabricksSQLException.java # src/main/java/com/databricks/jdbc/exception/DatabricksValidationException.java # src/test/java/com/databricks/jdbc/api/impl/DatabricksConnectionContextTest.java
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances vendor code functionality by adding automatic vendor code detection from error messages and host information. The changes refactor the existing vendor code system to support dynamic code extraction from exceptions while maintaining compatibility with existing error handling.
- Refactors DatabricksVendorCodes to DatabricksVendorCode with enhanced pattern matching capabilities
- Adds automatic vendor code detection for incorrect tokens and hosts based on exception messages
- Updates exception constructors to automatically extract vendor codes from throwable chains
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/com/databricks/jdbc/exception/DatabricksVendorCode.java | Complete refactor with new pattern matching methods for vendor code detection |
| src/main/java/com/databricks/jdbc/exception/DatabricksSQLException.java | Updated constructors to automatically extract vendor codes from exceptions |
| src/main/java/com/databricks/jdbc/common/util/ValidationUtil.java | Updated import references and enhanced HTTP error handling with JSON parsing |
| src/main/java/com/databricks/jdbc/exception/DatabricksValidationException.java | Removed unused constructor overload |
| src/main/java/com/databricks/jdbc/dbclient/impl/thrift/DatabricksHttpTTransport.java | Modified to pass original exception instead of error message |
| src/main/java/com/databricks/jdbc/common/error/DatabricksVendorCodes.java | Deleted old vendor codes class |
| src/test/java/com/databricks/jdbc/exception/DatabricksVendorCodeTest.java | Comprehensive test suite for new vendor code detection functionality |
| src/test/java/com/databricks/jdbc/api/impl/DatabricksConnectionContextTest.java | Updated import references to new vendor code class |
Signed-off-by: Vikrant Puppala <[email protected]>
Signed-off-by: Vikrant Puppala <[email protected]>
jprakash-db
reviewed
Jul 24, 2025
jprakash-db
approved these changes
Jul 24, 2025
jprakash-db
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Thanks for making the changes
eric-wang-1990
added a commit
that referenced
this pull request
Jul 24, 2026
Align the JDBC integration-test sender with design #910: the sender no longer picks a backend. Both dispatch paths (the single `integration-test` label preview and the merge-queue required gate) send one payload — {pr_number, commit_sha, pr_repo, pr_url, proxy_mode: 'replay'} — and driver-test's receiver runs the full replay matrix (thrift + sea), reporting one aggregated "JDBC Integration Tests" check. - Drop the `integration-test-sea` label and the label→jdbc_mode resolution; one `integration-test` label now previews the full replay run. - Remove jdbc_mode from both dispatch payloads. - SEA is now part of the required merge-queue gate (was preview-only), since the receiver runs both backends. Pairs with the receiver change (databricks-driver-test #908) that computes the backend matrix and aggregates the check. Co-authored-by: Isaac Signed-off-by: Eric Wang <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR enhances vendor code functionality by adding automatic vendor code detection from error messages and host information. The changes refactor the existing vendor code system to support dynamic code extraction from exceptions while maintaining compatibility with existing error handling.
Refactors DatabricksVendorCodes to DatabricksVendorCode with enhanced pattern matching capabilities
Adds automatic vendor code detection for incorrect tokens and hosts based on exception messages
Updates exception constructors to automatically extract vendor codes from throwable chains
Testing
Unit + manual testing
Additional Notes to the Reviewer