* Generate core API docs from TSDoc comments
Uses api-extractor and api-documenter to generate documentation for
the Kibana core API from TSDoc comments in the source code.
Documentation can be generated using `npm run docs:api`.
I used --no-verify to ignore the following pre-commit hook errors:
1. Filenames MUST use snake_case - api-extractor.json
It's possible to specify a different config file, but I prefer to keep the "standard" config file name.
2. UNHANDLED ERROR: Unable to find tsconfig.json file selecting "common/core_api_review/kibana.api.ts". Ensure one exists and it is listed in "src/dev/typescript/projects.ts"
This is not a source file, so safe to ignore.
* Flesh out API docs a little bit
* Ignore snake_case check for api-extractor.json
* Ignore api-extractor's review file from pre-commit check
* Try to fix build failing by using masters yarn.lock
* I'm being stupid
* Found a better home for ignoring common/core_api_review/kibana.api.ts
* Node script for detecting core API changes
I initially wanted to include this as a precommit hook, but it takes
quite long to execute (~12s) so might be better suited as a test or
as part of the release process.
The script currently fails because api-extractor uses an older version
of typescript.
* Fix tslint precommit hook ignore condition
* Write tsdoc-metadata.json into ./build
* Add LogMeta and ElasticSearch to exported types & docs
* Suppress logging when running api-extractor from script
* Improve check_core_api_changes script and run as test
* Inline api-extractor.json config
* Fix check_core_api_changes --help flag
* LogMeta TSDoc comments
* check_core_api_changes: fail if api-extractor produces warnings or errors
And print more useful messages to the console
* Move ignored ts files list into dev/file
* Add back build:types since api-exporter cannot operate on source files
* Upgrade api-exporter/documenter
* api-extractor: independantly analyze core/public and core/server
Becasue of https://github.com/Microsoft/web-build-tools/issues/1029
api-extractor can't use core/index.ts as a single entry point for
analyzing the public and server API's as isolated namespaces.
Instead we analyze these projects separately. This introduces other
problems like the api review files and documentation always being
called "kibana." from the package.json filename.
* Build types as part of build task
* Include types in typescript browser compilation
* Force inclusion of core/public for building types
* Fix api review filename in api-exporter errors
* Update docs and API review files
* Fix api-extractor warnings
* Remove ts file ignored list since it's no longer necessary
* Rename exported api package name
* Review comments
* Export other missing types
* Upgrade api-documenter to latest beta
* Export more missing types
* Fix warnings and add api-exporter to Jenkins tests
* Correctly handle runBuildTypes() exceptions
* Fix another swallowed exception
* Fix api-extractor warnings after master merge
* [ci/es] base default es version on pkg.branch value
* [ci/env] initialize $TEST_ES_FROM in checkout_sibling_es.sh
* [UA] remove TEST_ES_SNAPSHOT_VERSION override
* [ci/es] call checkout_sibling_es.sh from one location
* [ci] remove unused `--from` param
* [ci/env] always default to snapshots, switch to source when necessary
* [kbn/test] default esFrom to $TEST_ES_FROM
* [ci/setup] fix define order
* [ci/grunt] don't pass --esFrom let env pass through
* [ci/env] use branch, not version
* [ci] use same indent style as following lines
* [kbn/test] apply default values when processing args
* [kbn/test] simplify defaults, read default on each process
Based on #32705
We currently have TypeScript code that was backported to 7.0, which was backported without issue because it falls outside of any TypeScript projects in 7.0. This means that the pre-commit hooks break on changes to these files, and that they are not getting type checked by the type_check script. To fix this we need to verify that every typescript file in the repository is covered by a tsconfig.json file as part of CI.
* Prefer third-party plugin development in plugins instead of kibana-extra
* Fix failing recursive directory creation and removal
* Add new built version of kbn-pm
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
* Use mixin for full screen graphics
- Moved svg assets to one folder under `ui/public/assets/images`
- Deleted .less files
* Fix Kibana logos as well
* forgot to remove
* adds dark mode images
* Removed search_select
In favor of pattern to be created in EUI : https://github.com/elastic/eui/issues/1498
* No LESS in plugin generator
* remove comment
* Remove .less from testbed
* snaps
* Update dark mode graphics to be a bit lighter
* [karma] load css via url, rather than webpack
* [karma] css isn't built at config time, concat at request time
* [sass] build sass into built_assets directory
* [optimize/dlls] move dll optimization into built_assets directory
* [dlls] update path to dll manifest
* [built_assets] ignore when searching for notice files
* [sass] build into variable directory
* revert changes to ui_export_types/style_sheet_paths.js
* revert changes to ui_export_types/style_sheet_paths.test.js
* [uiExports/styleSheetPaths] switch .scss extension for stylesheets that are already compiled
* update comment for clarity
* [testBundle] include css from built_assets
* [dlls] move url to built_assets/dlls
* fix merge conflict issues
* [server/sass] pass log in test
Since this is no longer part of a reporting task in Jenkins, we no
longer need to re-run kbn bootstrap when generating a report.
We use the PR_SOURCE_BRANCH environment variable to prevent genererating
Github issues when we are on a PR.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* feat(NA): first dll bundler code.
* chore(NA): upgrade to webpack 4.
* chore(NA): updated package.json
* chore(NA): removed old code.
* chore(NA): add parallel option.
* chore(NA): removed console log and old var about node modules.
* chore(NA): turn off unsafe cache.
* chore(NA): update lock files.
* chore(NA): new config for dll generation.
* chore(NA): update stats emit.
* chore(NA): update dependencies.
* chore(NA): right cache loaders.
* chore(NA): remove ui_bundles alias.
* feat(20749): init implementation on bridge plugin for dll bundler.
* feat(20749): init implementation for dll compiler.
* feat(20749): dll bundler init from other process and webpack wrapper..
* feat(20749): optimizer changes to integrate with dll bundler.
* chore(20749): split into different processes.
* refact(20749): change to single running process.
* refact(NA): improvements on dll bundler plugin.
* refact(NA): removing including loop on plugins.
* refact(20749): only run dllReference once.
* chore(20749): todo on result.request path building.
* chore(NA): lock files updated.
* chore(NA): avoiding dll paths being removed.
* chore(NA): tests on sync generation.
* chore(NA): changes on entry paths compiler.
* chore(NA): different hooks tests.
* chore(20749): first working version, single process, for dynamic building dll.
* feat(20749): last gross features for the dynamicdllplugin.
* refact(20749): string interpolation when creating the path to delete in every optimizer cycle. feat(20749): creating the DynamicDllPlugin foundations.
* chore(NA): updated base optimizer run function args.
* chore(20749): first working solution with vendor dll both for prod and dev.
* chore(20749): useful todos on client dlls.
* feat(NA): auto built blacklist for server node_modules.
* refact(NA): removed unused code.
* chore(NA): update all webpack and loaders stuff to last versions.
* refact(NA): first refacts on clean taks related with dll. feat(NA): added clean empty folders task.
* refact(NA): removed support for console logs during the build.
* refact(NA): removed extra space.
* refact(NA): removed extra space.
* refact(NA): getDllModules function.
* chore(NA): removed unsafeCache option.
* feat(NA): removed unsafeCache option.
* refact(NA): apply general inheritance principles to the optimizer: hooks, and init. refact(NA): merge dynamic dll plugin into the common config. refact(NA): restore old template structure - vendors.dll style is always emitted.
* fix(NA): fs_optimizer run function by not returning inside async func.
* fix(NA): change template anchor name from vendor to vendors.
* docs(NA): added info about files were keeping when cleaning the bundles.
* fix(NA): filtering elible dll modules to delete.
* refact(NA): removed old dll bundler in favor on new dynamic dll plugin.
* refact(NA): initial split for clean modules on dll task.
* refact(NA): update new dll config model. refact(NA): update config on dynamicdllplugin.
* refact(NA): major work refactor for dynamic dll plugin.
* refact(NA): extract clean node modules on dll task to its own folder.
* refact(NA): organize imports.
* docs(NA): add docs to registerCompilerHooks function for the optimizer.
* refact(NA): finished refactor for dynamic dll plugin with correct error handling for runWebpack function.
* refact(NA): basic structure for clean client modules on dll task.
* fix(NA): resolve path for dll manifest during cclean build tasks.
* refact(NA): split webpack dll related functions to their own file for clean client modules on dll task.
* refact(NA): added error handling for the clean client modules on dll task - webpack dll related functions.
* docs(NA): added license header.
* refact(NA): complete split out the functions from the clean modules on dll task to the code_parser file.
* refact(NA): main task entries compose.
* docs(NA): extend docs for the getDependenciesFromFile function.
* refact(NA): final structure split for clean client node modules dll task.
* fix(NA): added missing param to calculate top level dependencies.
* docs(NA): completed todo description about dll location.
* fix(NA): add production option to webpack config on kbn-pm.
* docs(NA): extended documentation about style extraction.
* refact(NA): removed extra comments.
* feat(NA): env variable to force dll creation.
* feat(NA): include option to define folders to keep on delete empty folders task.
* refact(NA): remove unused method from dll compiler.
* feat(NA): move dlls outside bundles folder and support request for /dlls from a browser perspective.
* chore(NA): gitignore updated to include new dlls folder.
* chore(NA): eslintignore updated.
* chore(NA): removed strange file from repo.
* test(NA): fix failing tests for bundles_route.
* fix(NA): change paths array to path string in a server route config.
* fix(NA): remove infinite loop calls on register hooks functions.
* fix(NA): readFile should only override the file in case it not exists.
* refact(NA): removed dll compiler finish log on success with stats.
* fix(NA): dll compiler alias.
* fix(NA): dynamic dll plugin flow on needs compile.
* fix(NA): raw alias config.
* Revert "fix(NA): raw alias config."
This reverts commit ebb245a786.
* feat(NA): raw alias for moment on dll config model.
* fix(NA): removed uiBundles from base_optimizer call on dynamicdllplugin.
* chore(NA): decrease moment versions.
* chore(NA): temporary changes on dll compiler.
* fix(NA): majority of problems between dll approach, webpackshims and browser tests.
* fix(NA): webpackShims integration with client vendors dll. fix(NA): enable esm modules mutability for development. fix(NA): only clean dll contents from build when they belong to node_modules.
* fix(NA): fix for endless dll compilation loop.
* fix(NA): removed esm plugin and skipped test using wrong stub strategy.
* docs(NA): added some comments for the skipped test.
* feat(NA): considering requires inside webpackShims valid entry paths to add to the dll entry file.
* fix(NA): small fix for the max compilation logic.
* docs(NA): add small explanatory note.
* fix(NA): building requires results with relative requires found onn webpackShims.
* docs(NA): add small note for error handling on dll compiler.
* fix(NA): move precinct to prod dependencies.
* test(NA): testing running functional tests on production.
* fix(NA): restore tests run config for development flag. feat(NA): force dll creation with uiBundles is Dev flag.
* chore(NA): update dependencies.
* feat(NA): test update dll to completely match base optimizer one.
* fix(NA): removed ts.
* refact(NA): removed unused consts.
* fix(NA): set back transpile sacss task in place.
* fix(NA): fix resolve remoing ts and tsx.
* fix(NA): set back transpile sacss task in place.
* fix(NA): removing isDevmode from mustCompileDll.
* fix(NA): add search for import statements into the dependencies visitor.
* fix(NA): add dll suffix to vendors resource on ui bootstrap template.
* fix(NA): some configs for unrelated dll work projects.
* chore(NA): upgrade canvas plugins webpack build to webpack4.
* chore(NA): add shim for moment-duration-format.
* chore(NA): stup moment-duration-format into the moment webpackShim.
* chore(NA): setup moment-duration-format into the moment-timezone webpackShim.
* fix(NA): moment and moment-timezone webpackShims
* chore(NA): added moment and moment-timezone webpackShims to x-pack. fix(NA): revert changes on webpackShims for oss kibana.
* fix(NA): xpack webpackshims for moment.
* fix(NA): remove xpack webpakcshims for moment.
* fix(NA): webpakcshims for moment.
* fix(NA): remove every changes from webpackShims and xpack webpackShims.
* fix(NA): fix visitors to gather server dependencies resulting from export * from and export x, 'x' from.
* chore(NA): update some webpack related dependencies.
* fix(NA): in the dll the plugins need to have their own dependencies. It is the same for the ones into the tests relying on test against distributable.
* feat(NA): including test/plugin_functional plugins into the kbn-pm bootstrap tasks.
* fix(NA): wrong built yarn lock files.
* chore(NA): updated webpack related dependencies.
* feat(NA): add missing color for dynamic_dll_plugin logging tag.
* chore(NA): removed forgotten console.log.
* chore(NA): removed forgotten dead code.
* chore(NA): removed missing old comment.
* docs(NA): added missing notice for 2 tools we have relied on.
* refact(NA): added is to a boolean variable to keep the consistency inside the code parser strategies.
* fix(NA): update notice cli to exclude search inside dlls bundles. chore(NA): update notice file.
* feat(NA): use lodash matches in the code parser visitors logic.
* docs(NA): updated notice file related with the code parser visitors logic..
* docs(NA): added explanation for the process that decides if we should build a new dll or not.
* test(NA): added missing tests for some usefull parts of the code.
* refact(NA): split registerCompileHook function into small ones.
* chore(NA): uncomment scripts from tests.
* feat(NA): isolate code-parser in a kbn package
* fix(NA): missing relative dot into the cwd function.
* chore(NA): update all inter deps to match.
* fix(NA): rebuild the yarn locks and the package jsons based on master ones.
* fix(NA): move babel-code-parser to the prod deps.
* chore(NA): include build path instead of the base root path.
* refact(NA): integrate plugin_functional test plugins with workspaces.
* fix(NA): include missing license for plugin functional test plugins.
* fix(NA): always write posix paths into the dll entry file in order to make the dlls compilation working on windows too. chore(NA): improve error handling into dll compiler.
* fix(NA): revert wrong moved line from canvas.
* fix(NA): match ts-loader version between kibana and x-pack.
* fix(NA): sync dll compiler with base_optimizer.
* fix(NA): exclude kbn-interpreter from the dll.
* refact(NA): remove exclusion of kbn-interpretor from base_optimizer.
* chore(NA): add dlls folder to the yarn kbn clean script.
* fix(NA): missing utf8 input format encoding when reading a file to create the hash into the watch optimizer cahce.
* refact(NA): re-engineering to the dynamic_dll_plugin logs and lifecycle.
* fix(NA): update clean node modules task to search under legacy/core_plugins.
* fix(NA): fix build on windows with globby on cleaning dlls for the watch optimizer cache.
* docs(NA): update documentation for the clean client node modules build task.
* docs(NA): added extra comment to clarify the purpose for the built entrypoints.
* chore(NA): update clean client node_modules code to use posix path.
* feat(NA): add support for discovering server entries over the legacy plugins and the new plugins.
* fix: move buildEsQuery to utils
* fix: tests that I broke
* fix: add back link to the docs
* fix: don't export from ui/ and link to utils
* fix: move to a package
* fix: move error to errors.js
* fix: paths for peg task
* fix: update reference to kuery
* fix: build step for transpilation
* fix: add typescript declaration file
* fix: test
* tmp: debug individual tests
* debug: add debug stuff for reporting tests
* try to debug test
* Testing splitting reporting jobs in two
* Testing splitting each job
* Fix ci yaml
* Skipping job to check failing test
* debug - adding a catch to jobResponseHandler on report
* Testing a different job and enabling verbose mode
* Testing verbose on phantom_api skipping other CI tests
* Fix script mode
* fix: try running tests in chromium
* fix: move out of devDependencies
* fix: remove commented test
* Revert "fix: try running tests in chromium"
This reverts commit 991d46f051.
* Revert testing changes
* Fixing build for phantomjs
* Revert CI configuration to master. Remove verbose logging for tests
* [ci][ftr][kbn/test] split up CI jobs
* [ci] run --assert-none-excluded in ci groups, before builds
* [ftr] improve error message when excluded tests found
* [ci] document other places the ciGroups live
* chore(19834): upgraded yargs dependency to 4.8.1 in order to remove pkg-conf dependency license conflict.
* chore(19834): override xmldom to one of the allowed licenses (MIT).
* chore(19834): added some overrides and whitelistenig for Apache2.
* chore(19834): correct overides for some apache2 licenses.
* chore(NA): updated specific dependency needs.
* chore(19834): added some more info on updated licenses.
* chore(19834): small note on dependencies use versions.
* feat(NA): add the ability to white list licenses only valid for dev only dependencies.
* chore(NA): update yarn lock files to include integrity check.
* fix(NA): yarn lock file for kbn ui framework.
* docs(NA): fix uncompleted comment left on the code.
* Replace xvfb with headless browser
* Update karma to run in headless chrome
Update Karma tests for an option to run chrome in headless.
* Fix lint issues
* Fix spaces
For instances where we would otherwise be running from source in a tracked elastic/elasticsearch branch, let's use a snapshot instead. This will eliminate some gradle issues we are experiencing in master.
* [devUtils/toolingLog] give tooling log configurable writers
* property shorthand
* remove redundant parameter
* call Error.captureStackTrace when subclassing Error
* describe why we skip stack trace logging for CliError
* always return true/false from log writers
* improve type definitions, writeTo is just an object with write method
* get rid of weird dedent for failures
* [Tests] Add http integration test setup
* Base path tests
* SSL tests
* Eslint fixes
* Remove env from config schema
* Rename folders so no_rewrite and rewrite match configs/tests
* wip
* Use self-signed cert for SSL test
* Improve basepath tests
* Run base path proxy server in dev mode for now
* Remove env from x-pack reporting config
* Remove redundant base-path tests
* Test SSL with redirectHttpFromPort set
* Test SSL with redirectHttpFromPort set
* Flesh out comments
* Remove some cruft
* Add SSL tests to CI run
Right now the functional tests are run against a distributable of Kibana in CI, but that distributable is running with `--env.name=development`. That causes the optimizer to run again before the tests can start and prevents the functional tests from running against the actual version of the application users will end up getting. This seems necessary for some tests, but not all of them, but I would like to get all of the tests running against the production version of Kibana soon.
This PR implements a second ftr config, `test/functional_production` that uses basically a copy of the `test/functional` config but with a few minor adjustments, removing the `--env.name=development` kbnServerArg and using a unique junit report name. To accomplish this I needed to modify the `@kbn/test` module to only pass the `--dev` flag to the Kibana server if it is being run in development mode, which it currently does by testing the args for `--env.name=development` or two args next to each other: `'--env.name'` and `'development'`. It does this by converting the `extraKbnOpts` option into an `addExtraKbnArgs` function, which is called with the final args just before passing them to the proc runner and given a chance to modify then after all other args are resolved (pulling from different places in config based on the build type, etc.)
Over the next couple weeks I'll push up PRs for individual test suites, migrating them over to the new production config, hopefully in a short period of time we will have all the function test suites back under that `test/function` config and can run them all against the Kibana server in production mode.
In order for the runbld project we use in CI to auto-discover the junit reports we generate they need to match `TEST-*.xml`, which will allow us to include more details in the failure emails, and push failure info to the build-stats cluster.
* Replace test:api with @kbn/test runTests
* Improve CLI help menu 🆘
* Use --es-from
* Replace jenkins:selenium with kbn-test
* Validate cli args, fixing test in the process
* Clean up some stuff
* Code review fixes
* Explanation for collectCliArgs
* Remove exit codes, they're useless anyway.
* Make markdown vis test pass with dev_mode setting
* Tests
* Remove unneeded export
* Code review: move console logging up to cli.js
* Code review: refactor startServers and runTests to take single options collection
* Code review: Remove all things I am sure we do not use
* Improve tests
* Code review fixes
* Pass created log to runFtr, runElasticsearch, runKibanaServer
* Update --es-from option to --esFrom
* Add Inspector feature
* So long, and thanks for all the fish, spy panel
* Fix several functional tests
* Fix unit tests
* Fix spy panel button tests
* Replace old spy panel documentation
* Disable test temporarily until we have dashboard triggers
* Enter edit mode for dark theme test
* Fix some more functional tests
* Fix more functional tests
* More test fixing
* Fix more functional tests
* Allow opening the inspector via loader handler
* Refactor InspectorViewChooser, remove unused CSS
* Remove dead code
* Fix data download button style
* Remove redundant code
* Load inspectorViews for dashboard_viewer
* Extract inspector views to custom core_plugin
* Switch API to TypeScript 🎉
* Design changes
* Remove icons from views
* Design changes
* Improve typings of API
* Add typing to all adapters
* Show loading spinner in request selector
* Rewrite InspectorView to TypeScript
* Fix help text for data view
* Remove deprecated React lifecycle methods
* Embed inspector into dashboard panel actions
* Remove temporary inspector trigger
* Remove old CSS
* Fix dashboard trigger for new panel action
* Add tests for InspectorPanel and DataAdapter
* Produce a hierarchical table if the vis is hierarchical
* Remove allowJs option again
* Add missing Apache license headers
* Close inspector on dashboard when navigating away
* Use proper title for dashboard panels
* Fix functional tests
* Skip broken test for now
* Flush view chooser button
* Add request adapter tests
* Skip more tests, broken due to typescript
* Add Request Time description
* Add description for courier request
* Fix tests
* Replace icon by new (not yet released) icon
* Finalize design of inspector
* Remove discover test, that relied on spy panels
* Change API to be properly mockable in tests
* Add aria-live region for request status
* Replace old method in functional tests
* Replace abitrary magic number
* Use object destructuring in vis
* Fix issue with crashing requests view
* Add request time tooltip
* Get request body of correct search source
* Make filter buttons properly keyboard accessible
* Follow Dave's design suggestions
* Remove redundant request from name
* Remove unneeded comments
* WIP raw-formatted values
* Fix filtering issue
* Fix tests and more license headers
* Add data view tests
* Remove search from table
* Fix typos
* Implement review suggestion
* Remove artificial delays for testing
* Fix new panel action structure
* Minor design adjustments
* Fix failing functional test
* Update failing snapshot test
* Implement final wording
* Apply new EUI styling
* Fix closing inspector in tests
* Fix sorting of table
* Align punctuation between tooltips
This PR upgrades RxJS to version 6 and switches to a fork of `stream-to-observable` which includes an updated version of `any-observable` that supports RxJS 6 until https://github.com/jamestalmage/stream-to-observable/pull/10 is merged. The primary change in this version of RxJS is the movement of stream operators from `Obersable.prototype` to the `rxjs/operators` module. Some of the operators, like `catch` and `do`, have been renamed (`catchError`, and `tap`). The Obsevable factories have also been moved from static methods on the `Observable` class to named exports of the root `rxjs` module. Some of those factories have also changed slightly, like `fromEvent` which now emits arrays if the event handler is called with multiple arguments.
```js
// import the Rx namespace to get the Observable factories
import * as Rx from 'rxjs';
// import the operators as named imports
import { map, tap, switchMap } from 'rxjs/operators';
```
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.
Existence of this header is enforced by eslint and tslint and missing headers were automatically added in the last commit by running:
```
node scripts/eslint --fix && node scripts/tslint --fix
```