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

Replace imageref in Okteto Registry by their sha to enforce redeploym… #2777

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

pchico83
Copy link
Contributor

…ents if the image is updated

We aren't handling imageRef properly in compose files like this:

services:
  web:
    image: okteto.dev/app:okteto
    build: .
    command: ./run_web.sh
    volumes:
      - .:/app
    ports:
      - "8080:8080"

  worker:
    image: okteto.dev/app:okteto
    command: ./run_celery.sh
    volumes:
      - .:/app

because web.image is replaced by its sha256, but worker.image is not.

This PR always translated by its sha256 any compose image reference to the okteto Registry, to enforce redeployment if the image has changed

@pchico83 pchico83 requested a review from a team June 10, 2022 03:18
@derek derek bot added the no-dco label Jun 10, 2022
@codecov
Copy link

codecov bot commented Jun 10, 2022

Codecov Report

Merging #2777 (a9073a5) into master (1c76212) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2777      +/-   ##
==========================================
- Coverage   32.10%   32.08%   -0.02%     
==========================================
  Files         158      158              
  Lines       18582    18593      +11     
==========================================
  Hits         5966     5966              
- Misses      11910    11921      +11     
  Partials      706      706              
Impacted Files Coverage Δ
pkg/cmd/stack/deploy.go 20.33% <0.00%> (-0.09%) ⬇️
pkg/registry/client.go 0.00% <0.00%> (ø)
pkg/registry/registry.go 28.57% <0.00%> (-5.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c76212...a9073a5. Read the comment docs.

…ents if the image is updated

Signed-off-by: Pablo Chico de Guzman <pchico83@gmail.com>
@derek derek bot removed the no-dco label Jun 10, 2022
@okteto okteto deleted a comment from derek bot Jun 10, 2022
@pchico83 pchico83 merged commit 22aedb4 into master Jun 10, 2022
@pchico83 pchico83 deleted the pchico83/image-sha-e2e branch June 10, 2022 07:45
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.

None yet

2 participants