Skip to content
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

feat: add skip-images flag feature #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DamKast
Copy link

@DamKast DamKast commented Nov 4, 2024

Description

It would be very usefull having the possibility to skip including images. That means give to docker compose the responsibility to pull the required images through the network directly from the target device.

This fix modifies the metadata:
If the skip-images flag is set, the metadata will include images_urls but not the images shas.
When the artifact is installed on the target, the app script will look for the images.tar.gz file but since it is not included in the artifact, it will not load any image.
The images_urls is used for the clean_up function.

https://hub.mender.io/t/suggestion-add-a-skip-images-option-to-app-update-module/7268

@mender-test-bot
Copy link
Contributor

Merging these commits will result in the following changelog entries:

Changelogs

app-update-module (master)

New changes in app-update-module since master:

Features
  • Added support for skipping image inclusion in artifact.

This commit is adding the skip-images flag to the app-gen script, allowing the artifact creation to ignore image inclusion.
The app script will hand over the responsibility of pulling images to the orchestrator.

Changelog: Added support for skipping image inclusion in artifact.
Ticket: None

Signed-off-by: DamKas <[email protected]>
@DamKast
Copy link
Author

DamKast commented Dec 13, 2024

@merlin-northern Do you want to have a look at this?

@lluiscampos lluiscampos self-assigned this Jan 7, 2025
Copy link
Contributor

@lluiscampos lluiscampos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @DamKast and thank you for your contribution. As @merlin-northern is already busy with other contributions, I will be reviewing your work 😃

By design, we want this update module to not pull images, but the module actually will pull an image needed by the manifest if it is not found in the Artifact.

We can have the feature that you want to add, so that it can be used for testing or on devices where network is fully reliable, but we should do it in a backwards compatible way, piggybacking on the behavior that I just described.

Your current proposed changes are conditionally generating (and then decompressing) images.tar.gz file in the Artifact. In other words, you have both modified the generator and the update module so the the file is added or not and expected or not. But it should be possible to do it simpler by creating a dummy/empty images.tar.gz in the generator, and then the module should not require much changes, it will decompress an empty file, not load any image, and then just start the composition (which will indirectly pull the images).

Can you rework the PR to get something similar to that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants