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

Backport route replacement #3868

Merged
merged 2 commits into from
Nov 16, 2020
Merged

Conversation

kdorosh
Copy link
Contributor

@kdorosh kdorosh commented Nov 16, 2020

backport of #3833

Description

Route replacement with UpstreamGroups does not work, allowing invalid config being sent to envoy.
Specifically, when route replacement is enabled and a route references a missing UpstreamGroup, an envoy Route will be served which does not contain a destination cluster of any type.

This change ensures that the route which points to a missing UpstreamGroup will be considered for when route replacement occurs.

Context

This bug is due to the fact that route replacement relies on the ClusterSpecifier of a Route being set, even if it references a missing or otherwise invalid cluster.

It wasn't working because if an UpstreamGroup isn't found, we immediately return an error which means a ClusterSpecifier is not set on the Route, e.g. it is nil

Checklist:

  • I included a concise, user-facing changelog (for details, see https://github.com/solo-io/go-utils/tree/master/changelogutils) which references the issue that is resolved.
  • If I updated APIs (our protos) or helm values, I ran make install-go-tools generated-code to ensure there will be no code diff
  • I followed guidelines laid out in the Gloo contribution guide
  • I opened a draft PR or added the work in progress label if my PR is not ready for review
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
    BOT NOTES:
    resolves Route Replacement does not work with UpstreamGroups #3818

lgadban and others added 2 commits November 16, 2020 10:49
* ensure missing UpstreamGroups set a ClusterSpecifier
* add test for missing upstreamgroup
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
* add changelog
* Merge branch 'master' into upstream-groups
* Merge refs/heads/master into upstream-groups
* Merge refs/heads/master into upstream-groups
@solo-changelog-bot
Copy link

Issues linked to changelog:
#3818

@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label Nov 16, 2020
@soloio-bulldozer soloio-bulldozer bot merged commit 81b12ec into v1.5.x Nov 16, 2020
@soloio-bulldozer soloio-bulldozer bot deleted the backport_route_replacement branch November 16, 2020 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants