diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 4c071df810e5c..6ab844204c448 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -644,12 +644,13 @@ const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed!.map((r) => new R // Run Saved Objects checks conditionally if ( - await doAnyChangesMatch([ + !GITHUB_PR_LABELS.includes('ci:skip-so-check') && + (await doAnyChangesMatch([ /^packages\/kbn-check-saved-objects-cli\/current_fields.json/, /^packages\/kbn-check-saved-objects-cli\/current_mappings.json/, /^src\/core\/server\/integration_tests\/ci_checks\/saved_objects\/check_registered_types.test.ts/, /^\.buildkite\/pipelines\/pull_request\/check_saved_objects\.yml/, - ]) + ])) ) { pipeline.push( getPipeline('.buildkite/pipelines/pull_request/check_saved_objects.yml', cancelable) diff --git a/packages/kbn-check-saved-objects-cli/README.md b/packages/kbn-check-saved-objects-cli/README.md index 620b15241060b..66603b87689aa 100644 --- a/packages/kbn-check-saved-objects-cli/README.md +++ b/packages/kbn-check-saved-objects-cli/README.md @@ -17,6 +17,10 @@ On a PR, the step: 1. **Resolves a baseline commit**: It uses the PR merge-base commit (`GITHUB_PR_MERGE_BASE`). Because a snapshot may not exist for that exact SHA, the script walks the commit’s parent chain (up to a limit) until it finds a commit for which a snapshot exists in the cloud bucket (`findExistingSnapshotSha`). 2. **Runs the check**: It calls `node scripts/check_saved_objects --baseline --algorithm both` (and `--fix` when auto-commit is enabled). The script fetches the baseline snapshot from the bucket, starts Kibana to build the current type registry, and runs validations comparing current state to that baseline. +### Skipping the check + +Add the `ci:skip-so-check` label to a PR to bypass the "Check changes in Saved Objects" step entirely. Use this as an escape hatch for unrelated false positives (for example, `Joi` version bumps or no-op schema refactors that change snapshot hashes without changing the persisted shape). Do not use it to bypass real Saved Object type changes. + ### Where snapshots come from Baseline snapshots are **stored in a GCP bucket** and served at: