Skip to content
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

[FTR] Collapse Alerting API Helpers Impl #192216

Merged
merged 18 commits into from
Sep 16, 2024

Conversation

wayneseymour
Copy link
Member

@wayneseymour wayneseymour commented Sep 5, 2024

Summary

Resolves: #192201

  • Expose TryWithRetriesOptions
    • Tune timeouts to pass ci
  • Add attempt count debug info to retry/retry_for_success.ts
    • Helps with tuning timeout params
  • Move exposure of AlertingApiProvider from x-pack/test_serverless/api_integration/services/index.ts -> x-pack/test_serverless/shared/services/deployment_agnostic_services.ts
    • This exposes the alerting api under Deployment Agnostic Services (DA), and DA is exposed within x-pack/test_serverless/functional/services/index.ts (Shared Services [Serverless])
  • Collapse helper script functions into just another object literal stanza within AlertingApiProvider
  • Update all references
  • Refactor alerting api to use retry service, instead of p-retry (following this pr)

Additional debug logging

Run in debug mode (add -v):

node scripts/functional_tests \
  --config x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts \
  --grep "Summary actions" 
  -v

After

       │ sill retry.tryWithRetries('Alerting API - waitForDocumentInIndex, retryOptions: {"retryCount":5,"retryDelay":200}', [object AsyncFunction], [object Object])
         │ debg --- retry.tryWithRetries error: index_not_found_exception
         │      	Root causes:
         │      		index_not_found_exception: no such index [alert-action-es-query] - Attempt #: 1
         │ sill es.search([object Object])
         │ debg --- retry.tryWithRetries failed again with the same message... - Attempt #: 2
         │ sill es.search([object Object])
         │ debg --- retry.tryWithRetries failed again with the same message... - Attempt #: 3
         │ sill es.search([object Object])
         │ debg --- retry.tryWithRetries failed again with the same message... - Attempt #: 4
         │ sill es.search([object Object])
         │ debg --- retry.tryWithRetries failed again with the same message... - Attempt #: 5
         
...
// Msg after all attempts fail:

       │   Error: retry.tryWithRetries reached the limit of attempts waiting for 'Alerting API - waitForDocumentInIndex, retryOptions: {"retryCount":5,"retryDelay":200}': 5 out of 5
       │   ResponseError: index_not_found_exception
       │   	Root causes:
       │   		index_not_found_exception: no such index [alert-action-es-query]
       │       at SniffingTransport._request (node_modules/@elastic/transport/src/Transport.ts:601:17)
       │       at processTicksAndRejections (node:internal/process/task_queues:95:5)
       │       at /Users/trezworkbox/dev/main.worktrees/cleanup-alerting-api/node_modules/@elastic/transport/src/Transport.ts:704:22
       │       at SniffingTransport.request (node_modules/@elastic/transport/src/Transport.ts:701:14)
       │       at Proxy.SearchApi (node_modules/@elastic/elasticsearch/src/api/api/search.ts:96:10)
       │       at alerting_api.ts:123:28
       │       at runAttempt (retry_for_success.ts:30:15)
       │       at retryForSuccess (retry_for_success.ts:99:21)
       │       at Proxy.tryWithRetries (retry.ts:113:12)
       │       at Object.waitForDocumentInIndex (alerting_api.ts:120:14)
       │       at Context.<anonymous> (summary_actions.ts:146:20)
       │       at Object.apply (wrap_function.js:74:16)
       │       at Object.apply (wrap_function.js:74:16)
       │       at onFailure (retry_for_success.ts:18:9)
       │       at retryForSuccess (retry_for_success.ts:75:7)
       │       at Proxy.tryWithRetries (retry.ts:113:12)
       │       at Object.waitForDocumentInIndex (alerting_api.ts:120:14)
       │       at Context.<anonymous> (summary_actions.ts:146:20)
       │       at Object.apply (wrap_function.js:74:16)
       │       at Object.apply (wrap_function.js:74:16)

Notes

Was put back in draft to additional scope detailed in issue linked above.

@wayneseymour wayneseymour added Team:QA Team label for QA Team release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Sep 5, 2024
@wayneseymour wayneseymour self-assigned this Sep 5, 2024
@wayneseymour
Copy link
Member Author

/ci

2 similar comments
@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

@wayneseymour
Copy link
Member Author

/ci

@wayneseymour wayneseymour marked this pull request as ready for review September 9, 2024 15:04
@wayneseymour wayneseymour requested review from a team as code owners September 9, 2024 15:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-qa (Team:QA)

@@ -17,6 +16,7 @@ import { SvlCasesServiceProvider } from '../../api_integration/services/svl_case
import { MachineLearningProvider } from './ml';
import { LogsSynthtraceProvider } from './log';
import { UISettingsServiceProvider } from './ui_settings';
import { services as SvlApiIntegrationSvcs } from '../../api_integration/services';
Copy link
Member

@dmlemeshko dmlemeshko Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it is shared by api integration and functional tests, lets move straight to x-pack/test_serverless//shared/services?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left suggestion about moving it to shared services

@wayneseymour wayneseymour changed the title [FTR] Collapse Alerting API Helpers [FTR] Collapse Alerting API Helpers Impl Sep 11, 2024
@wayneseymour wayneseymour marked this pull request as draft September 11, 2024 10:50
@wayneseymour wayneseymour merged commit 9d22e8c into elastic:main Sep 16, 2024
20 checks passed
jbudz added a commit to jbudz/kibana that referenced this pull request Sep 16, 2024
wayneseymour added a commit that referenced this pull request Sep 30, 2024
…x-pack/test/api_integration/deployment_agnostic` (#193975)

## Summary

Follow up of [this pr](#192216),
per [this
discussion](#192216 (comment)).

Also, switch from `svlCommonApi` to `samlAuth` for internal headers.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
@wayneseymour wayneseymour added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Oct 25, 2024
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Oct 25, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11516349219

@wayneseymour wayneseymour added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting labels Oct 25, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11516354456

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11516354504

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 25, 2024
## Summary
Resolves: elastic#192201

- Expose `TryWithRetriesOptions`
  - Tune timeouts to pass ci
- Add attempt count debug info to `retry/retry_for_success.ts`
  - Helps with tuning timeout params
- Move exposure of `AlertingApiProvider` from
`x-pack/test_serverless/api_integration/services/index.ts` ->
`x-pack/test_serverless/shared/services/deployment_agnostic_services.ts`
- This exposes the alerting api under Deployment Agnostic Services (DA),
and DA is exposed within
`x-pack/test_serverless/functional/services/index.ts` (Shared Services
[Serverless])
- Collapse helper script functions into just another object literal
stanza within `AlertingApiProvider`
- Update all references
- Refactor alerting api to use `retry` service, instead of p-retry
(following [this pr](elastic#178660))

### Additional debug logging

Run in debug mode (add `-v`):
```
node scripts/functional_tests \
  --config x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts \
  --grep "Summary actions"
  -v
```

#### After
```
       │ sill retry.tryWithRetries('Alerting API - waitForDocumentInIndex, retryOptions: {"retryCount":5,"retryDelay":200}', [object AsyncFunction], [object Object])
         │ debg --- retry.tryWithRetries error: index_not_found_exception
         │      	Root causes:
         │      		index_not_found_exception: no such index [alert-action-es-query] - Attempt #: 1
         │ sill es.search([object Object])
         │ debg --- retry.tryWithRetries failed again with the same message... - Attempt #: 2
         │ sill es.search([object Object])
         │ debg --- retry.tryWithRetries failed again with the same message... - Attempt #: 3
         │ sill es.search([object Object])
         │ debg --- retry.tryWithRetries failed again with the same message... - Attempt #: 4
         │ sill es.search([object Object])
         │ debg --- retry.tryWithRetries failed again with the same message... - Attempt #: 5

...
// Msg after all attempts fail:

       │   Error: retry.tryWithRetries reached the limit of attempts waiting for 'Alerting API - waitForDocumentInIndex, retryOptions: {"retryCount":5,"retryDelay":200}': 5 out of 5
       │   ResponseError: index_not_found_exception
       │   	Root causes:
       │   		index_not_found_exception: no such index [alert-action-es-query]
       │       at SniffingTransport._request (node_modules/@elastic/transport/src/Transport.ts:601:17)
       │       at processTicksAndRejections (node:internal/process/task_queues:95:5)
       │       at /Users/trezworkbox/dev/main.worktrees/cleanup-alerting-api/node_modules/@elastic/transport/src/Transport.ts:704:22
       │       at SniffingTransport.request (node_modules/@elastic/transport/src/Transport.ts:701:14)
       │       at Proxy.SearchApi (node_modules/@elastic/elasticsearch/src/api/api/search.ts:96:10)
       │       at alerting_api.ts:123:28
       │       at runAttempt (retry_for_success.ts:30:15)
       │       at retryForSuccess (retry_for_success.ts:99:21)
       │       at Proxy.tryWithRetries (retry.ts:113:12)
       │       at Object.waitForDocumentInIndex (alerting_api.ts:120:14)
       │       at Context.<anonymous> (summary_actions.ts:146:20)
       │       at Object.apply (wrap_function.js:74:16)
       │       at Object.apply (wrap_function.js:74:16)
       │       at onFailure (retry_for_success.ts:18:9)
       │       at retryForSuccess (retry_for_success.ts:75:7)
       │       at Proxy.tryWithRetries (retry.ts:113:12)
       │       at Object.waitForDocumentInIndex (alerting_api.ts:120:14)
       │       at Context.<anonymous> (summary_actions.ts:146:20)
       │       at Object.apply (wrap_function.js:74:16)
       │       at Object.apply (wrap_function.js:74:16)
```
### Notes
Was put back in draft to additional scope detailed in issue linked
above.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 9d22e8c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 25, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[FTR] Collapse Alerting API Helpers Impl
(#192216)](#192216)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Tre","email":"wayne.seymour@elastic.co"},"sourceCommit":{"committedDate":"2024-09-16T14:42:06Z","message":"[FTR]
Collapse Alerting API Helpers Impl (#192216)\n\n## Summary\r\nResolves:
https://github.com/elastic/kibana/issues/192201\r\n\r\n- Expose
`TryWithRetriesOptions`\r\n - Tune timeouts to pass ci \r\n- Add attempt
count debug info to `retry/retry_for_success.ts`\r\n - Helps with tuning
timeout params\r\n- Move exposure of `AlertingApiProvider`
from\r\n`x-pack/test_serverless/api_integration/services/index.ts`
->\r\n`x-pack/test_serverless/shared/services/deployment_agnostic_services.ts`\r\n-
This exposes the alerting api under Deployment Agnostic Services
(DA),\r\nand DA is exposed
within\r\n`x-pack/test_serverless/functional/services/index.ts` (Shared
Services\r\n[Serverless])\r\n- Collapse helper script functions into
just another object literal\r\nstanza within `AlertingApiProvider`\r\n-
Update all references\r\n- Refactor alerting api to use `retry` service,
instead of p-retry\r\n(following [this
pr](https://github.com/elastic/kibana/pull/178660))\r\n\r\n###
Additional debug logging \r\n\r\nRun in debug mode (add
`-v`):\r\n```\r\nnode scripts/functional_tests \\\r\n --config
x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts
\\\r\n --grep \"Summary actions\" \r\n -v\r\n```\r\n\r\n####
After\r\n```\r\n │ sill retry.tryWithRetries('Alerting API -
waitForDocumentInIndex, retryOptions:
{\"retryCount\":5,\"retryDelay\":200}', [object AsyncFunction], [object
Object])\r\n │ debg --- retry.tryWithRetries error:
index_not_found_exception\r\n │ \tRoot causes:\r\n │
\t\tindex_not_found_exception: no such index [alert-action-es-query] -
Attempt #: 1\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
2\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
3\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
4\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
5\r\n \r\n...\r\n// Msg after all attempts fail:\r\n\r\n │ Error:
retry.tryWithRetries reached the limit of attempts waiting for 'Alerting
API - waitForDocumentInIndex, retryOptions:
{\"retryCount\":5,\"retryDelay\":200}': 5 out of 5\r\n │ ResponseError:
index_not_found_exception\r\n │ \tRoot causes:\r\n │
\t\tindex_not_found_exception: no such index [alert-action-es-query]\r\n
│ at SniffingTransport._request
(node_modules/@elastic/transport/src/Transport.ts:601:17)\r\n │ at
processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n │
at
/Users/trezworkbox/dev/main.worktrees/cleanup-alerting-api/node_modules/@elastic/transport/src/Transport.ts:704:22\r\n
│ at SniffingTransport.request
(node_modules/@elastic/transport/src/Transport.ts:701:14)\r\n │ at
Proxy.SearchApi
(node_modules/@elastic/elasticsearch/src/api/api/search.ts:96:10)\r\n │
at alerting_api.ts:123:28\r\n │ at runAttempt
(retry_for_success.ts:30:15)\r\n │ at retryForSuccess
(retry_for_success.ts:99:21)\r\n │ at Proxy.tryWithRetries
(retry.ts:113:12)\r\n │ at Object.waitForDocumentInIndex
(alerting_api.ts:120:14)\r\n │ at Context.<anonymous>
(summary_actions.ts:146:20)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at onFailure
(retry_for_success.ts:18:9)\r\n │ at retryForSuccess
(retry_for_success.ts:75:7)\r\n │ at Proxy.tryWithRetries
(retry.ts:113:12)\r\n │ at Object.waitForDocumentInIndex
(alerting_api.ts:120:14)\r\n │ at Context.<anonymous>
(summary_actions.ts:146:20)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n```\r\n### Notes\r\nWas put back in draft to
additional scope detailed in issue
linked\r\nabove.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"9d22e8c6a8d92449055fd99b67b745d1995b5107","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:QA","release_note:skip","v9.0.0","backport:prev-minor"],"title":"[FTR]
Collapse Alerting API Helpers
Impl","number":192216,"url":"https://github.com/elastic/kibana/pull/192216","mergeCommit":{"message":"[FTR]
Collapse Alerting API Helpers Impl (#192216)\n\n## Summary\r\nResolves:
https://github.com/elastic/kibana/issues/192201\r\n\r\n- Expose
`TryWithRetriesOptions`\r\n - Tune timeouts to pass ci \r\n- Add attempt
count debug info to `retry/retry_for_success.ts`\r\n - Helps with tuning
timeout params\r\n- Move exposure of `AlertingApiProvider`
from\r\n`x-pack/test_serverless/api_integration/services/index.ts`
->\r\n`x-pack/test_serverless/shared/services/deployment_agnostic_services.ts`\r\n-
This exposes the alerting api under Deployment Agnostic Services
(DA),\r\nand DA is exposed
within\r\n`x-pack/test_serverless/functional/services/index.ts` (Shared
Services\r\n[Serverless])\r\n- Collapse helper script functions into
just another object literal\r\nstanza within `AlertingApiProvider`\r\n-
Update all references\r\n- Refactor alerting api to use `retry` service,
instead of p-retry\r\n(following [this
pr](https://github.com/elastic/kibana/pull/178660))\r\n\r\n###
Additional debug logging \r\n\r\nRun in debug mode (add
`-v`):\r\n```\r\nnode scripts/functional_tests \\\r\n --config
x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts
\\\r\n --grep \"Summary actions\" \r\n -v\r\n```\r\n\r\n####
After\r\n```\r\n │ sill retry.tryWithRetries('Alerting API -
waitForDocumentInIndex, retryOptions:
{\"retryCount\":5,\"retryDelay\":200}', [object AsyncFunction], [object
Object])\r\n │ debg --- retry.tryWithRetries error:
index_not_found_exception\r\n │ \tRoot causes:\r\n │
\t\tindex_not_found_exception: no such index [alert-action-es-query] -
Attempt #: 1\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
2\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
3\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
4\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
5\r\n \r\n...\r\n// Msg after all attempts fail:\r\n\r\n │ Error:
retry.tryWithRetries reached the limit of attempts waiting for 'Alerting
API - waitForDocumentInIndex, retryOptions:
{\"retryCount\":5,\"retryDelay\":200}': 5 out of 5\r\n │ ResponseError:
index_not_found_exception\r\n │ \tRoot causes:\r\n │
\t\tindex_not_found_exception: no such index [alert-action-es-query]\r\n
│ at SniffingTransport._request
(node_modules/@elastic/transport/src/Transport.ts:601:17)\r\n │ at
processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n │
at
/Users/trezworkbox/dev/main.worktrees/cleanup-alerting-api/node_modules/@elastic/transport/src/Transport.ts:704:22\r\n
│ at SniffingTransport.request
(node_modules/@elastic/transport/src/Transport.ts:701:14)\r\n │ at
Proxy.SearchApi
(node_modules/@elastic/elasticsearch/src/api/api/search.ts:96:10)\r\n │
at alerting_api.ts:123:28\r\n │ at runAttempt
(retry_for_success.ts:30:15)\r\n │ at retryForSuccess
(retry_for_success.ts:99:21)\r\n │ at Proxy.tryWithRetries
(retry.ts:113:12)\r\n │ at Object.waitForDocumentInIndex
(alerting_api.ts:120:14)\r\n │ at Context.<anonymous>
(summary_actions.ts:146:20)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at onFailure
(retry_for_success.ts:18:9)\r\n │ at retryForSuccess
(retry_for_success.ts:75:7)\r\n │ at Proxy.tryWithRetries
(retry.ts:113:12)\r\n │ at Object.waitForDocumentInIndex
(alerting_api.ts:120:14)\r\n │ at Context.<anonymous>
(summary_actions.ts:146:20)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n```\r\n### Notes\r\nWas put back in draft to
additional scope detailed in issue
linked\r\nabove.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"9d22e8c6a8d92449055fd99b67b745d1995b5107"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192216","number":192216,"mergeCommit":{"message":"[FTR]
Collapse Alerting API Helpers Impl (#192216)\n\n## Summary\r\nResolves:
https://github.com/elastic/kibana/issues/192201\r\n\r\n- Expose
`TryWithRetriesOptions`\r\n - Tune timeouts to pass ci \r\n- Add attempt
count debug info to `retry/retry_for_success.ts`\r\n - Helps with tuning
timeout params\r\n- Move exposure of `AlertingApiProvider`
from\r\n`x-pack/test_serverless/api_integration/services/index.ts`
->\r\n`x-pack/test_serverless/shared/services/deployment_agnostic_services.ts`\r\n-
This exposes the alerting api under Deployment Agnostic Services
(DA),\r\nand DA is exposed
within\r\n`x-pack/test_serverless/functional/services/index.ts` (Shared
Services\r\n[Serverless])\r\n- Collapse helper script functions into
just another object literal\r\nstanza within `AlertingApiProvider`\r\n-
Update all references\r\n- Refactor alerting api to use `retry` service,
instead of p-retry\r\n(following [this
pr](https://github.com/elastic/kibana/pull/178660))\r\n\r\n###
Additional debug logging \r\n\r\nRun in debug mode (add
`-v`):\r\n```\r\nnode scripts/functional_tests \\\r\n --config
x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts
\\\r\n --grep \"Summary actions\" \r\n -v\r\n```\r\n\r\n####
After\r\n```\r\n │ sill retry.tryWithRetries('Alerting API -
waitForDocumentInIndex, retryOptions:
{\"retryCount\":5,\"retryDelay\":200}', [object AsyncFunction], [object
Object])\r\n │ debg --- retry.tryWithRetries error:
index_not_found_exception\r\n │ \tRoot causes:\r\n │
\t\tindex_not_found_exception: no such index [alert-action-es-query] -
Attempt #: 1\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
2\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
3\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
4\r\n │ sill es.search([object Object])\r\n │ debg ---
retry.tryWithRetries failed again with the same message... - Attempt #:
5\r\n \r\n...\r\n// Msg after all attempts fail:\r\n\r\n │ Error:
retry.tryWithRetries reached the limit of attempts waiting for 'Alerting
API - waitForDocumentInIndex, retryOptions:
{\"retryCount\":5,\"retryDelay\":200}': 5 out of 5\r\n │ ResponseError:
index_not_found_exception\r\n │ \tRoot causes:\r\n │
\t\tindex_not_found_exception: no such index [alert-action-es-query]\r\n
│ at SniffingTransport._request
(node_modules/@elastic/transport/src/Transport.ts:601:17)\r\n │ at
processTicksAndRejections (node:internal/process/task_queues:95:5)\r\n │
at
/Users/trezworkbox/dev/main.worktrees/cleanup-alerting-api/node_modules/@elastic/transport/src/Transport.ts:704:22\r\n
│ at SniffingTransport.request
(node_modules/@elastic/transport/src/Transport.ts:701:14)\r\n │ at
Proxy.SearchApi
(node_modules/@elastic/elasticsearch/src/api/api/search.ts:96:10)\r\n │
at alerting_api.ts:123:28\r\n │ at runAttempt
(retry_for_success.ts:30:15)\r\n │ at retryForSuccess
(retry_for_success.ts:99:21)\r\n │ at Proxy.tryWithRetries
(retry.ts:113:12)\r\n │ at Object.waitForDocumentInIndex
(alerting_api.ts:120:14)\r\n │ at Context.<anonymous>
(summary_actions.ts:146:20)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at onFailure
(retry_for_success.ts:18:9)\r\n │ at retryForSuccess
(retry_for_success.ts:75:7)\r\n │ at Proxy.tryWithRetries
(retry.ts:113:12)\r\n │ at Object.waitForDocumentInIndex
(alerting_api.ts:120:14)\r\n │ at Context.<anonymous>
(summary_actions.ts:146:20)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n │ at Object.apply
(wrap_function.js:74:16)\r\n```\r\n### Notes\r\nWas put back in draft to
additional scope detailed in issue
linked\r\nabove.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"9d22e8c6a8d92449055fd99b67b745d1995b5107"}}]}]
BACKPORT-->

Co-authored-by: Tre <wayne.seymour@elastic.co>
wayneseymour added a commit to wayneseymour/kibana that referenced this pull request Oct 25, 2024
…x-pack/test/api_integration/deployment_agnostic` (elastic#193975)

## Summary

Follow up of [this pr](elastic#192216),
per [this
discussion](elastic#192216 (comment)).

Also, switch from `svlCommonApi` to `samlAuth` for internal headers.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
(cherry picked from commit 10c3373)

# Conflicts:
#	x-pack/test_serverless/shared/services/alerting_api.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:QA Team label for QA Team v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FTR] Collapse Alerting API Helpers
10 participants