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
Add more integration tests for deltas #267
Conversation
9ec2e55
to
9634529
Compare
6e43b69
to
ee64fc0
Compare
ee64fc0
to
3a62294
Compare
3a62294
to
b2ae552
Compare
Updated the branch. Now using the right path to get the test data. |
@balena-ci rebase |
b2ae552
to
b07c3e5
Compare
The preview site has been deleted. |
The
|
That's weird, tests pass for me. I expect this test case to be easy to break when changing in the delta implementation, but the results of creating deltas should be deterministic, so we both should see the same results. Will look into this, thanks for pointing out! |
41290ac
to
f3714a9
Compare
@lmbarros I gave this another try and they seem to be better now although I still get failures when running the Size tests:
These results are consistent over multiple test runs I tested on another machine and I get
|
f3714a9
to
d2e198a
Compare
@robertgzr I pushed another update, now using intervals of acceptable delta sizes. Now we have at least a clue that this variation is likely coming from differences in the underlying implementation of whatever union filesystem is used on the machine running the tests. I don't think it is worth to try to be independent of these differences. I considered adding some "rule" or "fixed safety margin" instead of manual min/max bounds, but the variations depends a lot on what image is being used for which test. Any reasonable rule lax enough to work in all cases would be so lax as to make most tests moot. |
This adds two new integration tests: * TestDeltaSize: this is meant to catch regressions on delta sizes. It generates deltas and compare their sizes with the delta sizes we get as of now. If the size increases, the test fails. * TestDeltaCorrectness: checks if applying a delta indeed results in the same image as we had originally. A number of different test cases (different images with distinct features) are tested for each of these integration tests. Signed-off-by: Leandro Motta Barros <leandro@balena.io> Change-type: patch
d89cc4e
to
59f6cd6
Compare
@lmbarros I rebased your work on the master branch
just to have it in writing here again, we suspect the size differences to be due to the graphdriver used? or the backing filesystem? |
@robertgzr, the mismatch seemed to be caused by differences in the underlying union filesystem implementation (that is, I was seeing a difference in image sizes generated on two different computers, both of which were using the same filesystem ( |
@balena-ci I self-certify! |
Looks like I can't merge this because I am missing a formal approval from Robert about a change request that has been already been discussed and addressed. I'll close this PR and open a new one from the same branch to self-certify. |
This adds two new integration tests:
generates deltas and compare their sizes with the delta sizes we get
as of now. If the size increased, the test fails.
same image as we had originally.
A number of different test cases (different images with distinct
features) are tested for each of these integration tests.
Points of attention for review:
TestDeltaSize
test? I have a number of doubts about it: