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

fix: skip volume mount translation into okteto manifest build #4231

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

jLopezbarb
Copy link
Contributor

Proposed changes

If you try to run okteto build on a compose file that only have volume mounts We try to build the services but given that we've removed the build support for the volume mounts, we are not building anything which results into a weird case where the user get that it's going to build if it's not a git repo or no other output:
Screenshot 2024-04-11 at 16 58 50

The correct behaviour must be to fallback to the v1 given that we don't have any service to build.

How to validate

  1. Create the following docker-compose.yml:
version: '2'
services:
  postgres:
    image: bitnami/postgresql:11.14.0-debian-10-r28
    environment:
      POSTGRES_USER: test
      POSTGRES_PASSWORD: test
      POSTGRES_DB: test
    volumes:
      - ./schema.sql:/test/schema.sql
  1. Run okteto build
  2. Check that it's fullbacking to the build v1

CLI Quality Reminders 🔧

For both authors and reviewers:

  • Scrutinize for potential regressions
  • Ensure key automated tests are in place
  • Build the CLI and test using the validation steps
  • Assess Developer Experience impact (log messages, performances, etc)
  • If too broad, consider breaking into smaller PRs
  • Adhere to our code style and code review guidelines

Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb jLopezbarb requested a review from a team as a code owner April 11, 2024 15:04
@jLopezbarb jLopezbarb added release/bug-fix backport release-2.26 Backport this PR to CLI version 2.26 labels Apr 11, 2024
Copy link
Member

@ifbyol ifbyol left a comment

Choose a reason for hiding this comment

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

Some CI job has failed but I think it is some transient error with an external service. It looks good!

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

Merging #4231 (53f6ce3) into master (d2065c3) will increase coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 33.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4231      +/-   ##
==========================================
+ Coverage   45.66%   45.68%   +0.01%     
==========================================
  Files         303      303              
  Lines       27539    27527      -12     
==========================================
- Hits        12577    12575       -2     
+ Misses      13889    13879      -10     
  Partials     1073     1073              

@jLopezbarb jLopezbarb merged commit 9b3f810 into master Apr 12, 2024
20 of 22 checks passed
@jLopezbarb jLopezbarb deleted the jlo/fix-compose-build-with-volumemounts branch April 12, 2024 07:39
github-actions bot pushed a commit that referenced this pull request Apr 12, 2024
Signed-off-by: Javier Lopez <javier@okteto.com>
(cherry picked from commit 9b3f810)
jLopezbarb added a commit that referenced this pull request Apr 12, 2024
…#4236)

Signed-off-by: Javier Lopez <javier@okteto.com>
(cherry picked from commit 9b3f810)

Co-authored-by: Javier López Barba <javier@okteto.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-2.26 Backport this PR to CLI version 2.26 release/bug-fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants