Skip to content

fix(test): create /okteto/artifacts dir (PROD-377) #4735

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 1 commit into from
Jun 20, 2025

Conversation

jpf-okteto
Copy link
Contributor

Signed-off-by: Javier Provecho Fernández (Okteto) jpf@okteto.com

Proposed changes

Fixes PROD-377

This PR ensures the /okteto/artifact directory is created when artifacts are defined. It also fixes a bug where the operation failed if the test command didn’t produce content, resulting in a missing folder.

How to validate

Create the following Okteto manifest:

test:
  foo:
    image: alpine
    context: this
    commands:
    - echo hello world
    artifacts:
    - there.txt

Run okteto test and observe the following error:

 x  The image '' is not accessible or it does not exist

Run okteto test -l debug to get more details:

error on stage [stage-2 1/1] COPY --from=runner /okteto/artifacts/ /: failed to calculate checksum of ref REDACTED: "/okteto/artifacts": not found

Apply the changes from this PR and run the command again. Confirm that the errors no longer appear.

Signed-off-by: Javier Provecho Fernández (Okteto) <jpf@okteto.com>

This PR ensures the /okteto/artifact directory is created when artifacts
are defined. It also fixes a bug where the operation failed if the test
command didn’t produce content, resulting in a missing folder.
@jpf-okteto jpf-okteto self-assigned this Jun 19, 2025
@jpf-okteto jpf-okteto requested a review from a team as a code owner June 19, 2025 21:29
@jpf-okteto jpf-okteto added run-e2e When used on a PR run windows & unix e2e release/bug-fix labels Jun 19, 2025
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.88%. Comparing base (08807a2) to head (3f766da).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4735      +/-   ##
==========================================
- Coverage   48.90%   48.88%   -0.03%     
==========================================
  Files         355      355              
  Lines       29752    29752              
==========================================
- Hits        14550    14544       -6     
- Misses      14043    14047       +4     
- Partials     1159     1161       +2     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@jLopezbarb jLopezbarb left a comment

Choose a reason for hiding this comment

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

Tested and working

@jpf-okteto jpf-okteto merged commit 8a06539 into master Jun 20, 2025
32 of 34 checks passed
@jpf-okteto jpf-okteto deleted the jpf-okteto/prod-377 branch June 20, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release/bug-fix run-e2e When used on a PR run windows & unix e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants