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

Upload image to temporary dir and then move it #117

Merged
merged 1 commit into from
Mar 30, 2024

Conversation

MusicDin
Copy link
Member

@MusicDin MusicDin commented Mar 29, 2024

Upload contents of the built image to the temporary dir and only once fully uploaded move the directory to the final destination to avoid making partially uploaded images available in the simplestream index.

Closes canonical/lxd#13191

Copy link
Member

@simondeziel simondeziel left a comment

Choose a reason for hiding this comment

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

Great, thanks for making those upload batches atomic!

.github/actions/image-upload/action.yml Outdated Show resolved Hide resolved
.github/actions/image-upload/action.yml Outdated Show resolved Hide resolved
.github/actions/image-upload/action.yml Outdated Show resolved Hide resolved
@MusicDin MusicDin force-pushed the feat/tmp-img-upload branch 2 times, most recently from 243cdec to 5dba6eb Compare March 29, 2024 17:08
simondeziel
simondeziel previously approved these changes Mar 29, 2024
First upload contents to the temporary dir and once fully uploaded
move the directory to the final destination to avoid potential race
where simplestream-maintainer can pick the partially uploaded image.

Signed-off-by: Din Music <[email protected]>
Copy link
Member

@simondeziel simondeziel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@tomponline tomponline merged commit 2a8d051 into canonical:main Mar 30, 2024
62 of 63 checks passed
@MusicDin MusicDin deleted the feat/tmp-img-upload branch March 30, 2024 20:20
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.

imagebuilder: Prevent race when uploading images
3 participants