* convert into TS
* load plugin scripts in html body
* use buildNum as a unique Id for cache busting
* add tests for caching
* fix tests
* remove the last TODO. url should be inlined with assetss server
* this logic handled by publicPathMap on the client
* cache kbn-shared-deps as well
* attempt to fix karma tests
* always run file through replace stream
* place buildHash at begining of path, include all static files
* update bundles_route tests to inject buildNum everywhere
* fix karma config to point to right prefix
* use isDist naming throughout
* explain magic number with variables
* restore replacePublicPath option from #64226
* replace one more instance of replacePublicPath
* use promisify instead of bluebird + non-null assertions
* remove one more magic number
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* update cache-control header
* update tests
* update test run config
* remove custom cache-control header for authentication resources
* address test flakiness
* address PR feedback
* revert changes to endpoint test
* revert changes for real this time
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [kbn/ui-shared-deps] expand and split
* add two import styles for eui/react-dom that are new
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add doc building for data plugin
* Added data server md file
* index file for suggestion component
* Clear out internal imports from public API
* Remove FunctionalComponent usage
* comment out working docs
* Added fixes following @octogonz feedback
* new docs
* Clean up
* Clean up 2
* fix jest
* rename docs script file
* update tasks
* tasks
* update docs
* run jest with `--detectOpenHandles` on CI to figure out what is happening with pauses
* focus tests on jest integration
* force kill child processes in config reload test
* skip flaky suite
* increase timeout for looking for installed packages
* run all tests again
Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.
e.g. `yarn test:browser` -> `yarn test:karma`
Closes#41133
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* feat(NA): implement dll split feature
* chore(NA): improve logic to split dlls
* feat(NA): support multiple manifests in the clean dll task
* fix(NA): patch clean dll task to support multiple manifest files
* feat(NA): shuffle seed before split dll in chunks
* chore(NA): correctly load chunks into the templates
* chore(NA): correctly load chunks on karma tests
* docs(NA): add explanation why we need a single runtime for dll chunks
* teste(NA): fix jest tests
* share specific instances of some ui packages
* remove unnecessary eslint changes, every package will define deps anyway
* remove mentions of moment webpackShims in eslint resolver
* remove use of lodash
* list angular as dep for x-pack
* add operations as codeowner of shared-deps pkg
* Add a new platform embeddable example plugin
* Remove extra hello world test impl.
* cleanup
* code review updates
* Change example to highlight and have parent filter out children
* Fix deep comparison of embeddable prop
* adjust help text
* [kbn/dev-utils] target ES2019 to transpile ??
* Retry uiSettings.replace() calls up to 5 times
* share logic for selecting junit report name to ensure they are unique
* convert to junit report path helper
* run mocha tests from x-pack with root mocha script
* Only run Karma tests in xpack intake job
* disable failing suites
* fix typo
* skip correct suite (there are multiple root suites)
* support disabling junit reporting with $DISABLE_JUNIT_REPORTER
* don't generate junit in ispec_plugin tests
* Added base folder structure for Newsfeed plugin
* Added base folders for lib and component
* Added newsfeed button to navigation controls on the right side
* add getApi() to return api data observable (#49581)
* Added flyout base body and provided EuiHeaderAlert component inside the newsfeed plugin
* Moved newsfeed plugin to OSS and added for the styles purpose new folder for legacy plugin 'newsfeed' with the same id to support this
* Added subscribe on fetch newsfeed change
* Add NewsfeedApiDriver class (#49710)
* add NewsfeedApiDriver class
* fix xpack prefix
* add corner case handling
* Added data binding to the ui
* added EuiHeaderAlert style overrides (#49739)
* Fixed due to comments on PR
* add missing fields to NewsfeedItem and FetchResult
* fix templating of service url
* gracefully handle temporary request failure
* Mapped missing fields for data and badge
* Fixed typos issues
* integrate i18n.getLocale()
* allow service url root to be changed in dev mode
* replace a lot of consts with config
* fix flyout height (#49809)
* Add "error" field to FetchResult: Error | null
* simplify fetch error handling
* Do not store hash for items that are filtered out
* add expireOn in case it is useful to UI
* always use staging url for dev config
* unit test for newsfeed api driver
* simplify modelItems
* Fixed eslint errors
* Fixed label translations
* Add unit test for concatenating the stored hashes with the new
* add newsfeed to i18n.json
* Fixed expression error
* --wip-- [skip ci]
* fix parse error
* fix test
* test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests
* add tests for getApi()
* add tests for getApi
* Added no news page
* fix fetch not happening after page refresh with sessionStorage primed
* test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests
* Added loading screen
* Small fixes due to comments
* Fixed issue with stop fetching news on error catch
* test(newsfeed): Configure FTS to point newsfeed to the simulated newsfeed endpoit
* Fixed browser error message: Invariant Violation: [React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.
* Fixed typo issue in label name
* polish the code changes
* Add simple jest/enzyme tests for the components
* honor utc format
* Filter pre-published items
* Fall back to en
* retry tests
* comment clarfication
* Setup newsfeed service fixture from test/common/config
* Added base functional tests for newsfeed functionality
* valid urlroot is for prod
* add documentation for the supported enabled setting
* more urlRoot
* --wip-- [skip ci]
* add the before for fn
* add ui_capabilties test
* update jest snapshot
* Fixed failing test
* finish newsfeed error functional test
* include ui_capability config
* error case testing in ci group 6
* refactor(newsfeed): moved newsfeed api call so that it is done before its use
* code polish
* enabled newsfeed_err test in CI
* Update dependency del to v5
* unify del/rimraf usage with del v5
* update yarn.lock
* update kbn-pm distributable
* remove poorly transformed code
* force some deletes from tmp
* mock less of the fs module
* force tmp deletion in a few more suites
* please make this the last force
* Pipeline
* WIP some work for parallelization with ciGroups
* Fix xpack kibana install dir, and add some debugging
* Attempt to quick fix a few tests
* Revert "Revert "Revert "[ci] compress jobs for CI stability" (#44584)""
This reverts commit 078ac2897f.
* Recombine test groups, and try runbld again
* Mostly cleanup, and fix failed_tests reporting to hopefully work for both pipeline and non-pipeline
* Fix typo in shell script
* Remove some debug code
* Add support for changing es transport.port during testing via TEST_ES_TRANSPORT_PORT
* Fix test that uses hard-coded es transport port and add it back in to parallel groups
* Disable checks reporter again for now
* Set env var for TEST_ES_TRANSPORT_PORT in pipeline
* Update Jenkinsfile for shorter testrunner labels
* Fix another hard-coded transport port
* Fix a new test with hard-coded URLs
* Jenkinsfile cleanup and fix one of the groups
* Fix double slash
* Testing vault credentials on jenkins server
* Add a non-existent credential
* Revert "Add a non-existent credential"
This reverts commit 0dc234c465a5483b1a994cb510a182fef766e9cc.
* Try github-checks-reporter again
* github-checks-reporter should only run for elastic/kibana, forks won't work
* Clean up some debug code
* Changing names around to try to make BlueOcean UI a little better
* Add more stages
* Make some changes to stage structure to mirror a nested example from CloudBees
* Handle TODOs, and some cleanup in Jenkinsfile
* Pass GIT_BRANCH when started without GHPRB, fix branch check
* Fix mailer problem and add code that ensures all tests are in cigroups back in
* Test adding worker/job name to junit report paths
* Remove some duplication from ci_setup scripts
* Fix unit test that uses junit path
* Don't reinstall node every time setup_env is run
* Fix yarn install logic
* Fix another unit test that uses junit output dir
* Download latest ES snapshot after kibana builds
* Make sure junit reports are always processed
* Add two failing tests for testing purposes
* Add support to Jenkinsfile for kibana build e-mails
* Remove some debug code for email sending
* Change JOB env handling in junit paths and move it to a sub-directory
* Revert "Add two failing tests for testing purposes"
This reverts commit 5715203e26922a93483feb0ebb8bb3fdcc3daf8c.
* Fix junit report path in test
* Don't send kibana emails on build abort
* Address PR feedback, formatting and use built-in url formatting library
* Fix path formatting for functional test
* Add email sending back in to Jenkinsfile
* Fix another unit test with path problem
* New and Legacy platforms share http server instance.
Required to use a common security interceptor for incoming http requests
* generate docs
* remove excessive contract method
* add test for New platform compatibility
* address comments part #1
* log server running only for http server
* fix test. mutate hapi request headers for BWC with legacy
* return 503 on start
* address @eli comments
* address @joshdover comments
* skip and adjust functional tests for Firefox
* downgrade geckodriver to 0.22.0
* [ftr] add firefox specific config file
* remove hard coded firefox adjustments
* remove firefox specific screenshot directory
* run functional tests in firefox in x-pack
* pass the logger to readConfigFile()
* rename local var
* skip xpack firefox config
* run xpack firefox functional tests in separate command
* update report name for XPack firefox results
* adjust viz shared item test
* skip shared item test
* [test/feature_controls] increase timeout to 20 sec & use forceLogout
* FF timeout on TSVB, refresh page on failure for url navigation
* [feature_controls/visualize_security] increase timeout to 20 sec
* skip dev_tools_spaces tests on FF
* run all groups 3 times
* skip more func tests
* skip more tests
* skip all feature controls tests for Firefox
* revert back changes in feature controls tests
* rename xpack report for chrome
* skip tile map for FF, wait for render before saving
* Revert "run all groups 3 times"
This reverts commit 12b4f69627.
* revert refresh on login
* apply feedback
Attempts to make KQL syntax errors more sensical to the average user.
I initially tried to use a similar solution to the one we used for detecting usage of old lucene syntax. In other words, I tried to create rules in the grammar that would match strings containing common mistakes the user might make and throw custom error messages for each situation. This proved to be more difficult for detecting errors in the regular language. While the Lucene rules could be completely separated from the main grammar, the KQL error rules had to be mixed into the main grammar which made it much more complex and had a lot of unintended side effects.
So instead I decided to lean more heavily on PEG's built in error reporting. Giving certain rules human readable names allows the parser to use those names in the error reporting instead of auto generating a long list of possible characters that might be expected based on the matching rules. Since the PEG errors contain location information I was also able to add ascii art that points the user to exactly where the error occurred in their query string. While this approach is not quite as nice as bespoke error messages that tell the user exactly what is wrong in plain English, it's much more maintainable and I think it still results in much better error messages compared to what we have today.
I've also removed the old original kuery grammar (for queries like is(response, 200)). We were only using it to display an error if I user was still using the old syntax. This version of kuery hasn't existed since 6.3 and we've had error messages telling users this since then. I think it's safe to remove the legacy parser at this point, which greatly reduces the complexity of our error reporting.
* 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