-
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
[Saved Objects] Compatible mappings PR check #148656
Merged
rudolf
merged 72 commits into
elastic:main
from
jloleysens:compatible-schema-change-check
Apr 27, 2023
+3,598
−4
Merged
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
336b401
added an initial version of the mappings PR check CLI
jloleysens 879854f
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine ccdb0d6
[CI] Auto-commit changed files from 'node scripts/ts_project_linter -…
kibanamachine 1661e7d
some refactorings and added a levelled logger
jloleysens 92244b5
updated logs
jloleysens e02376a
some minor refactoring of helper functions out of CLI declaration and…
jloleysens e396f3e
added util file
jloleysens 570a114
[CI] Auto-commit changed files from 'node scripts/ts_project_linter -…
kibanamachine 5ed9b6f
use tooling-log for logging
jloleysens 2f042e6
another minor refactor, still need to figure additive-only changes...
jloleysens 6b225d5
[CI] Auto-commit changed files from 'node scripts/ts_project_linter -…
kibanamachine 38059d2
update comment
jloleysens 68b87e8
fix comment
jloleysens 7df09ad
move startES helper to utils
jloleysens d2ef288
Merge branch 'main' into compatible-schema-change-check
jloleysens 728117f
refactor: move incompat check to own file
jloleysens 9663e63
small refactor of where esClient is instantiated and also added algo …
jloleysens 4d6ecba
updated CLI log to be slightly clearer
jloleysens 7956cf0
set up CLI to run as PR check step
jloleysens 7d5aac4
move saved objects compat check to base PR steps
jloleysens 176c18d
add depends on
jloleysens 590a611
do bootstrap before running CLI
jloleysens 732b800
finish README
jloleysens ac08d24
update types and docs for PluginSystemOverrides class
jloleysens f5743a4
added class-level comment too
jloleysens 3f2b245
[CI] Auto-commit changed files from 'node src/cli_compatible_mappings…
kibanamachine ecc0773
Merge branch 'main' of github.com:elastic/kibana into pr/148656
f1e6965
[checkMappingsUpdate] convert to a dev cli
b3fbae1
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine d954a83
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine fdd800c
Merge branch 'main' into compatible-schema-change-check
jloleysens 49b6cc0
minor refactor of logic
jloleysens 8b01ace
stricter typing and avoid using deprecated Rx API
jloleysens f48b9f8
remove static-package pattern
jloleysens a55a23d
implemented config-driven override instead
jloleysens 99508ba
omit from public interfaces
jloleysens c398e04
refactor private function name
jloleysens 5e4d167
use PluginConfig instead
jloleysens c0acfdf
added plugin service-level test
jloleysens a20896e
added additive only check tests
jloleysens d15fbc9
test behaviour when adding a new field
jloleysens 346d938
added test for empty current object
jloleysens e1e3a64
added incompat mappings test
jloleysens ca095ad
added test for expected inputs
jloleysens 5e1cb46
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine fff5557
Merge branch 'main' into compatible-schema-change-check
jloleysens d838753
minor refactor to remove const string from PluginConfig class
jloleysens 669f0dc
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine e30b972
Merge branch 'main' into compatible-schema-change-check
jloleysens 930bf71
Merge branch 'main' into compatible-schema-change-check
jloleysens 45c9cf2
run compat check with other checks, not in own job
jloleysens d2f23d1
remove "__internal__" from config path
jloleysens 719f5ab
fix jest test
jloleysens 0a81e23
Merge branch 'main' into compatible-schema-change-check
jloleysens da85a0d
Merge branch 'main' into compatible-schema-change-check
jloleysens f67af65
Merge branch 'main' into compatible-schema-change-check
jloleysens 0a185eb
Merge branch 'main' into compatible-schema-change-check
jloleysens 7bef5b4
CLI usability fix: make it so that running with --fix implies we skip…
jloleysens 8ac9bfc
updated mappings snapshot
jloleysens 8ffebf1
Revert "CLI usability fix: make it so that running with --fix implies…
jloleysens a9b2e06
Merge branch 'main' into compatible-schema-change-check
jloleysens 1aeaa94
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine 6e9640c
Merge branch 'main' into compatible-schema-change-check
jloleysens 0aa561c
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine 12b922b
Merge branch 'main' into compatible-schema-change-check
jloleysens 6639be6
Merge branch 'main' into compatible-schema-change-check
jloleysens a7ae61b
update current mappings with incompatible changes
jloleysens 481ac10
Merge branch 'main' into compatible-schema-change-check
jloleysens ab5ff42
Merge branch 'main' into compatible-schema-change-check
jloleysens f0dc206
fix snapshot and update code
jloleysens b34f0aa
remove eslint-disable?
jloleysens 6432cb5
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
14 changes: 14 additions & 0 deletions
14
.buildkite/scripts/steps/checks/saved_objects_compat_changes.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/common/util.sh | ||
|
||
echo --- Check Mappings Update | ||
cmd="node scripts/check_mappings_update" | ||
if is_pr && ! is_auto_commit_disabled; then | ||
cmd="$cmd --fix" | ||
fi | ||
spalger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
eval "$cmd" | ||
check_for_changed_files "$cmd" true |
Validating CODEOWNERS rules …
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
20 changes: 20 additions & 0 deletions
20
packages/core/plugins/core-plugins-server-internal/src/constants.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const ENABLE_ALL_PLUGINS_CONFIG_PATH = 'forceEnableAllPlugins' as const; | ||
|
||
/** | ||
* Set this to true in the raw configuration passed to {@link Root} to force | ||
* enable all plugins. | ||
* @internal | ||
*/ | ||
export const PLUGIN_SYSTEM_ENABLE_ALL_PLUGINS_CONFIG_PATH = | ||
`plugins.${ENABLE_ALL_PLUGINS_CONFIG_PATH}` as const; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# @kbn/check-mappings-update-cli | ||
|
||
Saved Objects CLI tool that can be used to check whether a snapshot of current | ||
mappings (i.e., mappings on main) is compatible with mappings we can extract | ||
from the current code. | ||
|
||
See `node scripts/check_mappings_update --help` for more info. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Fantastic!