- 
                Notifications
    You must be signed in to change notification settings 
- Fork 36
test: add busybox image, use it to replace centos image. #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e3bd7e2    to
    20105b9      
    Compare
  
    | Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 
 Additional details and impacted files@@           Coverage Diff           @@
##             main     #545   +/-   ##
=======================================
  Coverage   13.01%   13.01%           
=======================================
  Files          40       40           
  Lines        6003     6003           
=======================================
  Hits          781      781           
  Misses       5094     5094           
  Partials      128      128           ☔ View full report in Codecov by Sentry. | 
20105b9    to
    4391f30      
    Compare
  
    This is basically the add of BUSYBOX image and then using
that instead of centos image.
Moving to busybox from centos required a few changed assumptions:
 * drop -P from grep - busybox's grep did not support -P. instead
   use posix groups ([:space:])
 * don't use long --format for 'stat' - busybox stat didn't like
   this, so just use '-c'.
 * mount - /usr/bin/mount -> /bin/mount - busybox image only has
   /bin, not /usr/bin/mount
 * /bin/bash - busybox image does not have bin/bash
The tests "squashfs empty change no layer" and
"tar empty change no layer" do not work with the busybox image.
There are layers created, and they have this content:
    $ tar tvf oci/blobs/sha256/acff571f8cf*b03f45
    tar: Removing leading `/' from member names
    drwxr-xr-x 0/0               0 2023-11-13 14:06 /
    drwxr-xr-x 0/0               0 2023-11-13 14:06 etc/
    ---------- 0/0               0 2023-11-13 14:06 etc/resolv.conf
    drwxr-xr-x 0/0               0 2023-11-13 14:06 proc/
    drwxr-xr-x 0/0               0 2023-11-13 14:06 sys/
The content there are results of stacker.  I don't have a good way
to avoid them at the moment.
I've also left the bom tests in place with the centos image.
Those would have had to have been adjusted and probably
would not work with busybox at the moment.
Signed-off-by: Scott Moser <smoser@brickies.net>
    4391f30    to
    691ac17      
    Compare
  
    | @rchincha , do you have thoughts on this? From my perspective, it is an obvious huge win. It reduces the longest poll in the c-i tent (priv=priv workflow=ci) by ~ 40% (37m3s to 23m11s) and specifically the 'test' action of that run from 24m39s to 8m21s (~66%). I'm not opposed to using centos (or some other image that is a more "real world" use case) for a set of tests, but it appears to be just wasted IO for the most part here. | 
| 
 Large multi-layer images cover some cases (such as sizes, compression, etc) | 
| 
 docker://centos:latest is not a multi-layer image. 
 I guess i'm not opposed to that. but I honestly have never heard of a bug in gzip that was size specific. Is there an example of an issue that you're thinking about? I'd really rather not run significantly different things in c-i than in nightly. Its one thing to run some extra nightly jobs, another to entirely change what runs. The change and results here show that ~60% of our c-i test time is spent doing unnecessary IO or CPU operations. Lets just drop that and spend time and IO doing useful things. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This is basically the add of BUSYBOX image and then using that instead of centos image.
What type of PR is this?
Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:
Automation added to e2e:
Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.