Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.6.0
-
Untriaged
-
Unknown
Description
The way that we translate paths in the staging directory to keys in S3 is by using the 'filepath' module; this is incorrect. The 'filepath' module is platform specific and will produce different output depending on the OS. We should be using the 'path' module since this more correctly suits this purpose.
We should also ensure that when constructing keys (with are not local paths) that we use the 'path' module instead of 'filepath'. An example case would be when we are deleting a rotated logfile; we are not converting a key from the local staging directory into a key in aws, we are constructing a key from the archive. Instead of doing 'filepath.Join(archive, "logs", "backup-0.log")', we should use 'path.Join(archive, "logs", "backup-0.log")'
Attachments
For Gerrit Dashboard: MB-38662 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
126511,2 | MB-38662 Use 'path' instead of 'filepath' to construct new keys | master | backup | Status: MERGED | +2 | +1 |