Fix legacy git version format parsing
From older instances we receive git version formed as
{
git: {
version: "2.35.1"
}
}
however, our app expects it to be a hash as
{
"git": {
"version": {
"major": 2,
"minor": 35,
"patch": 1,
}
}
}
This MR adds this backward compatibility
Testing
- Upload a payload from older instance (can use the one from the original issue)
- Verify no exception raised.
- Can optionally verify DB record
[12] pry(main)> RawUsageData.last.payload['git']
=> {"version"=>{"major"=>2, "minor"=>35, "patch"=>1}}
Related to #9 (closed)
See the initial problem description https://gitlab.com/gitlab-org/gitlab-services/version.gitlab.com/-/issues/6
Edited by Niko Belokolodov