Skip to content

Commit 6837b79

Browse files
committed
Enable enableAgentRollback feature flag (elastic#249416)
## Summary Make `enableAgentRollback` feature flag `true` by default. Implementation PR: elastic#247398 Backport to 9.3: elastic#249250 ### Identify risks Agent rollback is mostly insulated from other existing flows: low probability risk of affecting agent actions menus in Fleet UI. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit eebeab1) # Conflicts: # x-pack/platform/plugins/shared/fleet/common/experimental_features.ts
1 parent 2c6aebe commit 6837b79

File tree

7 files changed

+976
-2
lines changed

7 files changed

+976
-2
lines changed

oas_docs/bundle.json

Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22766,6 +22766,150 @@
2276622766
]
2276722767
}
2276822768
},
22769+
"/api/fleet/agents/bulk_rollback": {
22770+
"post": {
22771+
"description": "Rollback multiple agents to the previous version.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.",
22772+
"operationId": "post-fleet-agents-bulk-rollback",
22773+
"parameters": [
22774+
{
22775+
"description": "A required header to protect against CSRF attacks",
22776+
"in": "header",
22777+
"name": "kbn-xsrf",
22778+
"required": true,
22779+
"schema": {
22780+
"example": "true",
22781+
"type": "string"
22782+
}
22783+
}
22784+
],
22785+
"requestBody": {
22786+
"content": {
22787+
"application/json": {
22788+
"examples": {
22789+
"bulkRollbackAgentsRequest": {
22790+
"value": {
22791+
"agents": [
22792+
"agent-1",
22793+
"agent-2"
22794+
],
22795+
"batchSize": 100,
22796+
"includeInactive": false
22797+
}
22798+
}
22799+
},
22800+
"schema": {
22801+
"additionalProperties": false,
22802+
"properties": {
22803+
"agents": {
22804+
"anyOf": [
22805+
{
22806+
"items": {
22807+
"type": "string"
22808+
},
22809+
"maxItems": 10000,
22810+
"type": "array"
22811+
},
22812+
{
22813+
"type": "string"
22814+
}
22815+
]
22816+
},
22817+
"batchSize": {
22818+
"type": "number"
22819+
},
22820+
"includeInactive": {
22821+
"default": false,
22822+
"type": "boolean"
22823+
}
22824+
},
22825+
"required": [
22826+
"agents"
22827+
],
22828+
"type": "object"
22829+
}
22830+
}
22831+
}
22832+
},
22833+
"responses": {
22834+
"200": {
22835+
"content": {
22836+
"application/json": {
22837+
"examples": {
22838+
"successResponse": {
22839+
"value": {
22840+
"actionIds": [
22841+
"actionId1",
22842+
"actionId2"
22843+
]
22844+
}
22845+
}
22846+
},
22847+
"schema": {
22848+
"additionalProperties": false,
22849+
"properties": {
22850+
"actionIds": {
22851+
"items": {
22852+
"type": "string"
22853+
},
22854+
"maxItems": 10000,
22855+
"type": "array"
22856+
}
22857+
},
22858+
"required": [
22859+
"actionIds"
22860+
],
22861+
"type": "object"
22862+
}
22863+
}
22864+
},
22865+
"description": "OK: A successful request."
22866+
},
22867+
"400": {
22868+
"content": {
22869+
"application/json": {
22870+
"examples": {
22871+
"badRequestResponse": {
22872+
"value": {
22873+
"message": "Bad Request"
22874+
}
22875+
}
22876+
},
22877+
"schema": {
22878+
"additionalProperties": false,
22879+
"description": "Generic Error",
22880+
"properties": {
22881+
"attributes": {},
22882+
"error": {
22883+
"type": "string"
22884+
},
22885+
"errorType": {
22886+
"type": "string"
22887+
},
22888+
"message": {
22889+
"type": "string"
22890+
},
22891+
"statusCode": {
22892+
"type": "number"
22893+
}
22894+
},
22895+
"required": [
22896+
"message",
22897+
"attributes"
22898+
],
22899+
"type": "object"
22900+
}
22901+
}
22902+
},
22903+
"description": "A bad request."
22904+
}
22905+
},
22906+
"summary": "Bulk rollback agents",
22907+
"tags": [
22908+
"Elastic Agent actions"
22909+
],
22910+
"x-state": "Technical Preview; added in 9.4.0"
22911+
}
22912+
},
2276922913
"/api/fleet/agents/bulk_unenroll": {
2277022914
"post": {
2277122915
"description": "[Required authorization] Route required privileges: fleet-agents-all.",
@@ -25432,6 +25576,120 @@
2543225576
]
2543325577
}
2543425578
},
25579+
"/api/fleet/agents/{agentId}/rollback": {
25580+
"post": {
25581+
"description": "Rollback an agent to the previous version.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.",
25582+
"operationId": "post-fleet-agents-agentid-rollback",
25583+
"parameters": [
25584+
{
25585+
"description": "A required header to protect against CSRF attacks",
25586+
"in": "header",
25587+
"name": "kbn-xsrf",
25588+
"required": true,
25589+
"schema": {
25590+
"example": "true",
25591+
"type": "string"
25592+
}
25593+
},
25594+
{
25595+
"description": "The agent ID to rollback",
25596+
"in": "path",
25597+
"name": "agentId",
25598+
"required": true,
25599+
"schema": {
25600+
"type": "string"
25601+
}
25602+
}
25603+
],
25604+
"responses": {
25605+
"200": {
25606+
"content": {
25607+
"application/json": {
25608+
"examples": {
25609+
"successResponse": {
25610+
"value": {
25611+
"actionId": "actionId"
25612+
}
25613+
}
25614+
},
25615+
"schema": {
25616+
"anyOf": [
25617+
{
25618+
"additionalProperties": false,
25619+
"properties": {
25620+
"actionId": {
25621+
"type": "string"
25622+
}
25623+
},
25624+
"required": [
25625+
"actionId"
25626+
],
25627+
"type": "object"
25628+
},
25629+
{
25630+
"additionalProperties": false,
25631+
"properties": {
25632+
"message": {
25633+
"type": "string"
25634+
}
25635+
},
25636+
"required": [
25637+
"message"
25638+
],
25639+
"type": "object"
25640+
}
25641+
]
25642+
}
25643+
}
25644+
},
25645+
"description": "OK: A successful request."
25646+
},
25647+
"400": {
25648+
"content": {
25649+
"application/json": {
25650+
"examples": {
25651+
"badRequestResponse": {
25652+
"value": {
25653+
"message": "Bad Request"
25654+
}
25655+
}
25656+
},
25657+
"schema": {
25658+
"additionalProperties": false,
25659+
"description": "Generic Error",
25660+
"properties": {
25661+
"attributes": {},
25662+
"error": {
25663+
"type": "string"
25664+
},
25665+
"errorType": {
25666+
"type": "string"
25667+
},
25668+
"message": {
25669+
"type": "string"
25670+
},
25671+
"statusCode": {
25672+
"type": "number"
25673+
}
25674+
},
25675+
"required": [
25676+
"message",
25677+
"attributes"
25678+
],
25679+
"type": "object"
25680+
}
25681+
}
25682+
},
25683+
"description": "A bad request."
25684+
}
25685+
},
25686+
"summary": "Rollback an agent",
25687+
"tags": [
25688+
"Elastic Agent actions"
25689+
],
25690+
"x-state": "Technical Preview; added in 9.4.0"
25691+
}
25692+
},
2543525693
"/api/fleet/agents/{agentId}/unenroll": {
2543625694
"post": {
2543725695
"description": "[Required authorization] Route required privileges: fleet-agents-all.",

0 commit comments

Comments
 (0)