Skip to content

docs: updated quickstart/run envoy doc to ensure a smoother first time experience - #17413

Merged
mattklein123 merged 7 commits into
envoyproxy:mainfrom
lakamsani:main
Jul 22, 2021
Merged

mattklein123 merged 7 commits into
envoyproxy:mainfrom
lakamsani:main

Conversation

@lakamsani

Copy link
Copy Markdown
Contributor

Commit Message: updated quickstart/run envoy docs to ensure a smoother run based
on a couple of issues encountered trying for the first time on macOS Catalina
10.15.7. Also updated .gitignore with macOS and IntelliJ related files
Additional Description:
Risk Level: Low
Testing:
Docs Changes: updated quickstart docs
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only

Copy link
Copy Markdown

Hi @lakamsani, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #17413 was opened by lakamsani.

see: more, trace.

@htuch

htuch commented Jul 20, 2021

Copy link
Copy Markdown
Member

@lakamsani

Copy link
Copy Markdown
Contributor Author

@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #17413 was synchronize by lakamsani.

see: more, trace.

on a couple of issues encountered trying for the first time on macOS Catalina
10.15.7. Also updated .gitignore with macOS and IntelliJ related files

Signed-off-by: vamsee.lakamsani <[email protected]>
@phlax

phlax commented Jul 20, 2021

Copy link
Copy Markdown
Member

@lakamsani i think if you rebase to main you will get rid of the extra commits

@lakamsani

lakamsani commented Jul 21, 2021 •

Copy link
Copy Markdown
Contributor Author

@lakamsani i think if you rebase to main you will get rid of the extra commits

@phlax ok. extra commits are gone now. This PR now just has my changes. Please check. Thanks.

To start Envoy as a system daemon :download:`download the demo configuration <_include/envoy-demo.yaml>`, and start
as follows:
To start Envoy as a system daemon :download:`download the demo configuration <_include/envoy-demo.yaml>`. Confirm that the downloaded file has
the `.yaml` extension (and not `.yml`) and start as follows:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

im not sure this is necessary - what problem is addressing ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

On my macbook (latest Catalina and Chrome) when I clicked on that link, it saved the file with a .yml extension. Not sure why. Without realizing that, when I ran envoy with it (using zsh tab completion for the file name) it exited with this error.

[2021-07-21 05:23:43.653][397997][critical][main] [source/server/server.cc:113] error initializing configuration 'envoy-demo.yml': Unable to parse JSON as proto (INVALID_ARGUMENT:Unexpected token.

It wasn't obvious from the error that the problem was with the file extension. I found that out via web search. It might be good if the config file parsing code works with either extension. Perhaps there's some background on this I don't know 🙂. So I was thinking this suggestion might save someone else some time during the initial try/quickstart.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The sample config is saved with the correct .yaml extension a different macbook running the latest macOS Big Sur. Here are the screenshots. So may be more of a corner case I ran into.
bigsur-Screen Shot 2021-07-21 at 5 55 15 AM
catalina-Screen Shot 2021-07-21 at 5 53 02 AM

@mattklein123

Copy link
Copy Markdown
Member

Sorry can you force push and fix DCO please? Thank you.

/wait

…n the

quickstart config override example, per PR review feedback

Signed-off-by: vamsee.lakamsani <[email protected]>
@lakamsani

Copy link
Copy Markdown
Contributor Author

Sorry can you force push and fix DCO please? Thank you.

/wait

Done. My fingers are used to gc alias vs gcs alias 🙂

@lakamsani lakamsani closed this Jul 21, 2021
@lakamsani lakamsani reopened this Jul 21, 2021
htuch
htuch previously approved these changes Jul 21, 2021

@htuch htuch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@phlax phlax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lakamsani thanks for the contrib but im -1 to this change

there is nothing special about this particular file download - the same thing could happen for any/all of the downloads in the docs - why add it here

i think this is an OS issue and unrelated to getting started with envoy

@lakamsani

Copy link
Copy Markdown
Contributor Author

@lakamsani thanks for the contrib but im -1 to this change

there is nothing special about this particular file download - the same thing could happen for any/all of the downloads in the docs - why add it here

i think this is an OS issue and unrelated to getting started with envoy

@phlax I was thinking that while .yaml is the recommended/go-forward extension .yml is still around. wikipedia suggests either extension. I have seen cases where the parsing logic of tools that use yaml for config don't really care about the extension. Envoy's config parsing code is picky for .yaml extension and the error message is kind of cryptic with .yml. So this hint in a quickstart doc about a critical file like startup config file is useful, given that OS behavior with file extensions on download isn't always consistent. As an alternative do you support a change to the parsing code to print a more meaningful error message when it sees a config file extension other than .yaml?

@mattklein123

Copy link
Copy Markdown
Member

As an alternative do you support a change to the parsing code to print a more meaningful error message when it sees a config file extension other than .yaml?

This has come up before and there may already be a tracking issue on this. I think this would be a great contribution and/or just checking for yml also as a YAML extension.

@htuch

htuch commented Jul 22, 2021 •

Copy link
Copy Markdown
Member

+1 on .yml support. Or at least some way for Envoy to make the debug experience a bit easier if we want to be opinionated here "did you mean foo.yaml?).

In the absence of this support, it would be good to have the most user friendly quick start we can.

@lakamsani

Copy link
Copy Markdown
Contributor Author

I built bazel-bin/source/exe/envoy-static for the first time today on my macbook. Will try and update this PR with the change to the config file parsing code. I 'm completely new to this codebase as well as bazel although I have some C++ background. If anyone has any suggestions on where to start in the code lmk. Thanks.

@phlax

phlax commented Jul 22, 2021

Copy link
Copy Markdown
Member

+1 on .yml support.

my point is this.

the docs have a load of downloadable yaml files - this issue which is specific to mac, some versions of mac, and iiuc understanding your OS

the section here is not about downloading files with the correct file extension - its about first running Envoy

if we really think this is an issue that actually needs to be addressed, can i ask that whatever guidance is added is not added to the getting started running envoy section

@phlax

phlax commented Jul 22, 2021

Copy link
Copy Markdown
Member

also regarding .yaml support...

.yml and .yaml are both supported - this is nothing to do with that - the problem arises when your browser downloader - for whatever crazy reasons - decides to replace the file extension on a downloaded file

the downloaded file would still work, but the docs give the actual files name - so if its not downloaded as that it doesnt

@lakamsani

Copy link
Copy Markdown
Contributor Author

also regarding .yaml support...

.yml and .yaml are both supported - this is nothing to do with that - the problem arises when your browser downloader - for whatever crazy reasons - decides to replace the file extension on a downloaded file

the downloaded file would still work, but the docs give the actual files name - so if its not downloaded as that it doesnt

This wasn't the case when I tried. The same config file when given to envoy with the .yml extension causes envoy to not start.

@phlax

phlax commented Jul 22, 2021

Copy link
Copy Markdown
Member

This wasn't the case when I tried. The same config file when given to envoy with the .yml extension causes envoy to not start.

wow you are right - it tries to parse .yml files as json - i think that this the bug that we need to address

@mattklein123

Copy link
Copy Markdown
Member

wow you are right - it tries to parse .yml files as json - i think that this the bug that we need to address

There is an open issue on this. I will look at fixing this as this has come up multiple times.

@mattklein123

Copy link
Copy Markdown
Member

I opened #17455 to allow loading .yml as YAML, so I think we can drop that part of this change. Thank you for pushing on this!

/wait

@lakamsani

lakamsani commented Jul 22, 2021 •

Copy link
Copy Markdown
Contributor Author

I opened #17455 to allow loading .yml as YAML, so I think we can drop that part of this change. Thank you for pushing on this!

Dropped that change and welcome!

@mattklein123 mattklein123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@mattklein123
mattklein123 merged commit 3655b63 into envoyproxy:main Jul 22, 2021
leyao-daily pushed a commit to leyao-daily/envoy that referenced this pull request Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants