-
Notifications
You must be signed in to change notification settings - Fork 312
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix panic when inferring stack with empty image #4312
Conversation
6ec8d21
to
f54f07d
Compare
ac03fb0
to
edd9899
Compare
@@ -35,7 +35,7 @@ import ( | |||
oktetoLog "github.com/okteto/okteto/pkg/log" | |||
"github.com/okteto/okteto/pkg/model/forward" | |||
"github.com/spf13/afero" | |||
yaml "gopkg.in/yaml.v2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goland insists in removing this, which is redundant, happy to revert it if we prefer so.
5e2d40a
to
93bceb1
Compare
Signed-off-by: Andrea Falzetti <andrea@okteto.com>
93bceb1
to
1dd0df2
Compare
Signed-off-by: Andrea Falzetti <andrea@okteto.com>
1dd0df2
to
488a3c3
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4312 +/- ##
==========================================
- Coverage 43.10% 43.09% -0.01%
==========================================
Files 371 371
Lines 30021 30025 +4
==========================================
Hits 12940 12940
- Misses 15954 15956 +2
- Partials 1127 1129 +2 |
* fix panic when inferring stack with empty image Signed-off-by: Andrea Falzetti <andrea@okteto.com> * add e2e test Signed-off-by: Andrea Falzetti <andrea@okteto.com> --------- Signed-off-by: Andrea Falzetti <andrea@okteto.com> (cherry picked from commit 260bfeb)
* fix panic when inferring stack with empty image Signed-off-by: Andrea Falzetti <andrea@okteto.com> * add e2e test Signed-off-by: Andrea Falzetti <andrea@okteto.com> --------- Signed-off-by: Andrea Falzetti <andrea@okteto.com> (cherry picked from commit 260bfeb)
Proposed changes
Fixes DEV-368
This PR fixes a panic that is caused when using Docker Compose and Okteto Manifests together and the
Image
field of the service is empty. For example, when runningokteto down
orokteto destroy
the image is not built, which may cause the image field to be empty, in case the compose rely on built-in Okteto Variables such as${OKTETO_BUILD_<SERVICE>_IMAGE}
This is a panic that was introduced in
2.27.x
because of recent changes.How to validate
services.app.image
to${OKTETO_BUILD_APP_IMAGE}
okteto.yml
okteto build
and observe the panicdeploy
+up
+down
anddestroy
work as expected and cause no panics.CLI Quality Reminders 馃敡
For both authors and reviewers: