Skip to content

Commit

Permalink
Merge branch 'main' into use-locators-2
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 11, 2022
2 parents d8ccbf1 + 30ed7bb commit 5de749e
Show file tree
Hide file tree
Showing 891 changed files with 18,459 additions and 8,159 deletions.
2 changes: 1 addition & 1 deletion .bazeliskversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.1
1.11.0
5 changes: 4 additions & 1 deletion .buildkite/scripts/steps/cloud/purge.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for (const deployment of prDeployments) {
const lastCommit = pullRequest.commits.slice(-1)[0];
const lastCommitTimestamp = new Date(lastCommit.committedDate).getTime() / 1000;

if (pullRequest.state !== 'open') {
if (pullRequest.state !== 'OPEN') {
console.log(`Pull Request #${prNumber} is no longer open, will delete associated deployment`);
deploymentsToPurge.push(deployment);
} else if (!pullRequest.labels.filter((label) => label.name === 'ci:deploy-cloud')) {
Expand All @@ -50,6 +50,9 @@ for (const deployment of deploymentsToPurge) {
console.log(`Scheduling deployment for deletion: ${deployment.name} / ${deployment.id}`);
try {
execSync(`ecctl deployment shutdown --force '${deployment.id}'`, { stdio: 'inherit' });
execSync(`vault delete secret/kibana-issues/dev/cloud-deploy/${deployment.name}`, {
stdio: 'inherit',
});
} catch (ex) {
console.error(ex.toString());
}
Expand Down
11 changes: 10 additions & 1 deletion .buildkite/scripts/steps/code_coverage/oss_cigroup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,19 @@ export CODE_COVERAGE=1
echo "--- OSS CI Group $CI_GROUP"
echo " -> Running Functional tests with code coverage"

node scripts/functional_tests \
NODE_OPTIONS=--max_old_space_size=14336 \
./node_modules/.bin/nyc \
--nycrc-path src/dev/code_coverage/nyc_config/nyc.server.config.js \
node scripts/functional_tests \
--include-tag "ciGroup$CI_GROUP" \
--exclude-tag "skipCoverage" || true

if [[ -d "$KIBANA_DIR/target/kibana-coverage/server" ]]; then
echo "--- Server side code coverage collected"
mkdir -p target/kibana-coverage/functional
mv target/kibana-coverage/server/coverage-final.json "target/kibana-coverage/functional/oss-${CI_GROUP}-server-coverage.json"
fi

if [[ -d "$KIBANA_DIR/target/kibana-coverage/functional" ]]; then
echo "--- Merging code coverage for CI Group $CI_GROUP"
yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.functional.config.js --reporter json
Expand Down
11 changes: 10 additions & 1 deletion .buildkite/scripts/steps/code_coverage/xpack_cigroup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,21 @@ echo " -> Running X-Pack functional tests with code coverage"

cd "$XPACK_DIR"

node scripts/functional_tests \
NODE_OPTIONS=--max_old_space_size=14336 \
./../node_modules/.bin/nyc \
--nycrc-path ./../src/dev/code_coverage/nyc_config/nyc.server.config.js \
node scripts/functional_tests \
--include-tag "ciGroup$CI_GROUP" \
--exclude-tag "skipCoverage" || true

cd "$KIBANA_DIR"

if [[ -d "$KIBANA_DIR/target/kibana-coverage/server" ]]; then
echo "--- Server side code coverage collected"
mkdir -p target/kibana-coverage/functional
mv target/kibana-coverage/server/coverage-final.json "target/kibana-coverage/functional/xpack-${CI_GROUP}-server-coverage.json"
fi

if [[ -d "$KIBANA_DIR/target/kibana-coverage/functional" ]]; then
echo "--- Merging code coverage for CI Group $CI_GROUP"
yarn nyc report --nycrc-path src/dev/code_coverage/nyc_config/nyc.functional.config.js --reporter json
Expand Down
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,11 @@
# Uptime
/x-pack/plugins/uptime @elastic/uptime
/x-pack/plugins/ux @elastic/uptime
/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/uptime
/x-pack/test/functional_with_es_ssl/apps/uptime @elastic/uptime
/x-pack/test/functional/apps/uptime @elastic/uptime
/x-pack/test/functional/es_archives/uptime @elastic/uptime
/x-pack/test/functional/services/uptime @elastic/uptime
/x-pack/test/api_integration/apis/uptime @elastic/uptime
/x-pack/plugins/observability/public/components/shared/exploratory_view @elastic/uptime

# Client Side Monitoring / Uptime (lives in APM directories but owned by Uptime)
/x-pack/plugins/apm/public/application/uxApp.tsx @elastic/uptime
Expand Down Expand Up @@ -268,6 +266,7 @@
/packages/kbn-std/ @elastic/kibana-core
/packages/kbn-config/ @elastic/kibana-core
/packages/kbn-logging/ @elastic/kibana-core
/packages/kbn-logging-mocks/ @elastic/kibana-core
/packages/kbn-http-tools/ @elastic/kibana-core
/src/plugins/saved_objects_management/ @elastic/kibana-core
/src/dev/run_check_published_api_changes.ts @elastic/kibana-core
Expand Down
44 changes: 0 additions & 44 deletions .github/ISSUE_TEMPLATE/APM.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/add-to-fleet-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Add to Fleet:Quality project
on:
issues:
types:
- labeled
jobs:
add_to_project:
runs-on: ubuntu-latest
if: |
contains(github.event.issue.labels.*.name, 'Team:Fleet') && (
contains(github.event.issue.labels.*.name, 'technical debt') ||
contains(github.event.issue.labels.*.name, 'bug') ||
contains(github.event.issue.labels.*.name, 'performance') ||
contains(github.event.issue.labels.*.name, 'failed-test') ||
contains(github.event.issue.labels.*.name, 'chore')
)
steps:
- uses: octokit/[email protected]
id: add_to_project
with:
headers: '{"GraphQL-Features": "projects_next_graphql"}'
query: |
mutation add_to_project($projectid:String!,$contentid:String!) {
addProjectNextItem(input:{projectId:$projectid contentId:$contentid}) {
projectNextItem {
id
}
}
}
projectid: ${{ env.PROJECT_ID }}
contentid: ${{ github.event.issue.node_id }}
env:
# https://github.com/orgs/elastic/projects/763
PROJECT_ID: "PN_kwDOAGc3Zs4AAsH6"
# Token with `write:org` access
GITHUB_TOKEN: ${{ secrets.FLEET_TECH_KIBANA_USER_TOKEN }}
22 changes: 0 additions & 22 deletions .github/workflows/dev-doc-builder.yml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/label-qa-fixed-in.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Add QA labels to Fleet issues
on:
pull_request:
types:
- closed

jobs:
fetch_issues_to_label:
runs-on: ubuntu-latest
# Only run on PRs that were merged for the Fleet team
if: |
github.event.pull_request.merged_at &&
contains(github.event.pull_request.labels.*.name, 'Team:Fleet')
outputs:
matrix: ${{ steps.issues_to_label.outputs.value }}
label_ids: ${{ steps.label_ids.outputs.value }}
steps:
- uses: octokit/[email protected]
id: closing_issues
with:
query: |
query closingIssueNumbersQuery($prnumber: Int!) {
repository(owner: "elastic", name: "kibana") {
pullRequest(number: $prnumber) {
closingIssuesReferences(first: 10) {
nodes {
id
labels(first: 20) {
nodes {
id
name
}
}
}
}
}
}
}
prnumber: ${{ github.event.number }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: sergeysova/jq-action@v2
id: issues_to_label
with:
# Map to the issues' node id
cmd: echo $CLOSING_ISSUES | jq -c '.repository.pullRequest.closingIssuesReferences.nodes | map(.id)'
multiline: true
env:
CLOSING_ISSUES: ${{ steps.closing_issues.outputs.data }}
- uses: sergeysova/jq-action@v2
id: label_ids
with:
# Get list of version labels on pull request and map to label's node id, append 'QA:Ready For Testing' id ("MDU6TGFiZWwyNTQ1NjcwOTI4")
cmd: echo $PR_LABELS | jq -c 'map(select(.name | test("v[0-9]+\\.[0-9]+\\.[0-9]+")) | .node_id) + ["MDU6TGFiZWwyNTQ1NjcwOTI4"]'
multiline: true
env:
PR_LABELS: ${{ toJSON(github.event.pull_request.labels) }}

label_issues:
needs: fetch_issues_to_label
runs-on: ubuntu-latest
# For each issue closed by the PR run this job
strategy:
matrix:
issueNodeId: ${{ fromJSON(needs.fetch_issues_to_label.outputs.matrix) }}
name: Label issue ${{ matrix.issueNodeId }}
steps:
- uses: octokit/[email protected]
id: add_labels_to_closed_issue
with:
query: |
mutation add_label($issueid:String!, $labelids:[String!]!) {
addLabelsToLabelable(input: {labelableId: $issueid, labelIds: $labelids}) {
clientMutationId
}
}
issueid: ${{ matrix.issueNodeId }}
labelids: ${{ needs.fetch_issues_to_label.outputs.label_ids }}
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ npm-debug.log*
.ci/bash_standard_lib.sh
.gradle
.vagrant
.envrc

## @cypress/snapshot from apm plugin
/snapshots.js
Expand Down
6 changes: 6 additions & 0 deletions dev_docs/key_concepts/building_blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ sharing and space isolation, and tags.

**Github labels**: `Team:Core`, `Feature:Saved Objects`

## Advanced Settings

<DocLink id="kibDevTutorialAdvancedSettings" text="Advanced Settings and the uiSettings service /> should be used if you need to add application-level configuration options. If you wanted to add a setting for listing a number of items per page in your TODO application, then `pageListing` would be a configuration option.
**Github labels**: `Team:Core`, `Feature:uiSettings`, `Feature:Advanced Settings`
# Integration building blocks
Use the following building blocks to create an inter-connected, cross-application, holistic Kibana experience. These building blocks allow you to expose functionality
Expand Down
Loading

0 comments on commit 5de749e

Please sign in to comment.