2.4: Changing bucket expiration to "never" in the UI has no effect
Steps to reproduce: List the minimal actions needed to reproduce the behavior.
- Chose bucket with expiration (say 30d) in the UI
- Change expiration to "never"
- Save
Expected behavior:
List of buckets shows expiration "never"
Actual behavior:
Bucket still shows "30d". After reloading the GUI it remains at 30d.
Environment info:
InfluxDB 2.0.9 Server: d1233b7 Frontend: 9c89e22
Details
This is the UI's XHR request:
{"id":"107d309886153948","orgID":"5d4718f7355f8f75","type":"user","name":"api","retentionRules":[],"createdAt":"2022-09-20T18:56:23.322209526Z","updatedAt":"2022-09-28T06:06:52.371527624Z","links":{"labels":"/api/v2/buckets/107d309886153948/labels","members":"/api/v2/buckets/107d309886153948/members","org":"/api/v2/orgs/5d4718f7355f8f75","owners":"/api/v2/buckets/107d309886153948/owners","self":"/api/v2/buckets/107d309886153948","write":"/api/v2/write?org=5d4718f7355f8f75&bucket=107d309886153948"},"labels":[]}
This is the server response:
{
"id": "107d309886153948",
"orgID": "5d4718f7355f8f75",
"type": "user",
"name": "api",
"retentionRules": [
{
"type": "expire",
"everySeconds": 2592000,
"shardGroupDurationSeconds": 86400
}
],
"createdAt": "2022-09-20T18:56:23.322209526Z",
"updatedAt": "2022-09-28T06:12:37.49901153Z",
"links": {
"labels": "/api/v2/buckets/107d309886153948/labels",
"members": "/api/v2/buckets/107d309886153948/members",
"org": "/api/v2/orgs/5d4718f7355f8f75",
"owners": "/api/v2/buckets/107d309886153948/owners",
"self": "/api/v2/buckets/107d309886153948",
"write": "/api/v2/write?org=5d4718f7355f8f75\u0026bucket=107d309886153948"
},
"labels": []
}
Seems as if the API is ignoring the empty retention rules in the PATCH?
This is still a problem in 2.4 OSS
Docs at https://docs.influxdata.com/influxdb/v2.4/organizations/buckets/update-bucket/ don't explain how retention period can be removed.
Any feedback? Seems to be an obvious bug?
Confirmed issue with the UI. Retention policies can be set to never expire by using the influx bucket update command and setting --retention 0.
@jeffreyssmith2nd for sake of completeness: could you add docs how to do this via api?
The equivalent API call is documented here: https://docs.influxdata.com/influxdb/v2.4/api/#operation/PatchBucketsID
It would be nice if https://docs.influxdata.com/influxdb/v2.4/organizations/buckets/update-bucket/ could cover how to remove expiry, too.
Year and a half later and still have the same bug?