mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
wal-g: Use "start_time" field, not "time" which is S3 modified-at.
The `time` field is based on the file metadata in S3, which means that touching the file contents in S3 can move backups around in the list. Switch to using `start_time` as the sort key, which is based on the contents of the JSON file stored as part of the backup, so is not affected by changes in S3 metadata.
This commit is contained in:
committed by
Tim Abbott
parent
1accc6929e
commit
60ce5e1955
@@ -106,7 +106,7 @@ class WalGPrometheusServer(BaseHTTPRequestHandler):
|
||||
)
|
||||
|
||||
if len(data) > 0:
|
||||
data.sort(key=lambda e: e["time"], reverse=True)
|
||||
data.sort(key=lambda e: e["start_time"], reverse=True)
|
||||
latest = data[0]
|
||||
labels = {
|
||||
"host": latest["hostname"],
|
||||
|
||||
Reference in New Issue
Block a user