-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Ingest Manager] validate agent route using AJV instead kbn-config-schema #76546
[Ingest Manager] validate agent route using AJV instead kbn-config-schema #76546
Conversation
…ate-agent-route-using-ajv
Pinging @elastic/ingest-management (Team:Ingest Management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this! I left some comments inline but 👍 to 🚀 and iterate
@@ -84,7 +116,10 @@ export const registerRoutes = (router: IRouter) => { | |||
router.post( | |||
{ | |||
path: AGENT_API_ROUTES.CHECKIN_PATTERN, | |||
validate: PostAgentCheckinRequestSchema, | |||
validate: { | |||
params: makeValidator(PostAgentCheckinRequestParamsJSONSchema), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: John Schulz <[email protected]>
…ate-agent-route-using-ajv
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
* master: (47 commits) Do not require id & description when creating a logstash pipeline (elastic#76616) Remove commented src/core/tsconfig file (elastic#76792) Replaced whitelistedHosts with allowedHosts in actions ascii docs (elastic#76731) [Dashboard First] Genericize Attribute Service (elastic#76057) [ci-metrics] unify distributable file count metrics (elastic#76448) [Security Solution][Detections] Handle conflicts on alert status update (elastic#75492) [eslint] convert to @typescript-eslint/no-unused-expressions (elastic#76471) [DOCS] Add default time range filter to advanced settings (elastic#76414) [Security Solution] Refactor NetworkTopNFlow to use Search Strategy (elastic#76249) [Dashboard] Update Index Patterns when Child Index Patterns Change (elastic#76356) [ML] Add option to Advanced Settings to set default time range filter for AD jobs (elastic#76347) Add CSM app to CODEOWNERS (elastic#76793) [Security Solution][Exceptions] - Updates exception item find sort field (elastic#76685) [Security Solution][Detections][Tech Debt] - Move to using common io-ts types (elastic#75009) [Lens] Drag dimension to replace (elastic#75895) URI encode the index names we fetch in the fetchIndices lib function. (elastic#76584) [Security Solution] Resolver retrieve entity id of documents without field mapped (elastic#76562) [Ingest Manager] validate agent route using AJV instead kbn-config-schema (elastic#76546) Updated non-dev usages of node-forge (elastic#76699) [Ingest Pipelines] Processor forms for processors K-S (elastic#75638) ...
Summary
Resolve #76281
Validate agent routes using AJV instead of
kbn-config-schema
askbn-config-schema
rely on Joi that is not the most performant JS library for validation.We should try to use AJV instead of JOI for the most frequently called of Fleet.
Perfomance improvements
Benchmark of the agent enroll request https://gist.github.com/nchaulet/894e00cf8bd649c3e1c2b063346cb621
I am working on running a Fleet load test against this change.