-
Notifications
You must be signed in to change notification settings - Fork 0
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
Make layers manifest optional #29
base: main
Are you sure you want to change the base?
Conversation
mike-sul
commented
Oct 2, 2024
•
edited
Loading
edited
- Extend the test environment with the vanilla registry and tweak test fixtures so test can be run against different types of registry.
- Make the app layers manifest creation and addition to an compose app manifest optional. It allows us creating an OCI-compliant app manifest that the vanilla registry can digest.
Add the vanilla registry to the test environment so we can run test against it and make sure that our compose app is compatible with it. Signed-off-by: Mike Sul <[email protected]>
Signed-off-by: Mike Sul <[email protected]>
Extend the existing smoke test so it runs against two types of registry, the foundries one (with patches to support custom OCI manifest) and the vanilla registry. The smoke test obviously fails for the vanilla registry because it rejects the non OCI-compliant manifest of compose app generated by `compose publish` command. The commits following this one will fix the failure. Signed-off-by: Mike Sul <[email protected]>
Add a new parameter to the publish command to turn on/off app layers manifest creation, posting, and inclusion its reference into the manifest of app being published. The layers manifest reference in a compose app manifest makes it non-OCI compliant and the vanilla registry rejects requests to post such the manifest. The new parameter allows turning off app layers manifest addition to the app manifest. As a result of it, a compose app manifest becomes OCI compliant so it can be pushed to the vanilla registry which is proved by the smoke test. The app layers manifest is redundant in case of `composectl` usage for app pulling since this utility retrieves meta about missing blobs from registry and it knows sizes of missing blobs (archived one). The app layers manifest is used by the older non composectl-based aklite versions to avoid writing C++ code for communicating with registries and retrieving blob metadata. Signed-off-by: Mike Sul <[email protected]>
It turned out that suppressing errors during gathering layers metadata hides issues with the algorithm that parses a docker store and calculates size of extracted layers. Signed-off-by: Mike Sul <[email protected]>
@doanac This change allows us not adding the "manifests" field into an app manifest which is against the OCI specification and makes us patch the registry. |
People do rely on that check, so we should assume nobody is going to want to use this <v93. I wonder if there's something we need to document or convey to customer-success with regards to this? |
Yes, that's why we are not going to disable "layers manifest" for existing factories unless explicitly requested. |
I don't see much reason. I don't see a good way to change it for existing factories because we are never know what LmP version their devices are on. So, we just keep doing the same hack for existing factories. |
excellent point. it's about the version you are updating from. |