-
Notifications
You must be signed in to change notification settings - Fork 754
feat(smus): Upgrade sdk v2 to sdk v3 - SQLWorkbench #8407
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
base: master
Are you sure you want to change the base?
Conversation
|
d7f13ec to
b4221d9
Compare
b4221d9 to
474cc64
Compare
liuzulin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you describe what manual tests you performed for this change
| }, | ||
| { | ||
| parentId: schemaConnectionConfig.database, | ||
| parentId: schemaConnectionConfig.database || '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need this change? let's avoid default to empty unless it's necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this is needed.
SDK v3 Type Definitions:
From the new @amzn/sql-workbench-client SDK v3 (3.0.0.tgz):
// ParentResource interface - parentId is required string
export interface ParentResource {
parentId: string; // Required, non-nullable
parentType: string;
}
// DatabaseConnectionConfiguration - database is optional
export interface DatabaseConnectionConfiguration {
// ...
database?: string | undefined; // Optional
}The Problem:
schemaConnectionConfig.database has type string | undefined (because database is optional in DatabaseConnectionConfiguration)
parentId in ParentResource requires type string (non-nullable)
TypeScript won't allow assigning string | undefined to string
The Fix:
parentId: schemaConnectionConfig.database || ''
|
Summary
This PR migrates the SQLWorkbench custom API client from the deprecated AWS SDK v2 generator pattern to standalone AWS SDK v3-compatible packages. This migration is required as part of the broader AWS Toolkit repository migration from SDK v2 to v3.
Problem
The AWS Toolkit VSCode repository is deprecating the centralized generateServiceClient.ts script that generates TypeScript clients from service JSON definitions. The SageMaker Unified Studio (SMUS) team currently uses this v2 generator for SQLWorkbench.
Solution
feature/xbranches will not be squash-merged at release time.