-
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
Fix config validation when elastic.apm
is defined
#96502
Fix config validation when elastic.apm
is defined
#96502
Conversation
@@ -9,22 +9,27 @@ | |||
import { ConfigService } from '@kbn/config'; | |||
import { CriticalError } from '../errors'; | |||
|
|||
const ignoredPaths = ['dev.', 'elastic.apm.']; |
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.
The dev
schema was only added to avoid validation failures. Now that we have this ignore list instead, I removed the dev
schema and added it here.
const invalidConfigExitCode = 78; | ||
const legacyInvalidConfigExitCode = 64; |
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.
Keeping 64
for invalid config keys until 8.0
for BWC. Added a task to change that in the 8.0
meta issue.
Pinging @elastic/kibana-core (Team:Core) |
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.
code LGTM
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.
tested locally:
for the legacy config:
logging.verbose: 42
received
FATAL Error: [config validation of [logging].verbose]: expected value of type [boolean] but got [number]
error Command failed with exit code 1.
with
server.basePath: 1
received:
FATAL CLI ERROR Error: [config validation of [server].basePath]: expected value of type [string] but got [number]
@mshustov you tested using the dev mode, right? If so, the main process is not 'forwarding' the return code from the kibana server. For |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
…to-metrics-tab * 'master' of github.com:elastic/kibana: (44 commits) [Exploratory View]Additional metrics for kpi over time (elastic#96532) [Fleet] UI changes on hosted policy detail view (elastic#96337) Stacked line charts incorrectly shows one term as 100% (elastic#96203) [Fleet] Create enrollment API keys as current user (elastic#96464) [Lens] Make table and metric show on top Chart switcher (elastic#96601) skip flaky suite (elastic#96691) [Lens] Hide "Show more errors" once expanded (elastic#96605) [Discover] Unskip histogram hiding test (elastic#95759) skip flyout test, add linked issue elastic#96708 skip copy_to_space_flyout_internal.test.tsx elastic#96708 fix config validation (elastic#96502) Document telemetry fields for stack security features (elastic#96638) [Partial Results] Move inspector adapter integration into search source (elastic#96241) [RAC] Rule registry plugin (elastic#95903) [APM] Run precommit tasks sequentially (elastic#96551) [Maps] fix Kibana does not recognize a valid geo_shape index when attempting to create a Tracking Containment alert (elastic#96633) [Security Solution] [Cases] Small UI bugfixes (elastic#96511) [Actions UI] Changed PagerDuty action form UI to fill payload fields according to the API docs for Resolve and Acknowledge events. (elastic#96363) App Search: Result Component Updates (elastic#96184) [Alerting] Preconfigured alert history index connector (elastic#94909) ...
Summary
Fix #96376
Fix a regression caused by the removal of the legacy server's schema in #95510
elastic.apm
prefix when checking for unused keysdev
config and use the same mechanism to ignore unuseddev.*
keys78
error code when the configuration validation failsChecklist