Update swift_object_client.go : Fetch all objects in List() function (#9463)

**What this PR does / why we need it**:

Allow the Swift Client `List()` function to return all objects that
match the query.

**Which issue(s) this PR fixes**:

Fixes #9360

**Special notes for your reviewer**:

**Checklist**
- [ ] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
pull/9378/head^2
Totalus 2 years ago committed by GitHub
parent 40782b2759
commit 01f0ded7fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 2
      pkg/storage/chunk/client/openstack/swift_object_client.go

@ -36,6 +36,7 @@
* [9130](https://github.com/grafana/loki/pull/9130) **salvacorts**: Pass LogQL engine options down to the _split by range_, _sharding_, and _query size limiter_ middlewares.
* [9252](https://github.com/grafana/loki/pull/9252) **jeschkies**: Use un-escaped regex literal for string matching.
* [9176](https://github.com/grafana/loki/pull/9176) **DylanGuedes**: Fix incorrect association of per-stream rate limit when sharding is enabled.
* [9463](https://github.com/grafana/loki/pull/9463) **Totalus**: Fix OpenStack Swift client object listing to fetch all the objects properly.
##### Changes

@ -154,7 +154,7 @@ func (s *SwiftObjectClient) List(ctx context.Context, prefix, delimiter string)
opts.Delimiter = []rune(delimiter)[0]
}
objs, err := s.conn.Objects(s.cfg.ContainerName, opts)
objs, err := s.conn.ObjectsAll(s.cfg.ContainerName, opts)
if err != nil {
return nil, nil, err
}

Loading…
Cancel
Save