Commit graph

220 commits

Author SHA1 Message Date
Thom Heymann
9220e4d20a
Add mock identity provider for serverless (2nd attempt) (#171513)
Attempting to merge #170852 again now that the release artefact step has
been fixed as part of https://github.com/elastic/kibana/pull/171457

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2023-11-23 01:08:44 -07:00
Brad White
d09e47abbc Revert "Add mock identity provider for serverless (#170852)"
This reverts commit 1fb0313a52.
2023-11-15 12:20:16 -07:00
Thom Heymann
1fb0313a52
Add mock identity provider for serverless (#170852)
Related to [#166340](https://github.com/elastic/kibana/issues/166340)

## Summary

Add mock identity provider and utils to test serverless user roles.

## Screenshot

### 1. Login selector

<img width="767" alt="Screenshot 2023-11-08 at 15 18 18"
src="82b4a29f-65b4-45d2-bed3-6d9f74043c48">

### 2. Single sign on screen

<img width="437" alt="Screenshot 2023-11-09 at 12 30 46"
src="3d5b6f26-5409-4169-a627-bcf6d09836d9">

### 3. User profile page

<img width="1041" alt="Screenshot 2023-11-08 at 17 36 22"
src="50bd4a5a-f9a8-4643-9384-9a352701b011">

## Testing

SAML is only supported by ES when running in SSL mode. 

1. To test the mock identity provider run a serverless project in SSL
mode using:

```bash
yarn es serverless --ssl
yarn start --serverless=es --ssl
```

2. Then access Kibana and login in using "Continue as Test User".

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2023-11-15 08:39:57 +00:00
Alex Szabo
227d7acae7
[Ops] Create SO migration snapshot comparion script (#168623)
## Summary
Continuation on: #167980 

Now that we have the snapshots created for merges, we can compare the
existing snapshots.
This PR creates a CLI for grabbing and comparing these snapshots.

The CLI looks like this: 
```
  node scripts/snapshot_plugin_types compare --from <rev|filename|url> --to <rev|filename|url> [--outputPath <outputPath>]

  Compares two Saved Object snapshot files based on hashes, filenames or urls.

  Options:
    --from            The source snapshot to compare from. Can be a revision, filename or url.
    --to              The target snapshot to compare to. Can be a revision, filename or url.
    --outputPath      The path to write the comparison report to. If omitted, raw JSON will be output to stdout.
    --verbose, -v      Log verbosely
```
2023-10-27 11:29:24 +02:00
Jon
b95fcf00e2
[ci] Add node scripts/yarn_deduplicate check (#169165)
- Adds an entrypoint, `node scripts/yarn_deduplicate` for fixing
duplicated packages via npm package `yarn-deduplicate`
- Fixes existing duplicated packages
- Adds a CI check verifying no duplicated packages have been added.  

There are currently two exclusions - all types packages which causes
other checks to break, and axe-core, which does not follow semver.

Closes https://github.com/elastic/kibana/issues/125712
2023-10-19 18:13:48 -05:00
Maryam Saeidi
6d88fb5f54
Add alerting_test_data package and a script to create rules for manual testing (#168493)
Closes https://github.com/elastic/actionable-observability/issues/140

## Summary

Add alerting_test_data package to create custom threshold and APM rules
for manual testing.

More information about the usage:
https://github.com/elastic/actionable-observability/pull/156

---------

Co-authored-by: almudenasanz <almudena.sanz@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-18 12:00:09 +02:00
Alex Szabo
ec0379848a
[Ops] Snapshot saved object migrations (#167983)
## Goal
We'd like to increase visibility to when Saved Object migrations and
schema changes are added to serverless releases.

## Plan
- add post-build step to export Saved Object schema snapshot, upload it
to google storage, by commit hash.
- build comparison logic, that when given 2 hashes (e.g.: #current ->
#to-be-released) it can highlight schema changes
- display the output from the comparison where it would make most sense,
ideas:
- prior to release, as a script that can be ran (or a browser-based
inspector)
- prior to release, as a buildkite step, that displays the output, and
waits for a confirmation on it
- during the quality-gating, as an output during the quality-gate run,
to be confirmed by the RM

## Summary
The PR intends to satisfy the first step of the plan, to add a
post-merge step to snapshot SO schema/migration states for later use.
 

Example run:
https://buildkite.com/elastic/kibana-pull-request/builds/165992#018b0583-c575-47f4-bade-7b45f6cf3f4d
The files are not public, they require google cloud access, but could be
accessed by scripts we create.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-10-11 09:47:15 +02:00
Dmitrii Shevchenko
38e6b76640
[Security Solution] Extract OpenAPI codegen to a package (#166269) 2023-09-25 10:51:40 +02:00
Thomas Watson
4c41247f93
Upgrade re2 from v1.17.7 to v1.20.1 (#162880) 2023-08-04 20:13:13 +02:00
Yulia Čech
0a7ee08362
[Console] Use ES specification for autocomplete definitions (#159241)
## Summary
Fixes https://github.com/elastic/kibana/issues/159410 

This PR adds a new package `kbn-generate-console-definitions` that will
eventually replace the package `kbn-spec-to-console`. It also adds a new
command to use the script in the new package. The new command can be
used as following:
- `node scripts/generate_console_definitions.js --source
<PATH_TO_ES_SPECIFICATION_REPO>` where `PATH_TO_ES_SPECIFICATION_FOLDER`
is the absolute path to the root of the [ES specification
repo](https://github.com/elastic/elasticsearch-specification), for
example `/Users/yulia/elastic/elasticsearch-specification`. This command
will generate autocomplete definitions in the folder
`KIBANA_ROOT/src/plugins/console/server/lib/json/generated`.
- Optionally `--dest` parameter can be passed to generate definitions in
a different folder, relative to `KIBANA_ROOT`.

Basic script functionality was implemented in this PR: 

- [x] Create the folder if doesn't exist yet
- [x] Remove all files in the folder before generating definitions
- [x] Load the specification schema and parse each endpoint 
- [x] Create a file for each endpoint with the endpoint name, methods,
patterns and doc urls.

Functionality that will be added in follow up PRs:

- Url paramaters
- Request body parameters
- Availability property
- Unit test for script functions

### How to test
1. Checkout ES specification repo
2. Run the command with `node scripts/generate_console_definitions.js
--source <ES_SPECIFICATION_REPO> --emptyDest` where
`<ES_SPECIFICATION_REPO>` is the absolute path to the root of the ES
specification repo
3. Check the changes to the generated files in the folder
`/KIBANA_REPO/src/plugins/console/server/lib/spec_definitions/json/generated`
and make sure they have a correct endpoint name, patterns, methods and
doc links. We are not generating any url params, request body params or
availability property for now.
4. Change the constant in the file
`KIBANA_REPO/src/plugins/console/common/constants/autocomplete_definitions.ts`
to a non-existent folder. Run the script `node
scripts/generate_console_definitions.js --source
<ES_SPECIFICATION_REPO>` and check that the folder has been created
successfully
5. Re-run the command without `--emptyDest` flag targeting a folder that
already contain some files. Check that the script fails and doesn't
silently remove existing files
6. Run the help command `node scripts/generate_console_definitions.js
--help` and check if the help message makes sense

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2023-06-23 12:05:25 -07:00
Dario Gieselaar
9b9d8cb347
Script to delete .kibana indices (#157491)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gil Raphaelli <graphaelli@gmail.com>
2023-05-16 14:28:01 +02:00
Tre
d1feb43722
[QA] Fixup flaky test (#156373)
## Summary

Resolves https://github.com/elastic/kibana/issues/136856

- Add async keyword where it should have been.
- Split archive into kbn and es archives...
instigated by Pierre's comment:
https://github.com/elastic/kibana/issues/136856#issuecomment-1253609280
   - Note: Had to use both archive types as 
one archive is "hidden", and cannot be accessed via the kbn client.
 - Unload via Pierre's "new" clean method.
- Add shell fn to print out server's currently loaded so's, with user
and pass hardcoded for local dev.
2023-05-08 11:32:53 +01:00
Jean-Louis Leysens
e9197ad359
[Saved Objects] Compatible mappings PR check (#148656)
## Summary

This PR adds a technical control to prevent incompatible mappings
changes. These include:

1. Removing mapped fields. For the foreseeable future we require that
teams only introduce new fields - in short: this avoids the "reindex"
step in our migrations.
2. Changing the type of a field. We leverage ES to determine whether a
given set of mappings can be applied "on top" of another. Similarly,
this avoids the "reindex" step in migrations.

The above checks depend on a snapshot of the mappings from `main`, these
are the "current" mappings and are extracted from plugin code. This PR
will bootstrap `main` with an initial set of mappings extracted from
plugins (bulk of new lines added).

## The new CLI

See the added `README.md` for details on how the CLI works.

## How will it work?

Any new PR that introduces compatible mappings changes will result in a
new snapshot being captured, then merged to main for other PRs to merge
and run the same checks against (currently committing new snapshots
happens in the CI check so there is no manual step of maintaining the
snapshot).

## Additional

We should consider combining this CI check with the existing check in
`src/core/server/integration_tests/saved_objects/migrations/check_registered_types.test.ts`.
Hopefully we can automate the check such that no manual review is needed
from Core, not sure how we might cover the hash of the non-mappings
related fields. We could consider narrowing the Jest test to exclude
mappings.

### Checklist

- [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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spencer@elastic.co>
2023-04-27 15:42:31 +02:00
Spencer
a1c55c6f13
[ci] build next docs in PRs when relevant files change (#149991)
After chatting with @KOTungseth, @scottybollinger, and @glitteringkatie
we've decided to add a CI step to the Kibana repo that will run when
changes to next-doc related code is made. This step will checkout the
repository containing configuration for the docs.elastic.dev website
(which is currently private, sorry) and then ensure that the build can
be completed with a local copy of all the repositories. It does this by
reading the `config/content.js` files and cloning all of the
repositories listed, then rewriting the content.js file with a map
telling the build system to read files from the local repos (which are
pre-cached by the packer cache job) and the local Kibana repo (which
represents the changes in the PR).

This script also runs locally by running `node
scripts/validate_next_docs`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-09 21:57:10 -07:00
Spencer
1b85815402
[packages] migrate all plugins to packages (#148130)
Fixes https://github.com/elastic/kibana/issues/149344

This PR migrates all plugins to packages automatically. It does this
using `node scripts/lint_packages` to automatically migrate
`kibana.json` files to `kibana.jsonc` files. By doing this automatically
we can simplify many build and testing procedures to only support
packages, and not both "packages" and "synthetic packages" (basically
pointers to plugins).

The majority of changes are in operations related code, so we'll be
having operations review this before marking it ready for review. The
vast majority of the code owners are simply pinged because we deleted
all `kibana.json` files and replaced them with `kibana.jsonc` files, so
we plan on leaving the PR ready-for-review for about 24 hours before
merging (after feature freeze), assuming we don't have any blockers
(especially from @elastic/kibana-core since there are a few core
specific changes, though the majority were handled in #149370).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-08 21:06:50 -06:00
Spencer
4e7560f19d
[ci-stats] move shipper to a package, validate limits in on-merge job (#149474)
We just had an issue where two PRs were merged and it caused the limit
of the `triggerActionsUi` bundle to be exceeded, breaking PR builds. The
issue is that we didn't see any indication of this in the on-merge jobs
because we don't produce the PR report for on-merge jobs or ask ci-stats
if we should fail the job. Instead, we just ship the metrics for
baseline purposes. This fixes that problem by adding a `--validate` flag
to `node scripts/ship_ci_stats`, which takes care of sending at least
some ci-stats and will verify that the bundle limits are not exceeded.

Since we didn't catch this issue in the on-merge job the limits were
incorrect for over an hour and merged into many PRs, wasting engineering
and CI time.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-25 08:20:40 -07:00
Tiago Costa
548da835a2
chore(NA): adds @kbn/whereis-pkg-cli to quickly find a pkg location (#148696)
This PR ads a new cli package to allow us to search for package
locations by providing their IDs. I see this as useful as we start
adding more and more packages across different locations.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-13 17:45:24 -07:00
Spencer
d6be4a4b06
Implement package linter (#148496)
This PR implements a linter like the TS Project linter, except for
packages in the repo. It does this by extracting the reusable bits from
the TS Project linter and reusing them for the project linter. The only
rule that exists for packages right now is that the "name" in the
package.json file matches the "id" in Kibana.jsonc. The goal is to use a
rule to migrate kibana.json files on the future.

Additionally, a new rule for validating the indentation of tsconfig.json
files was added.

Validating and fixing violations is what has triggered review by so many
teams, but we plan to treat those review requests as notifications of
the changes and not as blockers for merging.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-09 16:49:29 -07:00
Spencer
afb09ccf8a
Transpile packages on demand, validate all TS projects (#146212)
## Dearest Reviewers 👋 

I've been working on this branch with @mistic and @tylersmalley and
we're really confident in these changes. Additionally, this changes code
in nearly every package in the repo so we don't plan to wait for reviews
to get in before merging this. If you'd like to have a concern
addressed, please feel free to leave a review, but assuming that nobody
raises a blocker in the next 24 hours we plan to merge this EOD pacific
tomorrow, 12/22.

We'll be paying close attention to any issues this causes after merging
and work on getting those fixed ASAP. 🚀

---

The operations team is not confident that we'll have the time to achieve
what we originally set out to accomplish by moving to Bazel with the
time and resources we have available. We have also bought ourselves some
headroom with improvements to babel-register, optimizer caching, and
typescript project structure.

In order to make sure we deliver packages as quickly as possible (many
teams really want them), with a usable and familiar developer
experience, this PR removes Bazel for building packages in favor of
using the same JIT transpilation we use for plugins.

Additionally, packages now use `kbn_references` (again, just copying the
dx from plugins to packages).

Because of the complex relationships between packages/plugins and in
order to prepare ourselves for automatic dependency detection tools we
plan to use in the future, this PR also introduces a "TS Project Linter"
which will validate that every tsconfig.json file meets a few
requirements:

1. the chain of base config files extended by each config includes
`tsconfig.base.json` and not `tsconfig.json`
1. the `include` config is used, and not `files`
2. the `exclude` config includes `target/**/*`
3. the `outDir` compiler option is specified as `target/types`
1. none of these compiler options are specified: `declaration`,
`declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`,
`paths`

4. all references to other packages/plugins use their pkg id, ie:
	
	```js
    // valid
    {
      "kbn_references": ["@kbn/core"]
    }
    // not valid
    {
      "kbn_references": [{ "path": "../../../src/core/tsconfig.json" }]
    }
    ```

5. only packages/plugins which are imported somewhere in the ts code are
listed in `kbn_references`

This linter is not only validating all of the tsconfig.json files, but
it also will fix these config files to deal with just about any
violation that can be produced. Just run `node scripts/ts_project_linter
--fix` locally to apply these fixes, or let CI take care of
automatically fixing things and pushing the changes to your PR.

> **Example:** [`64e93e5`
(#146212)](64e93e5806)
When I merged main into my PR it included a change which removed the
`@kbn/core-injected-metadata-browser` package. After resolving the
conflicts I missed a few tsconfig files which included references to the
now removed package. The TS Project Linter identified that these
references were removed from the code and pushed a change to the PR to
remove them from the tsconfig.json files.

## No bazel? Does that mean no packages??
Nope! We're still doing packages but we're pretty sure now that we won't
be using Bazel to accomplish the 'distributed caching' and 'change-based
tasks' portions of the packages project.

This PR actually makes packages much easier to work with and will be
followed up with the bundling benefits described by the original
packages RFC. Then we'll work on documentation and advocacy for using
packages for any and all new code.

We're pretty confident that implementing distributed caching and
change-based tasks will be necessary in the future, but because of
recent improvements in the repo we think we can live without them for
**at least** a year.

## Wait, there are still BUILD.bazel files in the repo
Yes, there are still three webpack bundles which are built by Bazel: the
`@kbn/ui-shared-deps-npm` DLL, `@kbn/ui-shared-deps-src` externals, and
the `@kbn/monaco` workers. These three webpack bundles are still created
during bootstrap and remotely cached using bazel. The next phase of this
project is to figure out how to get the package bundling features
described in the RFC with the current optimizer, and we expect these
bundles to go away then. Until then any package that is used in those
three bundles still needs to have a BUILD.bazel file so that they can be
referenced by the remaining webpack builds.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-22 19:00:29 -06:00
Dzmitry Lemechko
9f7db8f615
[scalability testing] typescript runner (#147002)
## Summary

Closes #146546

This PR replaces bash script with node-based runner script.

Script can take relative path to directory with scalability journey
files or relative path to individual journey json file.

`node scripts/run_scalability.js --journey-config-path
scalability_traces/server`

`node scripts/run_scalability.js --journey-config-path
scalability_traces/server/api.core.capabilities.json`

### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2022-12-06 22:21:52 +01:00
Spencer
c38315f91c
[jest] parse CLI flags correctly (#146844)
Fixes https://github.com/elastic/kibana/issues/144051

Rather than just parsing process.argv with the default config of
getopts, which treats flags like `-u` into a "value collecting" flag,
this updates the way we call getopts so that all known jest CLI flags
are properly handled. This is accomplished by parsing the output of
`yarn jest --help` and then using that information to power `node
scripts/jest`.

To update the known CLI flags we just need to run `yarn jest --help |
node scripts/read_jest_help.mjs` (for some reason I don't understand,
Jest does not produce it's entire `--help` output when called from node,
only when called from a terminal).
2022-12-02 10:04:15 -07:00
Liza Katz
783ea146a7
Performance runner in js (#146129)
## Summary

Rewrite the performance journey runner using TypeScript, to avoid
dangling ES\node processes during test execution.

Results are stable with this runner, as verified on CI 


![image](https://user-images.githubusercontent.com/3016806/204506155-61c5807b-fad5-40bf-8284-a82693cd4c2a.png)

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-11-29 19:43:35 +02:00
Jonathan Budzenski
454ca83ff3
[kbn-pm] Add uid check (#145769)
This adds the uid check we use in the kibana entrypoint to kbn-pm. `yarn
kbn bootstrap` will exit if the uid is 0.
2022-11-18 15:35:06 -06:00
Tre
d4064c888a
[Archive Migrations] security_solution-timelines (#142363)
* [Archive Migrations] security_solution-timelines

Add new kbn archive with an index pattern
taken from the es archive.

Change the test to use both es and kbn archives.
Since all these objects are loaded into a space,
just delete the space afterwards instead of
unloading with es archiver.

Helps with: #102552

* Drop exclusive

* Drop unneeded fn.

* Lint in my pocket.

* Thanks to J. Buttner, "re-drop" non needed objects from the
original archive.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-04 10:06:25 +00:00
spalger
e5d186a6f0
[ts] stop building @types packages in bootstrap 2022-10-28 14:03:55 -05:00
Tre
3edba25c2d
[Archive Migration] x-pack-banners/multispace (#135783)
* [Archive Migration] x-pack-banners/multispace

I've the before() fn loading the new kbn archive
containing one config, for the default space.
Then, the fn creates a new space and changes the ui settings of this new space,
w/o using an archive.

* Move to enabled per:
https://github.com/elastic/kibana/pull/135783#issuecomment-1237228021

* Just run my stuff this go-round.

* Fixup.

* Drop new archive,
re-enable all tests,
skip the last test,
and add the filed bugs.

* Whoops

* Drop redundant test.

* Not sure what's what yet,
but I think perhaps an override is occuring.

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Change value in test and config.

* Drop double quotes,
seems to have caused parsing issue.

* One more try before asking in kibana-core

* try snake case

* back to space case but
without quotes in the config

* Just to see what happens I guess.

* Merge fixups.

* Change refs of "global_banner_text" to
 "global banner text"

* Stop the shell expansion

* Drop duplicate.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-27 12:03:01 +01:00
Spencer
50b3b57d9e
[ftr] add first-class support for playwrite journeys (#140680)
* [ftr] add first-class support for playwrite journeys

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* fix jest test

* remove ability to customize kibana server args, if we need it we can add it back

* remove dev dir that doesn't exist

* fix typo

* prevent duplicated array converstion logic by sharing flag reader

* remove destructuring of option

* fix scalability config and config_path import

* fix start_servers args and tests

* include simple readme

* fix jest tests and support build re-use when changes are just to jest tests

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-22 01:06:46 -07:00
Tre
e66bcf4a8e
[Archive Migration] xpack example pipelines (#140789)
Drop two fields from the orig archive.

Helps with: #102552
2022-09-19 21:10:12 +01:00
Tre
6add682702
[Archive Migrations] timelion-feature-controls (#140803)
Helps with: #102552

Drop archive as it's not used:
"$ find . -type f -exec grep -l "x-pack/test/functional/es_archives/timelion/feature_controls" {} \;"
2022-09-19 19:25:01 +01:00
spalger
98f671b1d1 remove scripts/kibana_jsonc_migration 2022-09-08 16:50:43 -05:00
Spencer
32491462a9
add kibana.jsonc files to existing packages (#138965)
* [packages] add kibana.jsonc files

* auto-migrate to kibana.jsonc

* support interactive pkg id selection too

* remove old codeowners entry

* skip codeowners generation when .github/CODEOWNERS doesn't exist

* fall back to format validation if user is offline

* update question style

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-08 13:31:57 -07:00
Søren Louv-Jansen
a05fab06ea
[APM] Fix synthtrace cli script (#140219) 2022-09-07 12:52:50 -07:00
Tre
114bc85ee2
[Archive Migrations] x-pack spaces-multi-space (#139552)
Replaces the old es archive with kbn archive.
Change test to use new archive.

Helps with: elastic#102552
2022-09-06 11:06:53 -05:00
John Dorlus
56cf191817
[Archive Migrations] Kbn archive migration security (#139388)
* Updated test to use uiSettings.

* Fixed merge conflict, made script executable, and added archives from migration.

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Added archives for testing.

* Removed exclusive suites.

* Debugging this dashboard test.

* Fixed broken tests.

* Removed exclusive suite.

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* Fixed script.

* Removed old archive.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-01 20:00:01 -04:00
Tre
677390d0a7
[Archive Migrations] dashboard/feature_controls/spaces (#139342)
* [Archive Migrations] dashboard/feature_controls/spaces

Replaces the old es archive with kbn archive.
Change test to use new archive.

Helps with: https://github.com/elastic/kibana/issues/102552

* Whoops, forgot to drop the archive.
2022-09-01 20:31:10 +01:00
Tiago Costa
1cbf83f73c
chore(NA): remove src folder requirement from packages (part 2) (#138476)
* refact(NA): apply root_input_dir=src to each already created pkg

* refact(NA): update package generator

* fix(NA): correctly use rootDir

* fix(NA): use root input dir on latest introduced pkgs for jsts_transpiler macro

* chore(NA): merge with main

* chore(NA): first attempt to complete removal of src folder on a small group of pkgs

* Revert "chore(NA): first attempt to complete removal of src folder on a small group of pkgs"

This reverts commit b6f34b7530.

* chore(NA): remove src folder requirement from xpack pkgs

* chore(NA): remove src folder from analytics pkgs

* chore(NA): remove src folder from home pkgs

* chore(NA): remove src folder from shared_ux pkgs

* fix(NA): remove missing src folder inputs on sharedux pkg

* chore(NA): remove src folder from kbn-a* pkgs

* chore(NA): remove src folder from kbn-b* pkgs

* chore(NA): remove src folder from kbn-c* pkgs

* chore(NA): correct exclude pattern for each changed pkg

* chore(NA): remove src folder from kbn-y* pkgs

* chore(NA): remove src folder from kbn-e* pkgs

* chore(NA): remove src folder from kbn-f* and kbn-g* pkgs

* chore(NA): remove src folder from kbn-f* and kbn-g* pkgs

* chore(NA): remove src folder from kbn-h** pkgs

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Revert "chore(NA): remove src folder from kbn-h** pkgs"

This reverts commit dcdf72bcc1.

* fix(NA): grammar location

* test(NA): fix tests for kbn/config-schema

* test(NA): fix tests for kbn/config-schema

* chore(NA): multiple errors fixed

* chore(NA): remove kuery grammar fix

* fix(NA): @kbn/ace imports

* fix(NA): grammar location

* fix(NA): add missing files to tsconfigs

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* chore(NA): complete tsconfigs

* Revert "chore(NA): complete tsconfigs"

This reverts commit f48c616864.

* chore(NA): remove src folder from kbn-core* pkgs

* chore(NA): remove src folder from kbn-u* pkgs

* chore(NA): remove src folder from kbn-ui-shared-deps* pkgs

* chore(NA): fix problems on core pkgs

* chore(NA): fix problems on core pkgs

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix(NA): shared_built_assets correct location'

* test(NA): update @kbn/optimizer integration snapshots

* chore(NA): remove src folder from kbn-t* p1 pkgs

* chore(NA): remove src folder from kbn-t* p2 pkgs

* chore(NA): update rootDir on utility types pkg

* chore(NA): include missing files on @kbn/test

* chore(NA): include missing files on @kbn/test

* fix(NA): new jest preset paths on @kbn/test

* chore(NA): fix eslint

* fix(NA): new jest preset paths on @kbn/test

* chore(NA): remove exclusion for mocks folde on @kbn/test

* fix(NA): several imports from target_node

* fix(NA): @kbn/test mocha and jest types clash

* chore(NA): remove src folder from kbn-storybook pkg

* chore(NA): remove src folder from kbn-stdio-dev-helpers pkg

* chore(NA): remove src folder from kbn-std pkg

* chore(NA): remove src folder from kbn-sort-pkg-json pkg

* chore(NA): remove src folder from kbn-some-dev-log and kbn-shared-ux-utility pkgs

* chore(NA): remove src folder from kbn-ux-storybook pkg

* chore(NA): remove src folder from kbn-shared-ux-services pkg

* chore(NA): remove src folder from kbn-shared-ux-components pkg

* chore(NA): remove src folder from kbn-shared-svg pkg

* chore(NA): remove src folder from kbn-server-http-tools pkg

* chore(NA): remove src folder from kbn-securitysolution-* pkgs

* chore(NA): remove src folder from kbn-r-* pkgs

* chore(NA): remove src folder from kbn-p* pkgs

* chore(NA): remove src folder from kbn-o* pkgs

* chore(NA): remove src folder from kbn-m* pkgs

* chore(NA): remove src folder from kbn-j,k,l* pkgs

* chore(NA): remove src folder from kbn-j,k,l* pkgs

* chore(NA): remove src folder from kbn-io-ts-utils* pkgs

* chore(NA): remove src folder from kbn-* pkgs except a few

* chore(NA): update @kbn/generate

* fix(NA): wrong exclusion on kbn-storybook

* chore(NA): remove src folder from kbn-monaco pkg

* chore(NA): remove src folder from kbn-interpreter pkg

* fix(NA): wrong exclusion on kbn-storybook

* chore(NA): update every require for target_*/src

* chore(NA): remover src folder from @kbn/handlebars

* fix(NA): license for @kbn/handlebars

* chore(NA): copy templates as part of the jsts_transpiler macro for @kbn/storybook

* chore(NA): update handlebars

* fix(NA): @kbn/plugin-generator import paths

* fix(NA): bundle sizes

* fix(NA): web bundle for @kbn/i18n-react

* Revert "fix(NA): bundle sizes"

This reverts commit 8aefe84fbc.

* Revert "Revert "fix(NA): bundle sizes""

This reverts commit e9d87d72a4.

* fix(NA): @kbn/docs-utils index.ts path expectation

* chore(NA): merge and solve conflicts with main

* fix(NA): relative import to index

* chore(NA): merge and solve conflicts with main

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* chore(NA): apply eslint fix

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-08-30 15:57:35 +01:00
Tre
7b5819c940
[Archive Migrations] x-pack dashboard/session_in_spaces (#136531)
* [Archive Migrations] x-pack dashboard/session_in_spaces

Replaces the old es archive with kbn archive.
Change test to use new archive.

Helps with: https://github.com/elastic/kibana/issues/102552

* fix deleting sessions

* improve

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2022-08-26 09:23:49 +01:00
Spencer
9003353729
rename @elastic/* packages to @kbn/* (#138957)
* rename @elastic/* packages to @kbn/*

* update yarn.lock

* [CI] Auto-commit changed files from 'node scripts/generate packages_build_manifest'

* update lint task

* review feedback

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-18 08:54:42 -07:00
Spencer
76f1b8d5d4
[IDM] define v2 Kibana manifest schema (#137611)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-04 20:19:46 -05:00
Dzmitry Lemechko
31ad4a3489
delete kbn-scalability-simulation-generator package (#137940) 2022-08-03 14:47:02 +02:00
Brian Seeders
a220f479da
[docs] Update yarn dev-docs config format (#137753) 2022-08-01 13:23:04 -07:00
Tre
9171417da3
[Archive Migrations] reporting-ecommerce_kibana_spaces - using an api in conjuction with migration (#136288)
* [Archive Migrations] x-pack-reporting-ecommerce_kibana_spaces

Replaces the old es archive with kbn archive.
Change test to use new archive.

Helps with: https://github.com/elastic/kibana/issues/102552

* Drop original archive.

* fixup

* Increase timeout.

* Decrease timeout.

* drop only

* Increase timeout after chatting with Lee about
how these tests run on cloud and often take
longer.

* Drop non_timezone_space and related code after chatting
with T Sullivan and Lee.

* Add timestamp stuff from Lee.

* Drop unused.

* CR fixups.

* Shouldn't need this.
2022-07-29 11:58:17 +01:00
Spencer
20f9cf9fd4
[eslint] add rule for validating cross-boundary imports (#137116) 2022-07-25 18:49:17 -05:00
Tre
7a54e0c675
[QA] Drop dead code (#136639)
* [QA][Code Coverage] Drop dead code

I'm hoping these jenkins related code coverage
scripts are no longer needed and can be removed.

* Dropping more after chatting with Spencer:
https://elastic.slack.com/archives/C5UDAFZQU/p1658234270426099
2022-07-20 16:18:25 +01:00
Spencer
4f817ad8a0
[kbn/pm] rewrite to avoid needing a build process (#136207)
* [kbn/pm] rewrite to avoid needing a build process

* uncomment timing reporting

* throw in a few missing comments

* Update README.md

* remove extra SomeDevLog interface from ci-stats-core

* remove non-stdio logging from bazel_runner, improve output formatting

* use private fields instead of just ts private props

* promote args to a positional arg

* optionally require the ci-stats-reporter after each command

* allow opt-ing out of vscode config management

* reduce to a single import

* add bit of docs regarding weird imports and package deps of kbn/pm

* clean extraDirs from Kibana's package.json file too

* tweak logging of run-in-packages to use --quiet and not just CI=true

* remove unlazy-loader

* add readme for @kbn/yarn-lock-validator

* convert @kbn/some-dev-logs docs to mdx

* remove missing navigation id and fix id in dev-cli-runner docs

* fix title of some-dev-logs docs page

* typo
2022-07-18 08:46:13 -07:00
Tre
5e4d3c4c93
[Archive Migrations] Bash functions to facilitate es to kbn archive migrations (#135929) 2022-07-13 10:31:32 +01:00
Spencer
a3b2757e4e
[type-summarizer] reimplement for broader support (#135163)
* [type-summarizer] reimplement for broader support

* Enable sourceMaps in all packages

* include naming collision in summarizePackage test

* fix readmes

* remove unnecessary transient dependency

* remove code that was commented out

* remove outdated todo comment

* ensure errors triggered by untyped-exports are ligible

* remove unused import

* break out snippet generation from AstIndexer

* refactor several massive files into smaller pieces and add more inline docs

* fix typos

* update jest snapshots

* add sections to readme that points people to the useful parts of the source code along with a high-level overview of how the type-summarizer works

* remove --dump flag, it doesn't work

* use decName instead of calling names.get a second time

* include `export` as invalid name
2022-07-06 13:48:45 -05:00
Baturalp Gurdin
e5d73a1169
ingest performance metrics to ci-stats (#134792) 2022-06-22 15:44:11 -07:00
Pierre Gayvallet
10a5f9ac83
Remove old doc generation system for core APIs (#134313)
* Remove old doc generation system for core APIs

* delete docs/development/core folder
2022-06-21 17:43:17 +02:00
Dzmitry Lemechko
6f5b23b221
[packages] add kbn-scalability-simulation-generator package (#132631)
* add kbn-scalability-simulation-generator package

* update codeowners

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-14 10:08:26 +02:00