Closed arnongilboa closed 1 month ago
/hold
Should improve func test.
/unhold
/retest
Note there are a couple more of these regex spread around. Do we want to maybe unify them?
$ (cd pkg; git grep 'regexp.MustCompile("progress'\\\\)
controller/common/util.go: importRegExp := regexp.MustCompile("progress\\{ownerUID\\=\"" + args.OwnerUID + "\"\\} (\\d{1,3}\\.?\\d*)")
controller/populators/import-populator.go: importRegExp := regexp.MustCompile("progress\\{ownerUID\\=\"" + string(pvc.UID) + "\"\\} (\\d{1,3}\\.?\\d*)")
Note there are a couple more of these regex spread around. Do we want to maybe unify them?
$ (cd pkg; git grep 'regexp.MustCompile("progress'\\\\) controller/common/util.go: importRegExp := regexp.MustCompile("progress\\{ownerUID\\=\"" + args.OwnerUID + "\"\\} (\\d{1,3}\\.?\\d*)") controller/populators/import-populator.go: importRegExp := regexp.MustCompile("progress\\{ownerUID\\=\"" + string(pvc.UID) + "\"\\} (\\d{1,3}\\.?\\d*)")
Good catch, I'll sure unify them.
Can I rebase https://github.com/kubevirt/containerized-data-importer/pull/3293 on this?
Can I rebase #3293 on this?
I'm doing a small API refactoring, so wait a few mins.
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: akalenyu
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/lgtm
What this PR does / why we need it: Use default metric registration. We shouldn't use the controller-runtime registration as we have no controller here and it will not register the metric correctly.
Add
kubevirt_cdi_import_progress_total
metric and use it in the importer instead ofkubevirt_cdi_clone_progress_total
.Fix the metric parsing to match their new names. Otherwise the DV progress will not be updated until its 100%.
Regression introduced in #3254
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged): Fixes #Special notes for your reviewer:
Release note: