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

Fix Internal Error with docker 25.0.0 #33

Merged
merged 6 commits into from
Apr 17, 2024
Merged

Fix Internal Error with docker 25.0.0 #33

merged 6 commits into from
Apr 17, 2024

Conversation

mvidner
Copy link
Member

@mvidner mvidner commented Apr 11, 2024

Problem

Since Docker 25.0.0, starting yast2 docker just pops up an Internal Error (unless you have no images at all)

https://docs.docker.com/engine/api/v1.45/#tag/Image/operation/ImageList says for VirtualSize

Deprecated: this field is omitted in API v1.44, but kept for backward compatibility. Use Size instead.

Solution

So we need to fix yast2-docker to use image.info["Size"] instead

Testing

Tested manually that the fix works with older Docker (on Leap 15.4 with 24.0.7)

@@ -1,3 +1,5 @@
# frozen_string_literal: true
Copy link
Member

Choose a reason for hiding this comment

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

are you sure that it is safe to add it to files? I usually avoids this as it can lead to some nasty bugs.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, good point. I did think about that, then ran the module and clicked around and thought it was OK... so I included this.
But now I realize the test/ directory has only a useless spec helper 😱
So I will omit this and use the usual way in yast repos (which I did not realize before)

Style/FrozenStringLiteralComment:
  Enabled: false

Martin Vidner added 2 commits April 17, 2024 11:36
because it can break working code
and this package has actually no tests 😱
Copy link
Member

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

@mvidner, thanks for taking care 👍

LGTM

@mvidner mvidner merged commit 959932b into master Apr 17, 2024
8 checks passed
@mvidner mvidner deleted the no-virtualsize branch April 17, 2024 12:54
@yast-bot
Copy link

✔️ Internal Jenkins job #3 successfully finished
✔️ Created OBS submit request #1168549

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.

None yet

4 participants