8000 Fix error image tag and hint message by teresaromero · Pull Request #4620 · okteto/okteto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix error image tag and hint message #4620

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

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Conversation

teresaromero
Copy link
Contributor

Proposed changes

Follow up for #4572

When extracting the image from the error, the regex was missing the tag when it had - or .. This PR solves this bug.

Additionally, i observed that when running okteto deploy --remote without a connection to the internet, the image returned by the solve error was randomly* pipeline-installer or okteto. When the pipeline-runner image was unable to be resolved, the error was not recognized correctly.

The image failing was randomly returning the error, as when running the remote deploy, the dockerfile uses the okteto image and the pipeline image, so these operations to pull the image are parallel and can resolve one after the other or viceversa.

❯ ok deploy --remote
 !  Insecure mode enabled
 i  Using okteto-admin @ okteto.localtest.me as context
 x  Error deploying application: the image 'okteto/pipeline-runner:1.27.0-rc.14' is not accessible or it does not exist
    Please verify you have access to Docker Hub.
    If you are using an airgapped environment, make sure Okteto Remote is correctly configured in airgapped environments:
    See more at: https://www.okteto.com/docs/self-hosted/manage/air-gapped/

❯ ok deploy --remote
 !  Insecure mode enabled
 i  Using okteto-admin @ okteto.localtest.me as context
 x  Error deploying application: the image 'docker.io/okteto/okteto:stable' is not accessible or it does not exist
    Please verify you have access to Docker Hub.
    If you are using an airgapped environment, make sure Okteto Remote is correctly configured in airgapped environments:
    See more at: https://www.okteto.com/docs/self-hosted/manage/air-gapped/

How to validate

  • build binary
  • option A: override okteto image using the deploy manifest field, check the tag is being extracted correctly
  • option B: setup a local okteto instance and run okteto deploy --remote without internet connection.

Signed-off-by: Teresa Romero <teresa@okteto.com>
Signed-off-by: Teresa Romero <teresa@okteto.com>
@teresaromero teresaromero requested a review from a team as a code owner December 11, 2024 09:25
Copy link
codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.77%. Comparing base (06913ac) to head (490bede).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4620      +/-   ##
==========================================
+ Coverage   47.75%   47.77%   +0.02%     
==========================================
  Files         369      369              
  Lines       29718    29721       +3     
==========================================
+ Hits        14191    14200       +9     
+ Misses      14428    14424       -4     
+ Partials     1099     1097       -2     

@teresaromero teresaromero merged commit 52c810b into master Dec 11, 2024
17 of 18 checks passed
@teresaromero teresaromero deleted the tere/DEV-711-fix-err-tag branch December 11, 2024 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0