-
Notifications
You must be signed in to change notification settings - Fork 756
feat(smus): Migrate private model from sdk v2 to sdk v3 - GlueCatalog #8396
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
Conversation
|
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
|
|
✅ I finished the code review, and didn't find any security or code quality issues. |
323d7da to
a2845b1
Compare
| import * as GlueCatalogApi from './gluecatalogapi' | ||
| import apiConfig = require('./gluecatalogapi.json') | ||
| import { ServiceConfigurationOptions } from 'aws-sdk/lib/service' | ||
| import { GlueCatalog, Catalog } from '@amzn/glue-catalog-client' |
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.
The naming here is very confusing. You have import here that import both { GlueCatalog, Catalog } , and you have import in above file that import { Catalog as GlueCatalog } from '@amzn/glue-catalog-client', let's make the name consistent.
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.
Let's keep sdk's naming, I would update this line:
{ Catalog as GlueCatalog } from '@amzn/glue-catalog-client'
| undefined, | ||
| false | ||
| )) as GlueCatalogApi | ||
| const creds = await this.connectionCredentialsProvider.getCredentials() |
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.
If I remember correctly, this won't work properly, the goal is to directly pass the credential provider into the client constructor. So that the client can auto-refresh the creds. If you firstly get the creds and pass into the client, it will expire. So try to directly pass the credential provider to the constructor. Check other client implementation for reference
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.
Thanks for pointing this out
bc31b22 to
81c907d
Compare
Summary
This PR migrates the GlueCatalog 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.
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 GlueCatalog.
Solution
GlueCatalogApion the deprecated generateServiceClient.ts scriptfeature/xbranches will not be squash-merged at release time.