forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Task manager enhancements for error handling in alerting and actions (e…
…lastic#39829) * Allow mtask definitions to overwrite default setting maxAttemps * Leverage scheduledAt from task manager * Treat maxAttempts like attempts and not retries * Add support for second intervals * Min 1 attempt * Reverse relying on scheduledAt * Add new startedAt attribute in task manager that keeps track when task started running * Don't extend runAt when claiming a task * Remove startedAt from state * Attempt trying to define custom getBackpressureDelay function * Pass error object to getBackpressureDelay * Cleanup processResultForRecurringTask code * Add backpressure to timed out tasks * Change default timeout backpressure calculation * getBackpressureDelay to return seconds instead of milliseconds * Add comment for task store query * Compress query * Revert alert / actions specific code * Add more interval tests * Fix failing jest tests * Fix test * Add more unit tests * Fix integration tests * Fix sorting of tasks to process * WIP * Always provide error when getBackpressureDelay is called * Rename getBackpressureDelay to getRetryDelay * retryAt to be calculated from timeout time by default * Remove invalid test * Add unit tests * Consider timeout before scheduling a retryAt * Remove backpressure terminology * Remove support for 0 based intervals and timeouts * Apply PR feedback * Fix last place using Math.abs * Modify migrations to allow running a script when converting an index to an alias * Convert task manager to use saved objects * Fix broken test * Fix broken tests pt1 * Remove index from task manager config schema * Accept platform changes * PR feedback * Apply PR feedback * Apply PR feedback pt2 * Apply PR feedback pt3 * Apply PR feedback pt4 * Fix feedback pt3 * Rename RawSavedObjectDoc to SavedObjectsRawDoc
- Loading branch information
Showing
47 changed files
with
1,473 additions
and
659 deletions.
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
11 changes: 11 additions & 0 deletions
11
docs/development/core/server/kibana-plugin-server.savedobjectsrawdoc._id.md
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) > [\_id](./kibana-plugin-server.savedobjectsrawdoc._id.md) | ||
|
||
## SavedObjectsRawDoc.\_id property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
_id: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
...evelopment/core/server/kibana-plugin-server.savedobjectsrawdoc._primary_term.md
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) > [\_primary\_term](./kibana-plugin-server.savedobjectsrawdoc._primary_term.md) | ||
|
||
## SavedObjectsRawDoc.\_primary\_term property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
_primary_term?: number; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/development/core/server/kibana-plugin-server.savedobjectsrawdoc._seq_no.md
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) > [\_seq\_no](./kibana-plugin-server.savedobjectsrawdoc._seq_no.md) | ||
|
||
## SavedObjectsRawDoc.\_seq\_no property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
_seq_no?: number; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/development/core/server/kibana-plugin-server.savedobjectsrawdoc._source.md
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) > [\_source](./kibana-plugin-server.savedobjectsrawdoc._source.md) | ||
|
||
## SavedObjectsRawDoc.\_source property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
_source: any; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/development/core/server/kibana-plugin-server.savedobjectsrawdoc._type.md
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,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) > [\_type](./kibana-plugin-server.savedobjectsrawdoc._type.md) | ||
|
||
## SavedObjectsRawDoc.\_type property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
_type?: string; | ||
``` |
24 changes: 24 additions & 0 deletions
24
docs/development/core/server/kibana-plugin-server.savedobjectsrawdoc.md
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,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsRawDoc](./kibana-plugin-server.savedobjectsrawdoc.md) | ||
|
||
## SavedObjectsRawDoc interface | ||
|
||
A raw document as represented directly in the saved object index. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface RawDoc | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [\_id](./kibana-plugin-server.savedobjectsrawdoc._id.md) | <code>string</code> | | | ||
| [\_primary\_term](./kibana-plugin-server.savedobjectsrawdoc._primary_term.md) | <code>number</code> | | | ||
| [\_seq\_no](./kibana-plugin-server.savedobjectsrawdoc._seq_no.md) | <code>number</code> | | | ||
| [\_source](./kibana-plugin-server.savedobjectsrawdoc._source.md) | <code>any</code> | | | ||
| [\_type](./kibana-plugin-server.savedobjectsrawdoc._type.md) | <code>string</code> | | | ||
|
20 changes: 20 additions & 0 deletions
20
...evelopment/core/server/kibana-plugin-server.savedobjectsschema.(constructor).md
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 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSchema](./kibana-plugin-server.savedobjectsschema.md) > [(constructor)](./kibana-plugin-server.savedobjectsschema.(constructor).md) | ||
|
||
## SavedObjectsSchema.(constructor) | ||
|
||
Constructs a new instance of the `SavedObjectsSchema` class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
constructor(schemaDefinition?: SavedObjectsSchemaDefinition); | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| schemaDefinition | <code>SavedObjectsSchemaDefinition</code> | | | ||
|
22 changes: 22 additions & 0 deletions
22
...elopment/core/server/kibana-plugin-server.savedobjectsschema.getindexfortype.md
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,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSchema](./kibana-plugin-server.savedobjectsschema.md) > [getIndexForType](./kibana-plugin-server.savedobjectsschema.getindexfortype.md) | ||
|
||
## SavedObjectsSchema.getIndexForType() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getIndexForType(type: string): string | undefined; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| type | <code>string</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`string | undefined` | ||
|
22 changes: 22 additions & 0 deletions
22
...development/core/server/kibana-plugin-server.savedobjectsschema.ishiddentype.md
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,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSchema](./kibana-plugin-server.savedobjectsschema.md) > [isHiddenType](./kibana-plugin-server.savedobjectsschema.ishiddentype.md) | ||
|
||
## SavedObjectsSchema.isHiddenType() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
isHiddenType(type: string): boolean; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| type | <code>string</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`boolean` | ||
|
22 changes: 22 additions & 0 deletions
22
...ment/core/server/kibana-plugin-server.savedobjectsschema.isnamespaceagnostic.md
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,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSchema](./kibana-plugin-server.savedobjectsschema.md) > [isNamespaceAgnostic](./kibana-plugin-server.savedobjectsschema.isnamespaceagnostic.md) | ||
|
||
## SavedObjectsSchema.isNamespaceAgnostic() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
isNamespaceAgnostic(type: string): boolean; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| type | <code>string</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`boolean` | ||
|
26 changes: 26 additions & 0 deletions
26
docs/development/core/server/kibana-plugin-server.savedobjectsschema.md
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,26 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSchema](./kibana-plugin-server.savedobjectsschema.md) | ||
|
||
## SavedObjectsSchema class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare class SavedObjectsSchema | ||
``` | ||
|
||
## Constructors | ||
|
||
| Constructor | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [(constructor)(schemaDefinition)](./kibana-plugin-server.savedobjectsschema.(constructor).md) | | Constructs a new instance of the <code>SavedObjectsSchema</code> class | | ||
|
||
## Methods | ||
|
||
| Method | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [getIndexForType(type)](./kibana-plugin-server.savedobjectsschema.getindexfortype.md) | | | | ||
| [isHiddenType(type)](./kibana-plugin-server.savedobjectsschema.ishiddentype.md) | | | | ||
| [isNamespaceAgnostic(type)](./kibana-plugin-server.savedobjectsschema.isnamespaceagnostic.md) | | | | ||
|
20 changes: 20 additions & 0 deletions
20
...opment/core/server/kibana-plugin-server.savedobjectsserializer.(constructor).md
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 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSerializer](./kibana-plugin-server.savedobjectsserializer.md) > [(constructor)](./kibana-plugin-server.savedobjectsserializer.(constructor).md) | ||
|
||
## SavedObjectsSerializer.(constructor) | ||
|
||
Constructs a new instance of the `SavedObjectsSerializer` class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
constructor(schema: SavedObjectsSchema); | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| schema | <code>SavedObjectsSchema</code> | | | ||
|
26 changes: 26 additions & 0 deletions
26
...opment/core/server/kibana-plugin-server.savedobjectsserializer.generaterawid.md
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,26 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSerializer](./kibana-plugin-server.savedobjectsserializer.md) > [generateRawId](./kibana-plugin-server.savedobjectsserializer.generaterawid.md) | ||
|
||
## SavedObjectsSerializer.generateRawId() method | ||
|
||
Given a saved object type and id, generates the compound id that is stored in the raw document. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
generateRawId(namespace: string | undefined, type: string, id?: string): string; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| namespace | <code>string | undefined</code> | | | ||
| type | <code>string</code> | | | ||
| id | <code>string</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`string` | ||
|
24 changes: 24 additions & 0 deletions
24
...ent/core/server/kibana-plugin-server.savedobjectsserializer.israwsavedobject.md
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,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSerializer](./kibana-plugin-server.savedobjectsserializer.md) > [isRawSavedObject](./kibana-plugin-server.savedobjectsserializer.israwsavedobject.md) | ||
|
||
## SavedObjectsSerializer.isRawSavedObject() method | ||
|
||
Determines whether or not the raw document can be converted to a saved object. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
isRawSavedObject(rawDoc: RawDoc): any; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| rawDoc | <code>RawDoc</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`any` | ||
|
27 changes: 27 additions & 0 deletions
27
docs/development/core/server/kibana-plugin-server.savedobjectsserializer.md
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,27 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSerializer](./kibana-plugin-server.savedobjectsserializer.md) | ||
|
||
## SavedObjectsSerializer class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare class SavedObjectsSerializer | ||
``` | ||
|
||
## Constructors | ||
|
||
| Constructor | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [(constructor)(schema)](./kibana-plugin-server.savedobjectsserializer.(constructor).md) | | Constructs a new instance of the <code>SavedObjectsSerializer</code> class | | ||
|
||
## Methods | ||
|
||
| Method | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [generateRawId(namespace, type, id)](./kibana-plugin-server.savedobjectsserializer.generaterawid.md) | | Given a saved object type and id, generates the compound id that is stored in the raw document. | | ||
| [isRawSavedObject(rawDoc)](./kibana-plugin-server.savedobjectsserializer.israwsavedobject.md) | | Determines whether or not the raw document can be converted to a saved object. | | ||
| [rawToSavedObject(doc)](./kibana-plugin-server.savedobjectsserializer.rawtosavedobject.md) | | Converts a document from the format that is stored in elasticsearch to the saved object client format. | | ||
| [savedObjectToRaw(savedObj)](./kibana-plugin-server.savedobjectsserializer.savedobjecttoraw.md) | | Converts a document from the saved object client format to the format that is stored in elasticsearch. | | ||
|
24 changes: 24 additions & 0 deletions
24
...ent/core/server/kibana-plugin-server.savedobjectsserializer.rawtosavedobject.md
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,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSerializer](./kibana-plugin-server.savedobjectsserializer.md) > [rawToSavedObject](./kibana-plugin-server.savedobjectsserializer.rawtosavedobject.md) | ||
|
||
## SavedObjectsSerializer.rawToSavedObject() method | ||
|
||
Converts a document from the format that is stored in elasticsearch to the saved object client format. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
rawToSavedObject(doc: RawDoc): SanitizedSavedObjectDoc; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| doc | <code>RawDoc</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`SanitizedSavedObjectDoc` | ||
|
24 changes: 24 additions & 0 deletions
24
...ent/core/server/kibana-plugin-server.savedobjectsserializer.savedobjecttoraw.md
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,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsSerializer](./kibana-plugin-server.savedobjectsserializer.md) > [savedObjectToRaw](./kibana-plugin-server.savedobjectsserializer.savedobjecttoraw.md) | ||
|
||
## SavedObjectsSerializer.savedObjectToRaw() method | ||
|
||
Converts a document from the saved object client format to the format that is stored in elasticsearch. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
savedObjectToRaw(savedObj: SanitizedSavedObjectDoc): RawDoc; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| savedObj | <code>SanitizedSavedObjectDoc</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`RawDoc` | ||
|
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
Oops, something went wrong.