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

Apache LS does not add DB connection #6080

Merged
merged 1 commit into from
Jun 16, 2023
Merged

Apache LS does not add DB connection #6080

merged 1 commit into from
Jun 16, 2023

Conversation

thurka
Copy link
Contributor

@thurka thurka commented Jun 15, 2023

VSCode only: Sometimes new DB connection is not displayed even if URL and username, password are correctly entered. This probem is caused by unconditionally removing database commection in finally block in validate() method. The rest of the code expects that such connection is reused if there are no schemas. The fix is to change the finally block to remove connection only in case of connection failure or non-empty list of schemas is retrieved from database.

@thurka thurka added LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests labels Jun 15, 2023
@thurka thurka requested a review from jhorvath June 15, 2023 12:23
@thurka thurka self-assigned this Jun 15, 2023
Copy link
Contributor

@jhorvath jhorvath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@thurka thurka merged commit 5af5f30 into apache:master Jun 16, 2023
34 checks passed
@thurka thurka deleted the GCN-2736 branch June 16, 2023 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants