-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Http] Gracefully onboarding internal routes to
VersionedRouter
(#1…
…94789) ## Summary If an internal route goes from unversioned -> versioned today this will surface as a breaking change. This PR allows internal routes to gracefully onboard to the versioned router. The fix is to default to version `1` of an internal route if no version is provided. In this way old clients can continue to interact with the new servers as developers onboard to the versioned router and roll out v2+ of an internal route. ## Notes We could use `buildNr` to narrow down internal routes defaulting to v1 to older clients only. IMO this would be more accurate, but also of marginal value. My rationale is: by requiring explicit versions during dev time the risk of us shipping new builds that don't provide a version is effectively nullified. Additionally we already run this risk with our public route default behaviour (we even require that public routes have explicit version in dev to mitigate this same risk for existing public clients). If reviewers feel otherwise I'm happy to revisit this! ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### Risk Matrix | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | By defaulting internal routes to v1 it's possible that behaviour becomes less predictable. | Low | Low | This is already true for public routes and we are allowing a more limited/more predictable version of that here. |
- Loading branch information
1 parent
61c9137
commit afecfd8
Showing
5 changed files
with
84 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters