influxdata / influxdata/influxdb
2.4: Changing bucket expiration to "never" in the UI has no effect
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
List the minimal actions needed to reproduce the behavior.
1. Chose bucket with expiration (say 30d) in the UI
2. Change expiration to "never"
3. 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](https://github.com/influxdata/influxdb/tree/d1233b7951)
Frontend: [9c89e22](https://github.com/influxdata/ui/tree/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`?
Contributor guide
Research direction
Start by tracing the UI bucket-edit request that sends empty retentionRules and the server endpoint that handles the bucket PATCH. Reproduce the change from a finite expiration to “never,” then verify that the saved bucket returns empty retentionRules and the UI displays “never” after reload.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100