Okteto Build Service (Or Pulling Images) Failing?

I am running into an issue wherein the build service within the Okteto Deploy Preview Github Action seems to be unable to pull an image it has previously built (for more context, I posted here, but this is a different issue, and hence why I made a new topic).

In my okteto.yml I had an okteto build command that builds an image that is pushed to my private okteto registry:

okteto build --no-cache -t okteto.dev/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts cbioportal

This image is later utilized by my docker-compose file, and this file is used by the Deploy Preview action to deploy my application.

However, during the build process, I confirmed that it says it successfully builds and pushes it to my private okteto registry, but when it later pulls the image in the deploy part of the deploy-preview action, I run into the following error, where it says the built image was not found:


#3 [internal] load metadata for registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts

#3 ERROR: registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts: not found

 > [internal] load metadata for registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts:

 x Error building service 'cbioportal': error building image 'registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts': build failed: failed to solve: registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts: registry.cloud.okteto.net/pr-50-justinjao/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts: not found

error executing command 'okteto build -t okteto.dev/cbioportal-docker-compose-cbioportal:okteto-with-volume-mounts cbioportal': exit status 1

What is even more strange to me is that I ran this same pipeline 2 days ago, and it was working, but when I ran it yesterday and today, it seems to be failing, even though I changed nothing in my workflow. This leads me to suspect that there may be something going wrong within Okteto that I am unable to troubleshoot for.

Any help would be greatly appreciated!

Instead of building the image in a separate step, you can run the “okteto preview” action pointing to your docker compose file. This will ensure that it has the right tags and permissions. Okteto will build the necessary images and deploy everything:

# file: .github/workflows/preview.yaml
on:
  pull_request:
    branches:
      - main

jobs:
  preview:
    runs-on: ubuntu-latest
  steps:
    - name: Context
      uses: okteto/context@latest
      with:
        token: ${{ secrets.OKTETO_TOKEN }}
        
    - name: Deploy preview environment
      uses: okteto/deploy-preview@latest
      env:
       GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        name: pr-${{ github.event.number }}-cindylopez
        scope: personal
        file: docker-compose.yaml
        timeout: 15m