This PR:
- Renames `CommentResponseRt` to `CommentRt`
- Create `CommentUI` for the UI based on the snake to camel case version
of `Comment`
- Introduces a `AttachmentTransformedAttributes` type that should be
used when returning `CommentAttributes` from the service layer
## Summary
This fixes an issue where we were incorrectly telling the user they
didn't have access to Enterprise Search, because we weren't passing the
correct product access settings to the Overview component.
## Summary
Runtime for `fleet_api_integration/config` crossed the 38 min limit.
Ideally config runtime should be <10 min so that pipeline can quickly
retry failed configs (we do 1 retry on CI)
<img width="1600" alt="image"
src="https://user-images.githubusercontent.com/10977896/235707744-3120e1e9-4882-493f-9ee0-86016a765401.png">
This PR splits the existing config into few smaller ones:
```
x-pack/test/fleet_api_integration/config.agent.ts 15m 15s
x-pack/test/fleet_api_integration/config.agent_policy.ts 4m 10s
x-pack/test/fleet_api_integration/config.epm.ts 8m 12s
x-pack/test/fleet_api_integration/config.package_policy.ts 10m 54s
// combines multiple test files
x-pack/test/fleet_api_integration/config.fleet.ts 5m 2s
```
## Summary
This PR fixes a bug introduced in
https://github.com/elastic/kibana/pull/155065/ that I noticed when
testing guided onboarding for v8.9.0: the help link was missing from the
help menu. I added a functional test for the help link but we also need
a test that the link is hidden when the user doesn't have access to
guided onboarding (opened an issue for that
[here](https://github.com/elastic/kibana/issues/156410)).
### How to test
1. Add xpack.cloud.id: 'testID' to /config/kibana.dev.yml
2. Start ES with yarn es snapshot and Kibana with `yarn start``
3. Check that the help link "Setup guides" is displayed in the help menu
### Screenshot
<img width="336" alt="Screenshot 2023-05-02 at 17 27 20"
src="https://user-images.githubusercontent.com/6585477/235712599-812b422d-3092-45b3-a726-37f6b90e81c1.png">
## Summary
Resolves https://github.com/elastic/kibana/issues/156223
In previous stack versions, the label was not saved to the saved object.
This ensures that alerting works both for those early versions as well
current versions, by adjusting the logic to consider both the
location.label and location.id in alerting logic.
### Testing
1. Create a new oblt-cli cluster and connect to the synthetics service,
locally or via the dev environment
2. Checkout v8.5.3
3. Create a monitor. Make sure it's down and wait for the first down
check
4. Check out this branch
5. Navigate to Observabillity alerts. Ensure that an alert is generated
for the monitor. You may have to wait a few minutes.
---------
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
Fixes https://github.com/elastic/kibana/issues/151938
In this PR, I'm re-writing the Task Manager poller so it doesn't run
concurrently when timeouts occur while also fixing the issue where
polling requests would pile up when polling takes time. To support this,
I've also made the following changes:
- Removed the observable monitor and the
`xpack.task_manager.max_poll_inactivity_cycles` setting
- Make the task store `search` and `updateByQuery` functions have no
retries. This prevents the request from retrying 5x whenever a timeout
occurs, causing each call taking up to 2 1/2 minutes before Kibana sees
the error (now down to 30s each). We have polling to manage retries in
these situations.
- Switch the task poller tests to use `sinon` for faking timers
- Removing the `assertStillInSetup` checks on plugin setup. Felt like a
maintenance burden that wasn't necessary to fix with my code changes.
The main code changes are within these files (to review thoroughly so
the polling cycle doesn't suddenly stop):
- x-pack/plugins/task_manager/server/polling/task_poller.ts
- x-pack/plugins/task_manager/server/polling_lifecycle.ts (easier to
review if you disregard whitespace `?w=1`)
## To verify
1. Tasks run normally (create a rule or something that goes through task
manager regularly).
2. When the update by query takes a while, the request is cancelled
after 30s or the time manually configured.
4. When the search for claimed tasks query takes a while, the request is
cancelled after 30s or the time manually configured.
**Tips:**
<details><summary>how to slowdown search for claimed task
queries</summary>
```
diff --git a/x-pack/plugins/task_manager/server/queries/task_claiming.ts b/x-pack/plugins/task_manager/server/queries/task_claiming.ts
index 07042650a37..2caefd63672 100644
--- a/x-pack/plugins/task_manager/server/queries/task_claiming.ts
+++ b/x-pack/plugins/task_manager/server/queries/task_claiming.ts
@@ -247,7 +247,7 @@ export class TaskClaiming {
taskTypes,
});
- const docs = tasksUpdated > 0 ? await this.sweepForClaimedTasks(taskTypes, size) : [];
+ const docs = await this.sweepForClaimedTasks(taskTypes, size);
this.emitEvents(docs.map((doc) => asTaskClaimEvent(doc.id, asOk(doc))));
@@ -346,6 +346,13 @@ export class TaskClaiming {
size,
sort: SortByRunAtAndRetryAt,
seq_no_primary_term: true,
+ aggs: {
+ delay: {
+ shard_delay: {
+ value: '40s',
+ },
+ },
+ },
});
return docs;
```
</details>
<details><summary>how to slow down update by queries</summary>
Not the cleanest way but you'll see occasional request timeouts from the
updateByQuery calls. I had more luck creating rules running every 1s.
```
diff --git a/x-pack/plugins/task_manager/server/task_store.ts b/x-pack/plugins/task_manager/server/task_store.ts
index a06ee7b918a..07aa81e5388 100644
--- a/x-pack/plugins/task_manager/server/task_store.ts
+++ b/x-pack/plugins/task_manager/server/task_store.ts
@@ -126,6 +126,7 @@ export class TaskStore {
// Timeouts are retried and make requests timeout after (requestTimeout * (1 + maxRetries))
// The poller doesn't need retry logic because it will try again at the next polling cycle
maxRetries: 0,
+ requestTimeout: 900,
});
}
@@ -458,6 +459,7 @@ export class TaskStore {
ignore_unavailable: true,
refresh: true,
conflicts: 'proceed',
+ requests_per_second: 1,
body: {
...opts,
max_docs,
```
</details>
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Removes remaining properties that are not searched on from the mapping
for the visualizations saved object and adds a schema definition to it.
part of https://github.com/elastic/kibana/pull/153070
Fixes https://github.com/elastic/security-team/issues/6228
5000 `z-index` set in `create-case-flyout-mask-overlay` is being
overwritten by `euiOverlayMask-belowHeader` with a value of 1000. This
causes **Case flyout** to be under the already opened **Osquery flyout**
This PR includes cleanup in flyouts renders - we removed unnecessary
`maskProps` as well as z-indexes that were explicitly set even though
flyout component manages them itself.

---------
Co-authored-by: Tomasz Ciecierski <ciecierskitomek@gmail.com>
Co-authored-by: Tomasz Ciecierski <tomasz.ciecierski@elastic.co>
Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Fixes the React dev mode warning "Warning: Can't perform a React state
update on an unmounted component." by only rendering `EuiDataGrid` if
there's more than 0 rows.
Fixes issues raised in
https://github.com/elastic/kibana/pull/155375#discussion_r1176594934
Kibana trained model endpoints for `_stop`, `_update` and `infer` now
require the model ID was well as the deployment ID to be passed to them.
Also fixes the stop trained model api when stopping more than one model.
It's very likely the elasticsearch `_stop` api will not support a comma
separated list of deployment IDs for this release, and so this change
calls `_stop` in a loop for each deployment. It also allows for better
reporting if any of the deployments fail to stop.
Fixes the React dev mode warning "Warning: Each child in a list should
have a unique "key" prop." by adding a key attribute to the
`DeleteFilterListModal` component.
This PR re-enables the export job tests and the reporting download tests
after the underlying issues has been fixed by switching to the new
headless browser mode.
## Summary
Splitting ftr configs to speed up ftr tests run on CI
```
The following "Functional Tests" configs have durations that exceed the maximum amount of time desired for a single CI job.
This is not an error, and if you don't own any of these configs then you can ignore this warning.If you own any of these
configs please split them up ASAP and ask Operations if you have questions about how to do that.
x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts: 38.2 minutes
x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts: 38.2 minutes
```
After split:
x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts
20m 29s
x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts
20m 52s
x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts
19m 57s
x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts
21m 5s
Rebalancing it with other configs should speedup CI by at least few
minutes
Creates Package `@kbn/ml-anomaly-utils`.
- This moves some of the utility functions, constants and types related
to Anomaly Detection we previously exposed from the `ml` plugin itself
to a package `@kbn/ml-anomaly-utils`, resulting in ~5.9KB reduction of
the plugin's page load bundle size.
- To reduce increases in async bundle size for consuming plugins the
utils have been refactored into individual files to allow deep imports
and get some optimization through that. Some previously duplicated code
in consuming plugins has been deleted and replaced with deep imports of
the corresponding original code in the package.
- Types have been prefixed with `Ml`.
- Constants have been prefixed with `ML_`.
Created package via `node scripts/generate package @kbn/ml-anomaly-utils
--web --dir ./x-pack/packages/ml/anomaly_utils`.
## Summary
issue: https://github.com/elastic/kibana/issues/155859
Steps to reproduce: Please find the issue above.
`Reset group by field` action should:
1. Revert `Group by` and `Group by top` to default fields
`kibana.alert.rule.name` and `host.name`
2. Unhide all the columns in the table.
### Checklist
Delete any items that are not applicable to this PR.
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios