{{ message }}
chore: executor framework admin actions code#8093
Draft
alkatrivedi wants to merge 1 commit intomainfrom
Draft
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request implements instance management functionality in the CloudClientExecutor, including update, delete, list, and get operations. Review feedback identifies a missing import for status, a logic error in the executeUpdateCloudInstance method where displayName was incorrectly assigned, and the hardcoding of nextPageToken which prevents proper pagination in executeListCloudInstances.
Contributor
There was a problem hiding this comment.
The code uses status.OK in several methods (lines 374, 409), but status is not imported in this file. It should be imported from @grpc/grpc-js to avoid a ReferenceError.
Suggested change
| import {OutcomeSender, ExecutionFlowContextInterface, CloudExecutor} from './cloud-executor'; | |
| import {status} from '@grpc/grpc-js'; | |
| import {OutcomeSender, ExecutionFlowContextInterface, CloudExecutor} from './cloud-executor'; |
Comment on lines
+307
to
+308
| displayName: | ||
| action.displayName !== undefined ? instanceId : undefined, |
Contributor
Comment on lines
+364
to
+381
| const [instances] = await instanceAdminClient.listInstances({ | ||
| parent: instanceAdminClient.projectPath(projectId), | ||
| filter: action.filter, | ||
| pageSize: action.pageSize, | ||
| pageToken: action.pageToken, | ||
| }); | ||
|
|
||
| console.log(`Found ${instances.length} instances.`); | ||
|
|
||
| const outcome = SpannerActionOutcome.create({ | ||
| status: CloudExecutor.toProto(status.OK), | ||
| adminResult: { | ||
| instanceResponse: { | ||
| listedInstances: instances, | ||
| nextPageToken: '', | ||
| }, | ||
| }, | ||
| }); |
Contributor
e7d7c04 to
9bba437
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.