Alerting: Update mute timings provisioning API to support optimistic locking (#88731)

* add version to time-interval models
* set time interval fingerprint as version
* update to check provided version
* delete to check if version is provided in query parameter 'version'
* update integration tests
* update specs
This commit is contained in:
Yuri Tseretyan
2024-06-06 18:06:37 -04:00
committed by GitHub
parent a2e21d61f8
commit 003e3efce9
13 changed files with 379 additions and 22 deletions
+23
View File
@@ -1713,6 +1713,9 @@
"$ref": "#/definitions/TimeIntervalItem"
},
"type": "array"
},
"version": {
"type": "string"
}
},
"type": "object"
@@ -2800,6 +2803,9 @@
"$ref": "#/definitions/TimeIntervalItem"
},
"type": "array"
},
"version": {
"type": "string"
}
},
"type": "object"
@@ -5780,6 +5786,17 @@
"name": "name",
"required": true,
"type": "string"
},
{
"description": "Version of mute timing to use for optimistic concurrency. Leave empty to disable validation",
"in": "query",
"name": "version",
"type": "string"
},
{
"in": "header",
"name": "X-Disable-Provenance",
"type": "string"
}
],
"responses": {
@@ -5863,6 +5880,12 @@
"schema": {
"$ref": "#/definitions/ValidationError"
}
},
"409": {
"description": "GenericPublicError",
"schema": {
"$ref": "#/definitions/GenericPublicError"
}
}
},
"summary": "Replace an existing mute timing.",