• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubevirt / containerized-data-importer / #5294
49%

Build:
DEFAULT BRANCH: main
Ran 11 May 2025 10:22AM UTC
Jobs 1
Files 155
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 May 2025 10:11AM UTC coverage: 59.288% (+0.05%) from 59.236%
#5294

push

travis-ci

web-flow
importer, util: Consolidate stream data to file (#3721)

* move util/file functions to importer/file

This contributes to the goal of eliminating util functions.
In future commits certain redundancy that existed between the importer
and util can be eliminated.

Signed-off-by: Adi Aloni <aaloni@redhat.com>

* importer replace streamDataToFile with StreamDataToFile

Previously there were two functions that were used to stream data to a
device:
- importer/util streamDataToFile
- importer/file StreamDataToFile

StreamDataToFile was originally introduced to handle preallocation for
host assisted clones[1]. Aside from that ability, the two functions are
identical in functionality.

This commit replaces streamDataToFile with StreamDataToFile.

[1] https://github.com/kubevirt/containerized-data-importer/pull/3352

Signed-off-by: Adi Aloni <aaloni@redhat.com>

* importer: respect preallocation in StreamDataToFile

Previously, the preallocation setting that's used in the data-processor
was only respected in the upload-server's clone-processor.

With this change, preallocation is respected in StreamDataToFile used
throughout all relevant datasources.

This should also result in more efficient imports as the default of the
preallocation setting is false.

Signed-off-by: Adi Aloni <aaloni@redhat.com>

* importer, errors: introduce IsNoCapacityError

Previously StreamDataToFile would assert out of space errors by matching
a substring in the error's message. This would not work in all
filesystems such as IBM's GPFS.

This commit introduces IsNoCapacityError which matches an error with all
insufficient capacity related errors (e.g., ENOSPC, EDQUOT) and uses it
instead of similar assertions.

Signed-off-by: Adi Aloni <aaloni@redhat.com>

---------

Signed-off-by: Adi Aloni <aaloni@redhat.com>

79 of 129 new or added lines in 17 files covered. (61.24%)

2 existing lines in 1 file now uncovered.

16862 of 28441 relevant lines covered (59.29%)

0.66 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% cmd/cdi-importer/importer.go
1
73.58
pkg/importer/file.go
1
71.88
0.0% pkg/importer/registry-datasource.go
1
61.37
-0.26% pkg/importer/vddk-datasource_amd64.go
2
74.58
0.0% pkg/importer/http-datasource.go
2
56.44
0.0% pkg/importer/imageio-datasource.go
2
63.59
0.17% pkg/uploadserver/uploadserver.go
3
68.55
0.55% pkg/importer/gcs-datasource.go
5
70.83
-10.52% pkg/importer/util.go
32
35.86
0.37% pkg/util/util.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
61.37
-0.26% pkg/importer/vddk-datasource_amd64.go
Jobs
ID Job ID Ran Files Coverage
1 #5294.1 11 May 2025 10:22AM UTC 155
59.29
Source Files on build #5294
  • Tree
  • List 155
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • bd7d0282 on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc