Skip to content

Commit

Permalink
Merge branch 'master' into implement/separate-report-tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 6, 2021
2 parents b722e38 + be725ca commit e459fd9
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@
# Import shared settings first so we can override below
import %workspace%/.bazelrc.common

## Disabled for now
# Remote cache settings for local env
# build --remote_cache=https://storage.googleapis.com/kibana-bazel-cache
# build --incompatible_remote_results_ignore_disk=true
# build --remote_accept_cached=true
# build --remote_upload_local_results=false

# BuildBuddy
## Metadata settings
build --workspace_status_command=$(pwd)/src/dev/bazel_workspace_status.sh
# Enable this in case you want to share your build info
# build --build_metadata=VISIBILITY=PUBLIC
build --build_metadata=TEST_GROUPS=//packages

57 changes: 57 additions & 0 deletions src/dev/bazel_workspace_status.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/bash

# Inspired on https://github.com/buildbuddy-io/buildbuddy/blob/master/workspace_status.sh
# This script will be run bazel when building process starts to
# generate key-value information that represents the status of the
# workspace. The output should be like
#
# KEY1 VALUE1
# KEY2 VALUE2
#
# If the script exits with non-zero code, it's considered as a failure
# and the output will be discarded.

# Git repo
repo_url=$(git config --get remote.origin.url)
if [[ $? != 0 ]];
then
exit 1
fi
echo "REPO_URL ${repo_url}"

# Commit SHA
commit_sha=$(git rev-parse HEAD)
if [[ $? != 0 ]];
then
exit 1
fi
echo "COMMIT_SHA ${commit_sha}"

# Git branch
repo_url=$(git rev-parse --abbrev-ref HEAD)
if [[ $? != 0 ]];
then
exit 1
fi
echo "GIT_BRANCH ${repo_url}"

# Tree status
git diff-index --quiet HEAD --
if [[ $? == 0 ]];
then
tree_status="Clean"
else
tree_status="Modified"
fi
echo "GIT_TREE_STATUS ${tree_status}"

# Host
if [ "$CI" = "true" ]; then
host=$(hostname | sed 's|\(.*\)-.*|\1|')
cores=$(grep ^cpu\\scores /proc/cpuinfo | uniq | awk '{print $4}' )
if [[ $? != 0 ]];
then
exit 1
fi
echo "HOST ${host}-${cores}"
fi
12 changes: 9 additions & 3 deletions src/dev/ci_setup/.bazelrc-ci
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# Import and load bazelrc common settings for ci env
try-import %workspace%/src/dev/ci_setup/.bazelrc-ci.common

# Remote cache settings for ci env
# build --google_default_credentials
# build --remote_upload_local_results=true
# BuildBuddy settings
## Remote settings including cache
build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://cloud.buildbuddy.io
build --remote_cache=grpcs://cloud.buildbuddy.io
build --remote_timeout=3600

## Metadata settings
build --build_metadata=ROLE=CI
3 changes: 0 additions & 3 deletions src/dev/ci_setup/.bazelrc-ci.common
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
# Don't be spammy in the logs
build --noshow_progress

# Print all the options that apply to the build.
build --announce_rc

# More details on failures
build --verbose_failures=true
3 changes: 3 additions & 0 deletions src/dev/ci_setup/load_env_keys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ else
PERCY_TOKEN=$(retry 5 vault read -field=value secret/kibana-issues/dev/percy)
export PERCY_TOKEN

KIBANA_BUILDBUDDY_CI_API_KEY=$(retry 5 vault read -field=value secret/kibana-issues/dev/kibana-buildbuddy-ci-api-key)
export KIBANA_BUILDBUDDY_CI_API_KEY

# remove vault related secrets
unset VAULT_ROLE_ID VAULT_SECRET_ID VAULT_TOKEN VAULT_ADDR
fi
11 changes: 11 additions & 0 deletions src/dev/ci_setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ echo " -- PARENT_DIR='$PARENT_DIR'"
echo " -- KIBANA_PKG_BRANCH='$KIBANA_PKG_BRANCH'"
echo " -- TEST_ES_SNAPSHOT_VERSION='$TEST_ES_SNAPSHOT_VERSION'"

###
### copy .bazelrc-ci into $HOME/.bazelrc
###
cp "src/dev/ci_setup/.bazelrc-ci" "$HOME/.bazelrc";

###
### append auth token to buildbuddy into "$HOME/.bazelrc";
###
echo "# Appended by src/dev/ci_setup/setup.sh" >> "$HOME/.bazelrc"
echo "build --remote_header=x-buildbuddy-api-key=$KIBANA_BUILDBUDDY_CI_API_KEY" >> "$HOME/.bazelrc"

###
### install dependencies
###
Expand Down
4 changes: 3 additions & 1 deletion test/functional/apps/console/_console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.console.dismissTutorial();
expect(await PageObjects.console.hasAutocompleter()).to.be(false);
await PageObjects.console.promptAutocomplete();
retry.waitFor('autocomplete to be visible', () => PageObjects.console.hasAutocompleter());
await retry.waitFor('autocomplete to be visible', () =>
PageObjects.console.hasAutocompleter()
);
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const ml = getService('ml');

describe('total feature importance panel and decision path popover', function () {
// Failing: See https://github.com/elastic/kibana/issues/90526
describe.skip('total feature importance panel and decision path popover', function () {
const testDataList: Array<{
suiteTitle: string;
archive: string;
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/page_objects/upgrade_assistant_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function UpgradeAssistantPageProvider({ getPageObjects, getService }: Ftr
return await retry.try(async () => {
await common.navigateToApp('settings');
await testSubjects.click('upgrade_assistant');
retry.waitFor('url to contain /upgrade_assistant', async () => {
await retry.waitFor('url to contain /upgrade_assistant', async () => {
const url = await browser.getCurrentUrl();
return url.includes('/upgrade_assistant');
});
Expand Down Expand Up @@ -61,7 +61,7 @@ export function UpgradeAssistantPageProvider({ getPageObjects, getService }: Ftr

async waitForTelemetryHidden() {
const self = this;
retry.waitFor('Telemetry to disappear.', async () => {
await retry.waitFor('Telemetry to disappear.', async () => {
return (await self.isTelemetryExists()) === false;
});
}
Expand Down

0 comments on commit e459fd9

Please sign in to comment.