Skip to content

Commit 573b674

Browse files
liuzulinsjc25-test
andauthored
feat(sagemakerunifiedstudio): Wire connection credentials provider and bug fixes (aws#2196)
## Problem This PR addressing following problems: 1. Handle rendering s3 access grant node 2. Implement client store to create separate clients for different connections 3. Fix rendering s3 table catalog in Lakehouse node 4. Wire connection credentials provider and bug fixes 5. Adapt connection credentials provider for private model clients (sqlworkbench, gluecatalog) 6. UX: move all s3 nodes under "Buckets" folder Rev 2: 1. Addressed comments 2. bug fixes ## Solution 1. Handle rendering s3 access grant node `createS3AccessGrantNodes` in `sagemakerUnifiedStudioDataNode.ts` and `s3Strategy.ts` 3. Implement client store to create separate clients for different connections `src/sagemakerunifiedstudio/shared/client/clientStore.ts` 4. Fix rendering s3 table catalog in Lakehouse node `src/sagemakerunifiedstudio/explorer/nodes/lakehouseStrategy.ts` 5. Wire connection credentials provider and bug fixes Involving all strategy files and client files 6. Adapt connection credentials provider for private model clients (sqlworkbench, gluecatalog) `src/sagemakerunifiedstudio/shared/client/credentialsAdapter.ts` 7. UX: move all s3 nodes under "Buckets" folder `src/sagemakerunifiedstudio/explorer/nodes/s3Strategy.ts` --- - 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 <[email protected]>
1 parent 711c488 commit 573b674

30 files changed

+2970
-400
lines changed

package-lock.json

Lines changed: 1352 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@
575575
"@aws-sdk/client-iam": "<3.731.0",
576576
"@aws-sdk/client-lambda": "<3.731.0",
577577
"@aws-sdk/client-s3": "<3.731.0",
578+
"@aws-sdk/client-s3-control": "^3.830.0",
578579
"@aws-sdk/client-sagemaker": "<3.696.0",
579580
"@aws-sdk/client-ssm": "<3.731.0",
580581
"@aws-sdk/client-sso": "<3.731.0",

packages/core/src/sagemakerunifiedstudio/auth/providers/connectionCredentialsProvider.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ export class ConnectionCredentialsProvider implements CredentialsProvider {
147147
validateCredentialFields(
148148
connectionCredentials,
149149
'InvalidConnectionCredentials',
150-
'connection credential response'
150+
'connection credential response',
151+
true
151152
)
152153

153154
// Create AWS credentials with expiration

packages/core/src/sagemakerunifiedstudio/auth/providers/smusAuthenticationProvider.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { getLogger } from '../../../shared/logger/logger'
1919
import { DomainExecRoleCredentialsProvider } from './domainExecRoleCredentialsProvider'
2020
import { ProjectRoleCredentialsProvider } from './projectRoleCredentialsProvider'
2121
import { ConnectionCredentialsProvider } from './connectionCredentialsProvider'
22+
import { ConnectionClientStore } from '../../shared/client/connectionClientStore'
2223

2324
/**
2425
* Sets the context variable for SageMaker Unified Studio connection state
@@ -59,6 +60,8 @@ export class SmusAuthenticationProvider {
5960
this.projectCredentialProvidersCache.clear()
6061
// Clear connection provider cache when connection changes
6162
this.connectionCredentialProvidersCache.clear()
63+
// Clear all clients in client store when connection changes
64+
ConnectionClientStore.getInstance().clearAll()
6265
await setSmusConnectedContext(this.isConnected())
6366
this.onDidChangeEmitter.fire()
6467
})

0 commit comments

Comments
 (0)