Skip to content

fix(smus): Do not call getDatabases when a catalog is an empty parent catalog#8363

Merged
chungjac merged 5 commits intoaws:masterfrom
liuzulin:master
Dec 5, 2025
Merged

fix(smus): Do not call getDatabases when a catalog is an empty parent catalog#8363
chungjac merged 5 commits intoaws:masterfrom
liuzulin:master

Conversation

@liuzulin
Copy link
Contributor

Problem

A bug is reported that when s3 table catalog is empty, there is getDatabases call being made and cause unwanted error

Solution

Handle the issue by not calling getDatabases when a catalog node is an empty parent node


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@liuzulin liuzulin requested a review from a team as a code owner November 24, 2025 22:07
Copy link
Contributor

Choose a reason for hiding this comment

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

For my own understanding. Is this where we should add the change log for next release? Should we starting doing this for all our PRs?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Team can changeLog if they want to inform user about the fix, feature in the new release. Just like a small announcement/information for their context. Highly recommend changeLog for user facing changes.

}
return (
catalog.FederatedCatalog?.ConnectionName === 'aws:redshift' ||
catalog.CatalogProperties?.DataLakeAccessProperties?.CatalogType === 'aws:redshift'
Copy link
Contributor

@PotatoWKY PotatoWKY Nov 24, 2025

Choose a reason for hiding this comment

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

Nit: would it be simpler to just add ? on catalog?

return catalog?.FederatedCatalog?.ConnectionName === 'aws:redshift' || 
catalog?.CatalogProperties?.DataLakeAccessProperties?.CatalogType === 'aws:redshift'

@chungjac chungjac merged commit 94bd3fd into aws:master Dec 5, 2025
31 checks passed
aws-ajangg pushed a commit to aws-ajangg/aws-toolkit-vscode that referenced this pull request Jan 15, 2026
… catalog (aws#8363)

## Problem
A bug is reported that when s3 table catalog is empty, there is
getDatabases call being made and cause unwanted error

## Solution
Handle the issue by not calling getDatabases when a catalog node is an
empty parent node



---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

---------

Co-authored-by: Zulin Liu <zulil@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants