Skip to content

Commit

Permalink
Merge branch 'main' into kbnArchiver-management
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 7, 2022
2 parents 63898ef + 0fcd9b2 commit a5aa8eb
Show file tree
Hide file tree
Showing 92 changed files with 4,051 additions and 430 deletions.
5 changes: 3 additions & 2 deletions .buildkite/pipelines/code_coverage/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ steps:
queue: kibana-default
env:
FTR_CONFIGS_DEPS: ''
LIMIT_CONFIG_TYPE: 'unit,functional,integration'
# LIMIT_CONFIG_TYPE: 'unit,functional,integration'
LIMIT_CONFIG_TYPE: 'unit,integration'
JEST_UNIT_SCRIPT: '.buildkite/scripts/steps/code_coverage/jest.sh'
JEST_INTEGRATION_SCRIPT: '.buildkite/scripts/steps/code_coverage/jest_integration.sh'
FTR_CONFIGS_SCRIPT: '.buildkite/scripts/steps/code_coverage/ftr_configs.sh'
Expand All @@ -25,6 +26,6 @@ steps:
depends_on:
- jest
- jest-integration
- ftr-configs
# - ftr-configs
timeout_in_minutes: 30
key: ingest
20 changes: 10 additions & 10 deletions .buildkite/scripts/steps/code_coverage/ingest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo "--- Upload new git sha"

echo "--- Download coverage artifacts"
buildkite-agent artifact download target/kibana-coverage/jest/* .
buildkite-agent artifact download target/kibana-coverage/functional/* .
#buildkite-agent artifact download target/kibana-coverage/functional/* .
buildkite-agent artifact download target/ran_files/* .
ls -l target/ran_files/* || echo "### No ran-files found"

Expand All @@ -42,20 +42,20 @@ echo "--- Jest: Reset file paths prefix, merge coverage files, and generate the
replacePaths "$KIBANA_DIR/target/kibana-coverage/jest" "CC_REPLACEMENT_ANCHOR" "$KIBANA_DIR"
yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.jest.config.js

echo "--- Functional: Reset file paths prefix, merge coverage files, and generate the final combined report"
#echo "--- Functional: Reset file paths prefix, merge coverage files, and generate the final combined report"
# Functional: Reset file paths prefix to Kibana Dir of final worker
set +e
sed -ie "s|CC_REPLACEMENT_ANCHOR|${KIBANA_DIR}|g" target/kibana-coverage/functional/*.json
echo "--- Begin Split and Merge for Functional"
splitCoverage target/kibana-coverage/functional
splitMerge
set -e
#set +e
#sed -ie "s|CC_REPLACEMENT_ANCHOR|${KIBANA_DIR}|g" target/kibana-coverage/functional/*.json
#echo "--- Begin Split and Merge for Functional"
#splitCoverage target/kibana-coverage/functional
#splitMerge
#set -e

echo "--- Archive and upload combined reports"
collectAndUpload target/kibana-coverage/jest/kibana-jest-coverage.tar.gz \
target/kibana-coverage/jest-combined
collectAndUpload target/kibana-coverage/functional/kibana-functional-coverage.tar.gz \
target/kibana-coverage/functional-combined
#collectAndUpload target/kibana-coverage/functional/kibana-functional-coverage.tar.gz \
# target/kibana-coverage/functional-combined

echo "--- Upload coverage static site"
.buildkite/scripts/steps/code_coverage/reporting/uploadStaticSite.sh
Expand Down
22 changes: 14 additions & 8 deletions .buildkite/scripts/steps/code_coverage/reporting/ingestData.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,20 @@ echo "### Generate Team Assignments"
CI_STATS_DISABLED=true node scripts/generate_team_assignments.js \
--verbose --src '.github/CODEOWNERS' --dest $TEAM_ASSIGN_PATH

for x in functional jest; do
echo "### Ingesting coverage for ${x}"
COVERAGE_SUMMARY_FILE="target/kibana-coverage/${x}-combined/coverage-summary.json"

CI_STATS_DISABLED=true node scripts/ingest_coverage.js --path ${COVERAGE_SUMMARY_FILE} \
--vcsInfoPath ./VCS_INFO.txt --teamAssignmentsPath $TEAM_ASSIGN_PATH &
done
wait
#for x in functional jest; do
# echo "### Ingesting coverage for ${x}"
# COVERAGE_SUMMARY_FILE="target/kibana-coverage/${x}-combined/coverage-summary.json"
#
# CI_STATS_DISABLED=true node scripts/ingest_coverage.js --path ${COVERAGE_SUMMARY_FILE} \
# --vcsInfoPath ./VCS_INFO.txt --teamAssignmentsPath $TEAM_ASSIGN_PATH &
#done
#wait

echo "### Ingesting coverage for JEST"
COVERAGE_SUMMARY_FILE="target/kibana-coverage/jest-combined/coverage-summary.json"

CI_STATS_DISABLED=true node scripts/ingest_coverage.js --path ${COVERAGE_SUMMARY_FILE} \
--vcsInfoPath ./VCS_INFO.txt --teamAssignmentsPath $TEAM_ASSIGN_PATH

echo "--- Ingesting Code Coverage - Complete"
echo ""
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -euo pipefail

cat << EOF > src/dev/code_coverage/www/index_partial_2.html
<a class="nav-link" href="https://kibana-coverage.elastic.dev/${TIME_STAMP}/jest-combined/index.html">Latest Jest</a>
<a class="nav-link" href="https://kibana-coverage.elastic.dev/${TIME_STAMP}/functional-combined/index.html">Latest FTR</a>
</nav>
</div>
</header>
Expand All @@ -26,4 +25,4 @@ cat << EOF > src/dev/code_coverage/www/index_partial_2.html
EOF

cat src/dev/code_coverage/www/index_partial.html > src/dev/code_coverage/www/index.html
cat src/dev/code_coverage/www/index_partial_2.html >> src/dev/code_coverage/www/index.html
cat src/dev/code_coverage/www/index_partial_2.html >> src/dev/code_coverage/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ for x in 'src/dev/code_coverage/www/index.html' 'src/dev/code_coverage/www/404.h
gsutil -m -q cp -r -a public-read -z js,css,html ${x} ${uploadPrefix}
done

gsutil -m -q cp -r -a public-read -z js,css,html ${x} ${uploadPrefixWithTimeStamp}
#gsutil -m -q cp -r -a public-read -z js,css,html ${x} ${uploadPrefixWithTimeStamp}
#
#for x in 'target/kibana-coverage/functional-combined' 'target/kibana-coverage/jest-combined'; do
# gsutil -m -q cp -r -a public-read -z js,css,html ${x} ${uploadPrefixWithTimeStamp}
#done

for x in 'target/kibana-coverage/functional-combined' 'target/kibana-coverage/jest-combined'; do
gsutil -m -q cp -r -a public-read -z js,css,html ${x} ${uploadPrefixWithTimeStamp}
done
gsutil -m -q cp -r -a public-read -z js,css,html 'target/kibana-coverage/jest-combined' ${uploadPrefixWithTimeStamp}
9 changes: 9 additions & 0 deletions dev_docs/getting_started/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@ it means you are using a new Elasticsearch feature that will not work in a CCS e
We added this test coverage in version `8.1` because we accidentally broke core Kibana features (for example, when Discover started using the new fields parameter) for our CCS users. CCS is not a corner case and (excluding certain experimental features) Kibana should always work for our CCS users. This setting is our way of ensuring test coverage.

Please reach out to the [Kibana Operations team](https://github.com/orgs/elastic/teams/kibana-operations) if you have further questions.

### Minified React errors

If you experience minified React errors and want to expand them to their full error messages you will currently need to rebuild the `@kbn/ui-shared-deps-npm` package using "development" mode instead of "production", which can be done by modifying the corresponding line in `packages/kbn-ui-shared-deps-npm/webpack.config.js` and make sure to run `yarn kbn bootstrap` afterwards:

```diff
- mode: 'production',
+ mode: 'development',
```
71 changes: 57 additions & 14 deletions docs/api/actions-and-connectors/create.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,100 @@

Creates a connector.

[discrete]
[[create-connector-api-request]]
=== {api-request-title}

`POST <kibana host>:<port>/api/actions/connector`

`POST <kibana host>:<port>/s/<space_id>/api/actions/connector`

[discrete]
=== {api-prereq-title}

You must have `all` privileges for the *Actions and Connectors* feature in the
*Management* section of the
<<kibana-feature-privileges,{kib} feature privileges>>.

[discrete]
[[create-connector-api-path-params]]
=== {api-path-parms-title}

`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided
in the URL, the default space is used.

[discrete]
[role="child_attributes"]
[[create-connector-api-request-body]]
=== {api-request-body-title}

`name`::
(Required, string) The display name for the connector.
`config`::
(Required, object) The configuration for the connector. Configuration properties
vary depending on the connector type. For example:
+
.Index connectors
[%collapsible%open]
====
`executionTimeField`::
(Optional, string) Specifies a field that will contain the time the alert
condition was detected. The default value is `null`.
`index`::
(Required, string) The {es} index to be written to.
`refresh`::
(Optional, boolean) The {ref}/docs-refresh.html[refresh] policy for the write
request. The default value is `false`.
For more information, refer to
{kibana-ref}/index-action-type.html[Index connector and action].
====
+
.{jira} connectors
[%collapsible%open]
====
`apiUrl`::
(Required, string) The {jira} instance URL.
`projectKey`::
(Required, string) The {jira} project key.
For more information, refer to
{kibana-ref}/jira-action-type.html[{jira} connector and action].
====
+
For more configuration properties, refer to <<action-types>>.

`connector_type_id`::
(Required, string) The connector type ID for the connector.
(Required, string) The connector type ID for the connector.

`config`::
(Required, object) The configuration for the connector. Configuration properties vary depending on
the connector type. For information about the configuration properties, refer to <<action-types,Action and connector types>>.
`name`::
(Required, string) The display name for the connector.

`secrets`::
(Required, object) The secrets configuration for the connector. Secrets configuration properties vary
depending on the connector type. For information about the secrets configuration properties, refer to <<action-types,Action and connector types>>.
(Required, object) The secrets configuration for the connector. Secrets
configuration properties vary depending on the connector type. For information
about the secrets configuration properties, refer to <<action-types>>.
+
--
WARNING: Remember these values. You must provide them each time you call the <<update-connector-api, update>> API.
--
+
.{jira} connectors
[%collapsible%open]
====
`apiToken`::
(Required, string) The {jira} API authentication token for HTTP basic
authentication.
`email`::
(Required, string) The account email for HTTP Basic authentication.
====

[discrete]
[[create-connector-api-request-codes]]
=== {api-response-codes-title}

`200`::
Indicates a successful call.

[discrete]
[[create-connector-api-example]]
=== {api-examples-title}

Expand Down
2 changes: 1 addition & 1 deletion fleet_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[
{
"name": "apm",
"version": "8.2.0"
"version": "8.3.0"
},
{
"name": "elastic_agent",
Expand Down
Loading

0 comments on commit a5aa8eb

Please sign in to comment.