Skip to content

Commit

Permalink
Return "serverless" for node ID in serverless
Browse files Browse the repository at this point in the history
Changing the approach for node ID to still return the field
but always set to "serverless" in serverless. This avoids
causing problems for users who want to use the stateful
client with serverless.
  • Loading branch information
droberts195 committed Jul 26, 2023
1 parent 0b34fba commit 26e1b66
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion specification/ml/open_job/MlOpenJobResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export class Response {
body: {
opened: boolean
/**
* @availability stack
* The ID of the node that the job was started on. In serverless this will be the "serverless".
* If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string.
*/
node: NodeId
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ export class Response {
acknowledged: boolean
/**
* The ID of the node that the job was started on. If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string.
* @availability stack
* The node ID of the node the job has been assigned to, or
* an empty string if it hasn't been assigned to a node. In
* serverless if the job has been assigned to run then the
* node ID will be "serverless".
*/
node: NodeId
}
Expand Down
5 changes: 2 additions & 3 deletions specification/ml/start_datafeed/MlStartDatafeedResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ import { NodeIds } from '@_types/common'
export class Response {
body: {
/**
* The ID of the node that the datafeed was started on. If the datafeed is allowed to open lazily and has not yet
* been assigned to a node, this value is an empty string.
* @availability stack
* The ID of the node that the job was started on. In serverless this will be the "serverless".
* If the job is allowed to open lazily and has not yet been assigned to a node, this value is an empty string.
*/
node: NodeIds
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ import { NodeId } from '@_types/common'
export class Response {
body: {
/**
* The ID of the assigned node for the upgrade task if it is still running.
* @availability stack
* The ID of the node that the upgrade task was started on if it is still running. In serverless this will be the "serverless".
*/
node: NodeId
/** When true, this means the task is complete. When false, it is still running. */
Expand Down

0 comments on commit 26e1b66

Please sign in to comment.