Refactor file regex to override

What does this MR do and why?

There is a bug when jh remove backup file since the backup file regex is not compatible to JH

See JH issue gitlab-jh/gitlab#292 (closed)

Solution

upstream backup file regex

file =~ /^(\d{10})(?:_\d{4}_\d{2}_\d{2}(_\d+\.\d+\.\d+((-|\.)(pre|rc\d))?(-ee)?)?)?_gitlab_backup\.tar$/

JH need

file =~ /^(\d{10})(?:_\d{4}_\d{2}_\d{2}(_\d+\.\d+\.\d+((-|\.)(pre|rc\d))?(-ee|-jh)?)?)?_gitlab_backup\.tar$/

Refactor file regex to method to override

See JH MR gitlab-jh/gitlab!163 (merged)

@godfat-gitlab Could you please review or ask someone to review this, thanks! CC @qianzhangxa

Edited by Zhu Shung

Merge request reports

Loading