-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Alerting v2] updated the alerting-v2-constants package with artifacts constants, fix to the runbook max characters #260342
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
Merged
ana-davydova
merged 14 commits into
elastic:main
from
ana-davydova:alertingv2-fix-to-the-runbook
Apr 1, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
dad879b
created new package alertingv2-constants and added artifacts there, u…
ana-davydova 594f543
Changes from node scripts/generate codeowners
kibanamachine 7d2165b
small fix in renaming the file
ana-davydova d89c9a0
renaming the file
ana-davydova 21b8ccf
update to the test, testing the rejection message
ana-davydova e983596
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine 886e9c5
Merge branch 'main' into alertingv2-fix-to-the-runbook
ana-davydova ed0b0c4
codeowners file merged from main
ana-davydova 57f9322
Merge branch 'main' into alertingv2-fix-to-the-runbook
ana-davydova 4facf41
fix to the codeowners file
ana-davydova cd88dc3
Merge branch 'alertingv2-fix-to-the-runbook' of https://github.com/an…
ana-davydova 38a1718
revert CODEOWNERS auto-generated changes
ana-davydova 56a3c3c
fix ci error
ana-davydova 6b69284
Merge branch 'main' into alertingv2-fix-to-the-runbook
ana-davydova 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 hidden or 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
29 changes: 29 additions & 0 deletions
29
x-pack/platform/packages/shared/response-ops/alerting-v2-constants/src/artifacts.ts
This file contains hidden or 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,29 @@ | ||
| /* | ||
| * 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; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| /** Artifact type identifier for runbooks */ | ||
| export const RUNBOOK_ARTIFACT_TYPE = 'runbook'; | ||
|
|
||
| /** Default maximum character length for artifact values (applies when no type-specific override exists) */ | ||
| export const DEFAULT_ARTIFACT_VALUE_LIMIT = 1024; | ||
|
|
||
| /** | ||
| * Type-specific artifact value length limits. | ||
| * | ||
| * To raise or add a limit for a new artifact type, add an entry here. | ||
| * The framework schema resolves: `ARTIFACT_VALUE_LIMITS[type] ?? DEFAULT_ARTIFACT_VALUE_LIMIT`. | ||
| * No framework code changes are needed — only this map. | ||
| */ | ||
| export const ARTIFACT_VALUE_LIMITS: Readonly<Record<string, number>> = { | ||
| [RUNBOOK_ARTIFACT_TYPE]: 50_000, | ||
| }; | ||
|
|
||
| /** The highest value in ARTIFACT_VALUE_LIMITS (used as the Zod base .max()) */ | ||
| export const MAX_ARTIFACT_VALUE_LIMIT = Math.max( | ||
| DEFAULT_ARTIFACT_VALUE_LIMIT, | ||
| ...Object.values(ARTIFACT_VALUE_LIMITS) | ||
| ); |
8 changes: 8 additions & 0 deletions
8
x-pack/platform/packages/shared/response-ops/alerting-v2-constants/src/index.ts
This file contains hidden or 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,8 @@ | ||
| /* | ||
| * 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; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| export * from './artifacts'; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| "target/**/*" | ||
| ], | ||
| "kbn_references": [ | ||
| "@kbn/zod" | ||
| "@kbn/zod", | ||
| "@kbn/alerting-v2-constants" | ||
| ] | ||
| } | ||
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.
Can you test the rejection message as well.
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.
Addressed in here