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

[tink worker] Don't error when image pull fails and image exists: #984

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

jacobweinstock
Copy link
Member

@jacobweinstock jacobweinstock commented Aug 29, 2024

Description

HookOS recently got the capability to embed container images. With this capability, pulling an image is not desired. This is expecially true if the image name is not resolvable or there is no network connection to the registry. An image named 127.0.0.1/embedded/myimage, for example.

Currently, tink worker will always try to pull an image and will fail if the image pull fails. To allow for embedded images to function properly, when an image pull fails we check if the image already exists in the local Docker cache. If it does we don't fail the method call.

Why is this needed

Fixes: #

How Has This Been Tested?

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

HookOS recently got the capability to embed container
images. With this capability, pulling an image is not
desired. This is expecially true if the image name is
not resolvable or there is no network connection to
the registry. An image name 127.0.0.1/embedded/myimage,
for example.

Currently, tink worker will always try to pull an image
and will fail if the image pull fails. To allow for
embedded images to function properly, when an image
pull fails we check if the image already exists in the
local Docker cache. If it does we don't fail the method
call.

Signed-off-by: Jacob Weinstock <[email protected]>
@jacobweinstock jacobweinstock changed the title Don't error when image pull fails and image exists: [tink worker] Don't error when image pull fails and image exists: Aug 29, 2024
With the change in behavior, the tests needed
to be updated.

Signed-off-by: Jacob Weinstock <[email protected]>
Copy link

codecov bot commented Aug 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.04%. Comparing base (ca50515) to head (c0998f9).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #984      +/-   ##
==========================================
+ Coverage   28.00%   28.04%   +0.04%     
==========================================
  Files          70       70              
  Lines        3482     3484       +2     
==========================================
+ Hits          975      977       +2     
  Misses       2445     2445              
  Partials       62       62              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jacobweinstock jacobweinstock merged commit 8f49573 into tinkerbell:main Aug 29, 2024
12 checks passed
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.

1 participant