Skip to content

Support units other than milliseconds for the pg-upgrade timeout option

Hossein Pursultani requested to merge 5316-pg-upgrade-timout-units into master

This MR adds parse_duration method to GitlabCtl::Util for parsing duration strings into milliseconds. This methods accepts the following units:

  • d days
  • h hours
  • m minutes
  • s seconds
  • ms milliseconds

Duration string can be a combination of different units, e.g. 1h2m3s. These quantity of units can be a float number, e.g. 1.5h, although the ms quantity always treated as an integer.

For pg-upgrade the old syntax (without units) still works.

Closes #5316 (closed)

Merge request reports