-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 DataDetector to support ACI and other layout format #49
Conversation
Signed-off-by: liangchenye <liangchenye@huawei.com>
Signed-off-by: liangchenye <liangchenye@huawei.com>
The aci spec specifies:
Only
|
Thanks for collecting './'. I hope 'Clair' could handle this feature, or the user have to untar the ACI and tar the rootfs to make it work. |
It is definitely not difficult to do from what you've already done.
|
linking #48 |
Signed-off-by: liangchenye <liangchenye@huawei.com>
Signed-off-by: liangchenye <liangchenye@huawei.com>
@Quentin-M @jzelinskie bzip2/xz are done. The PGP support is not implemented yet, I don't have a concrete idea. It requires an extra signature file. Maybe we need to change the API? |
) | ||
|
||
// TarDataDetector implements DataDetector and detects layer data in 'tar' format | ||
type TarDataDetector struct{} |
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.
It should probably not be called TarDataDetector
. Both this/ACI are tar anyways. Should probably be DockerDataDetector
instead.
That looks cool. we are really looking forward to having ACI support ! I quickly tested it and did some comments.
Also, I discussed a bit with the team and we think that we should not try to do format detection automatically - it could become tricky at the end of the day if we support more than Docker/ACI. In other words, Thanks! |
@alban Adding to the discussion about PGP. See #49 (comment). |
Signed-off-by: Liang Chenye <liangchenye@huawei.com>
Signed-off-by: Liang Chenye <liangchenye@huawei.com>
@Quentin-M Thanks for the review, the new commits solve problems you mentioned above. One thing is missing: a ACI image for testing. I'm not sure if I should make a fake one based on the rootfs in utils_test.tar or use the official 'etcd' one in https://github.com/coreos/rkt. |
@liangchenye Thanks for the fixes and your contribution! I am really excited by seeing you contributing to Clair. I will take a deeper look at it tomorrow (Almost 1 AM here) and ensure Clair still works fine for the general usage (well, I bet it does), but I think that's pretty great! @jzelinskie has the last words on the code-reviewing procedure. He may have some comments too. After that and a commit squashing with an adequate commit message, I'll be happy to merge your work! About testing, I think that, generally speaking, we should not include big files in the project as it slows down repository pulling and increase the size of the project. Instead, we should use minimal data samples - that are relevant to the tests we want to run. As you can notice in |
my pleasure :) |
Add DataDetector to support ACI and other layout format
Now we have DetectOS and DetectPackage, I think it also makes sense to have a 'DetectData' to handle different image formats. The PR implements this feature. It adds 'imageFormat' to the parameters for DataDetector to choose the right detector. For most use cases, user knows what format a image is. If not, the detector checks the suffix at present.
It solves my issue (#48) and (#8)
Other potential benefits: