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

[HTTP] Fix how versioned route opts are mapped to IRouter registrar opts #157875

Merged

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented May 16, 2023

Summary

The versioned router internally uses the IRouter and currently incorrectly passes through options. TS was not complaining due to structural type checking seeing this as valid. Added a test to ensure all options are being passed through as expected.

Note: auto merge is on so only approve if happy for it to be merged.

Checklist

@jloleysens jloleysens added Feature:http Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes v8.9.0 labels May 16, 2023
@jloleysens jloleysens requested a review from a team as a code owner May 16, 2023 13:05
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@jloleysens jloleysens enabled auto-merge (squash) May 16, 2023 13:07
@jloleysens jloleysens self-assigned this May 16, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 400 404 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 480 484 +4
total +6

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @jloleysens

@jloleysens jloleysens merged commit 7e93f1e into elastic:main May 16, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label May 16, 2023
@jloleysens jloleysens deleted the http/fix-passing-opts-to-route-registrar branch May 16, 2023 14:07
jasonrhodes pushed a commit that referenced this pull request May 17, 2023
…pts (#157875)

## Summary

The versioned router internally uses the IRouter and currently
incorrectly passes through options. TS was not complaining due to
structural type checking seeing this as valid. Added a test to ensure
all options are being passed through as expected.


### Checklist

- [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:http release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants