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

docs: updating docs with explicit v1 callouts #4728

Merged
merged 4 commits into from
Oct 16, 2018

Conversation

alyssawilk
Copy link
Contributor

Part of removing v1 docs.

Risk Level: low (risk of bad docs)
Testing: n/a
Docs Changes: yep
Release Notes: nope
Part of #4617

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks, some nits.

{"binary": "000000000000f03f"},
{"binary": "00"}
{"text": "39000000"},
{"text": "EEEEEEEE"},
Copy link
Member

Choose a reason for hiding this comment

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

How come you removed the full example?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

full example was binary, and binary is hidden in v2 API. I figured it wasn't really relevant without base64 converting which I didn't want to bother with.

Copy link
Member

Choose a reason for hiding this comment

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

As mentioned below, I think we need to consistently move to YAML. Also, I think this example is wrong for v2, see https://github.com/envoyproxy/envoy/blob/master/api/envoy/api/v2/core/health_check.proto#L118. send is now a single Payload.

{"binary": "00000000000000f03f"},
{"binary": "00"}
{"text": "EEEEEEEE"},
{"text": "01000000"},
Copy link
Member

Choose a reason for hiding this comment

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

Why not switch to YAML?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Partially because this is a config snippet, partially because I'm trying to do the minimal work to remove the deprecated docs

in the route configuration determines the probability of selecting a
particular route (and hence its cluster). By using the runtime
particular route (and hence its cluster). By using the runtime_fraction
Copy link
Member

Choose a reason for hiding this comment

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

*runtime_fraction*

.. code-block:: yaml

virtual_hosts:
- name: "www2"
Copy link
Member

Choose a reason for hiding this comment

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

YAML doesn't need ""

.. code-block:: yaml

actions:
- {source_cluster: {}}
Copy link
Member

Choose a reason for hiding this comment

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

This looks pretty strange YAML; did you validate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so if I tweak the rate limit test to dump MessageUtil::getJsonStringFromMessage( on a tweaked rate limit proto, I get
{
"disable_key": "",
"actions": [
{
"source_cluster": {}
},
{
"remote_address": {}
},
{
"generic_key": {
"descriptor_value": "some_value"
}
}
]
}

which tossed into the first hit yaml converter online gets me this, which tossed into the first yaml validator online, thinks it's valid, but suggests

actions:

source_cluster: {}
  • generic_key:
    descriptor_value: some_value
    I could switch to this, or I could fall back to json?

Copy link
Member

Choose a reason for hiding this comment

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

We need to use YAML in all examples as this is the official textual representation of proto in Envoy.

@htuch htuch self-assigned this Oct 15, 2018
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks!

@htuch htuch merged commit f1b4847 into envoyproxy:master Oct 16, 2018
soya3129 pushed a commit to soya3129/envoy that referenced this pull request Oct 19, 2018
Part of removing v1 docs.

Risk Level: low (risk of bad docs)
Testing: n/a
Docs Changes: yep
Release Notes: nope
Part of envoyproxy#4617

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

Signed-off-by: Yang Song <yasong@yasong00.cam.corp.google.com>
@alyssawilk alyssawilk deleted the convert_docs branch November 28, 2018 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants