[2.x oss] Bucket retention policy doesn't change back to "never"
Hi, when I want to change bucket with a set retention time to a bucket with no retention policy it won't change (that's for the UI). The documentation also doesn't show a solution for the CLI.
Steps to reproduce:
- Create a bucket with a retention time of e.g. 7 days in the UI
- Change the bucket's retention time to "Never"

- Save Changes.
Expected behavior: The retention time changes to "Forever", like in the case of buckets that are created without a retention time.
Actual behavior: Nothing happens, the previous retention time remains active.
Environment info: InfluxDB 2.0.8 Server: e91d418 Frontend: cb0a87e
You can use 0s as the duration in the CLI. I tested it with a test bucket. This problem should still be solved though. And the workaround documented.
I see the same issue in UI when changing bucket's retention time. I fixed fixed my issue in CLI with: influx bucket update -id <ID> --retention 0 --token <TOKEN> to set the retention to infinite. Like @LarsStegman shared this needs to be fixed in the UI indeed.
Environment info: Influx CLI 2.2.1 (git: 31ac783) build_date: 2021-11-09T21:24:22Z
This is still a problem as of influxdb v 2.6.1. Changing it in the CLI does work as noted above. But failing to silently change the retention time caused me to lose data(I thought it was set to never delete). This UI bug should be fixed and it's been a year since it's been reported.
This issue is being discussed/tracked here.
another report of the same
- https://github.com/influxdata/influxdb/issues/25467
still there in 2.7.10-1
For anyone who uses SSL, you need to add --host flag for the influx CLI, reference here
influx bucket update --id <ID> --retention 0 --token <TOKEN> --host https://localhost:8086 --skip-verify
Error Message: Error: failed to update bucket "": Patch "http://localhost:8086/api/v2/buckets/###"