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

matcher: allow specifying only an on_no_match #19

Merged
merged 4 commits into from
Nov 30, 2021

Conversation

snowp
Copy link
Contributor

@snowp snowp commented Nov 11, 2021

This provides a way to specify an action to match to without specifying a matcher.

Signed-off-by: Snow Pettersen snowp@lyft.com

This provides a way to specify an action to match to without specifying a matcher.

Signed-off-by: Snow Pettersen <snowp@lyft.com>
// Optional OnMatch to use if the matcher above was unspecified or if matching using the specified
// matcher failed.
// If not specified, the match will be considered unsucessful if a matcher was not specified or
// if the specified matcher failed to match.
OnMatch on_no_match = 3;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The name of this field is a bit of a misnomer now (or maybe not if you wrap your head around an unspecified matcher as meaning "match nothing"), but not sure if we want to rename

@snowp
Copy link
Contributor Author

snowp commented Nov 11, 2021

markdroth
markdroth previously approved these changes Nov 11, 2021
Copy link
Contributor

@markdroth markdroth left a comment

Choose a reason for hiding this comment

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

This looks fine to me. I'd also be fine with having an always-match matcher.

// If specified, the OnMatch is used, and the matcher is considered
// to have matched.
// If not specified, the matcher is considered not to have matched.
// Optional OnMatch to use if the matcher above was unspecified or if matching using the specified
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest phrasing this comment as:

"""
Optional OnMatch to use if no matcher above matched (e.g., if there are no matchers specified above, or if none of the matches specified above succeeded).
If no matcher above matched and this field is not populated, the match will be considered unsuccessful.
"""

@snowp
Copy link
Contributor Author

snowp commented Nov 11, 2021

Let me see what a allow all match action would look like

Signed-off-by: Snow Pettersen <snowp@lyft.com>
@zhxie
Copy link

zhxie commented Nov 12, 2021

IMO, it is better to remove the required than add a always_match matcher, since there is similarity between always_match and on_no_match.

@markdroth
Copy link
Contributor

Sorry, @snowp, I guess I wasn't clear: I didn't mean to add a new first-class field for always-match. What I meant was that we could add a new custom matcher that always matches any input, which we can plug in as a custom matcher into the extension point.

But I suspect that @zhxie is right, probably the original approach of removing the required was better.

@htuch
Copy link
Contributor

htuch commented Nov 12, 2021

Yeah, I think the original was cleaner IMHO as well.

This reverts commit b578d5e.

Signed-off-by: Snow Pettersen <snowp@lyft.com>
markdroth
markdroth previously approved these changes Nov 15, 2021
@markdroth
Copy link
Contributor

@htuch It looks like one of the CI checks didn't run for some reason. Is there a way to trigger a re-run?

@htuch
Copy link
Contributor

htuch commented Nov 16, 2021

I think CI is broken as our image is too out-of-date "##[warning]An image label with the label Ubuntu16 does not exist." from https://dev.azure.com/cncf/xds/_build/results?buildId=94428&view=logs&j=8f9c5ecd-7085-541f-b145-4b6a0a921008.

I don't see this though in https://github.com/cncf/xds/blob/main/ci/azure-pipelines.yml or if I search the repo. @lizan do you know what might be up here?

@zhxie
Copy link

zhxie commented Nov 30, 2021

Do we have any updates on this PR?

@mattklein123
Copy link
Contributor

I can force merge this PR if needed, @snowp?

Signed-off-by: Snow Pettersen <snowp@lyft.com>
@snowp
Copy link
Contributor Author

snowp commented Nov 30, 2021

Let me see if I can successfully pull in this version in Envoy just to sanity check that the protos are good (I think with CI being broken we don't know)

@snowp
Copy link
Contributor Author

snowp commented Nov 30, 2021

Ok this looks good to me, if we don't have a quick fix to CI I think a force merge would be good

@mattklein123 mattklein123 merged commit a8f9461 into cncf:main Nov 30, 2021
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.

None yet

5 participants