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

Bad service name leads to unhelpful error message #1389

Closed
benjifisher opened this Issue Feb 3, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@benjifisher
Copy link
Contributor

benjifisher commented Feb 3, 2019

Please explain your request and its importance in the form of a user story.

As a Lando user who occasionally makes typos, I want helpful error messages.

Please provide some detail on how lando can help solve this problem

Provide a helpful error message, referring to a line number in .lando.yml, when it refers to a nonexistent service.

Is your feature request related to a problem? Please describe.

When I upgraded from Lando v3.0.0-rc.1 to v3.0.0-rc.3, I made all the required changes in .lando.yml. I was using a Drupal recipe via: nginx and did not realize that the name of the nginx service changed from nginx in the old version of Lando to appserver_nginx in the new one.

Describe the solution you'd like

Add a line number to the error message. This is what I see now:

$ lando start
Let's get this party started! Starting app..
landoproxyhyperion5000gandalfedition_proxy_1 is up-to-date
ERROR: The Compose file is invalid because:
Service nginx has neither an image nor a build context specified. At least one must be provided.
ERROR: The Compose file is invalid because:
Service nginx has neither an image nor a build context specified. At least one must be provided.

Describe alternatives you've considered

Additional context

Here is part of my .lando.yml:

name: lando-gatsby-drupal

recipe: drupal8
config:
  via: nginx
  webroot: drupal/web
  php: 7.2
  database: mariadb

proxy:
  nginx:
    - drupal.lgd.lndo.site

@benjifisher benjifisher added the feature label Feb 3, 2019

@benjifisher

This comment has been minimized.

Copy link
Contributor Author

benjifisher commented Feb 3, 2019

Perhaps also mention that lando info will show the names of the available services. (I did not realize that this command would still work even though the build failed.)

@pirog pirog self-assigned this Feb 3, 2019

@pirog pirog added this to the 3.0.0-rc.2-HOTFIXEZ milestone Feb 3, 2019

pirog added a commit that referenced this issue Feb 3, 2019

@pirog

This comment has been minimized.

Copy link
Member

pirog commented Feb 4, 2019

@benjifisher alright, this is in master and will be in our release tonight! thanks for all the help finding the obvious issues in RC2 before the real work week begins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment