Skip to content

docker-to-squash.py: get_working_dir creates a new directory on every call, so push-update cannot find pulled images #9292

Open

Description

@dragonknightk

get_working_dir always creates a new directory instead of reusing the working directory: if dts-work-dir does not exist yet it creates it, and if it already exists it creates dts-work-dir/docker-to-squash.

Storm 3.3.0-SNAPSHOT (master 4fca209). Reproduced with Python 3.9.

Starting with no working directory, the first call creates dts-work-dir, the second creates dts-work-dir/docker-to-squash, and the third fails with [Errno 17] File exists.

Expected: every call with the default --working-dir dts-work-dir reuses dts-work-dir, so pull-build and a later push-update look for images in the same place.

Actual: pull-build calls get_working_dir once per image, so it puts each image in a different directory and fails on the third image. push-update looks under the new directory and never finds what pull-build left behind (skopeo_dir doesn't exists: dts-work-dir/docker-to-squash/ubuntu:22.04, while the image is in dts-work-dir/ubuntu:22.04).

Follow-up from the review discussion in #9284 ʕ•ᴥ•ʔ

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions