Skip to content

Commit 8b01efd

Browse files
authored
Merge branch '8.19' into backport/8.19/pr-251297
2 parents a32fbb3 + a38cea4 commit 8b01efd

86 files changed

Lines changed: 3595 additions & 266 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.buildkite/scripts/lifecycle/pre_build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ fi
3030
# Annotate ingestable meta-data (prefixed with 'ingest:')
3131
if [[ "${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-}" != "" ]]; then # if we're in a PR build
3232
# GITHUB_PR_DRAFT is set by our pr build trigger bot
33-
buildkite-agent meta-data set "ingest:is_draft_pr" "${GITHUB_PR_DRAFT:-}"
33+
buildkite-agent meta-data set "ingest:is_draft_pr" "${GITHUB_PR_DRAFT:-false}"
3434
# GITHUB_PR_LABELS is set by our pr build trigger bot, and is a comma-separated list of labels on the PR
35-
buildkite-agent meta-data set "ingest:pr_labels" "${GITHUB_PR_LABELS:-}"
35+
if [[ -n "${GITHUB_PR_LABELS:-}" ]]; then
36+
buildkite-agent meta-data set "ingest:pr_labels" "$GITHUB_PR_LABELS"
37+
fi
3638
fi

.buildkite/scripts/steps/functional/defend_workflows.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ source .buildkite/scripts/steps/functional/common.sh
77
export JOB=kibana-defend-workflows-cypress
88
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
99

10+
source .buildkite/scripts/steps/functional/ensure_virtualbox.sh
11+
1012
echo "--- Defend Workflows Cypress tests"
1113

1214
cd x-pack/solutions/security/plugins/security_solution

.buildkite/scripts/steps/functional/defend_workflows_burn.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export JOB=kibana-defend-workflows-cypress
99

1010
buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'false'
1111

12+
source .buildkite/scripts/steps/functional/ensure_virtualbox.sh
13+
1214
echo "--- Defend Workflows Cypress tests, burning changed specs (Chrome)"
1315

1416
yarn --cwd x-pack/solutions/security/plugins/security_solution cypress:changed-specs-only

.buildkite/scripts/steps/functional/defend_workflows_serverless.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ source .buildkite/scripts/steps/functional/common.sh
77
export JOB=kibana-defend-workflows-serverless-cypress
88
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
99

10+
source .buildkite/scripts/steps/functional/ensure_virtualbox.sh
11+
1012
echo "--- Defend Workflows Cypress tests on Serverless"
1113

1214
cd x-pack/solutions/security/plugins/security_solution

.buildkite/scripts/steps/functional/defend_workflows_serverless_burn.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export JOB=kibana-defend-workflows-serverless-cypress
99

1010
buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'false'
1111

12+
source .buildkite/scripts/steps/functional/ensure_virtualbox.sh
13+
1214
echo "--- Defend Workflows Cypress tests, burning changed specs (Chrome)"
1315

1416
yarn --cwd x-pack/solutions/security/plugins/security_solution cypress:dw:serverless:changed-specs-only
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
#!/usr/bin/env bash
2+
3+
# Ensures VirtualBox is installed with working kernel modules and
4+
# exports VAGRANT_DEFAULT_PROVIDER=virtualbox.
5+
# Must be sourced (not executed) so the export propagates to the caller.
6+
7+
echo "--- Ensure VirtualBox provider"
8+
9+
_vbox_kernel_ok() {
10+
local output
11+
output=$(VBoxManage --version 2>&1)
12+
if echo "$output" | grep -qi "kernel module is not loaded"; then
13+
return 1
14+
fi
15+
return 0
16+
}
17+
18+
_ensure_vbox_modules() {
19+
sudo modprobe vboxdrv 2>/dev/null && return 0
20+
sudo /sbin/vboxconfig 2>/dev/null && return 0
21+
sudo /sbin/rcvboxdrv setup 2>/dev/null && return 0
22+
return 1
23+
}
24+
25+
_print_vbox_diagnostics() {
26+
echo "VirtualBox diagnostics:"
27+
echo " vagrant: $(vagrant --version 2>/dev/null || echo 'not found')"
28+
echo " VBoxManage: $(which VBoxManage 2>/dev/null || echo 'not in PATH')"
29+
echo " VBoxManage --version: $(VBoxManage --version 2>&1 || echo 'failed')"
30+
echo " vbox modules: $(lsmod 2>/dev/null | grep vbox || echo 'none loaded')"
31+
echo " vbox packages: $(dpkg -l 2>/dev/null | grep -i virtualbox | awk '{print $2, $3}' || echo 'none')"
32+
echo " kernel: $(uname -r)"
33+
echo " dkms status: $(dkms status 2>/dev/null || echo 'dkms not available')"
34+
}
35+
36+
_upgrade_to_vbox71() {
37+
echo "Upgrading to VirtualBox 7.1 (supports newer kernels)..."
38+
39+
# Oracle's repo is pre-configured on CI images; install 7.1 from there
40+
if apt-cache show virtualbox-7.1 &>/dev/null; then
41+
echo "virtualbox-7.1 available from Oracle repo, installing..."
42+
sudo apt-get install -y --no-install-recommends virtualbox-7.1 2>&1
43+
return $?
44+
fi
45+
46+
# If Oracle repo isn't configured, add it
47+
echo "Adding Oracle VirtualBox repository..."
48+
local codename
49+
codename=$(lsb_release -cs 2>/dev/null || echo "noble")
50+
wget -qO- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes -o /usr/share/keyrings/oracle-virtualbox-2016.gpg
51+
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian ${codename} contrib" | \
52+
sudo tee /etc/apt/sources.list.d/virtualbox-oracle.list
53+
sudo apt-get update -qq
54+
sudo apt-get install -y --no-install-recommends virtualbox-7.1 2>&1
55+
return $?
56+
}
57+
58+
_ensure_virtualbox() {
59+
# 1. Already working — nothing to do
60+
if command -v VBoxManage &>/dev/null && _vbox_kernel_ok; then
61+
echo "VirtualBox ready: $(VBoxManage --version 2>&1 | tail -1)"
62+
return 0
63+
fi
64+
65+
# 2. VBoxManage exists but kernel module not loaded — try loading
66+
if command -v VBoxManage &>/dev/null; then
67+
echo "VBoxManage found but kernel module not loaded, attempting recovery..."
68+
if _ensure_vbox_modules && _vbox_kernel_ok; then
69+
echo "VirtualBox kernel module recovered: $(VBoxManage --version 2>&1 | tail -1)"
70+
return 0
71+
fi
72+
73+
# Modules couldn't load — likely kernel too new for current VBox version.
74+
# Upgrade to 7.1 which supports newer kernels.
75+
echo "Kernel module build failed for current VirtualBox, upgrading to 7.1..."
76+
if _upgrade_to_vbox71 && _ensure_vbox_modules && _vbox_kernel_ok; then
77+
echo "VirtualBox 7.1 installed and ready: $(VBoxManage --version 2>&1 | tail -1)"
78+
return 0
79+
fi
80+
else
81+
# 3. VBoxManage not found at all — install 7.1 from scratch
82+
echo "VirtualBox not found, installing 7.1..."
83+
sudo apt-get update -qq
84+
if _upgrade_to_vbox71 && _ensure_vbox_modules && _vbox_kernel_ok; then
85+
echo "VirtualBox 7.1 installed and ready: $(VBoxManage --version 2>&1 | tail -1)"
86+
return 0
87+
fi
88+
fi
89+
90+
_print_vbox_diagnostics
91+
echo "ERROR: VirtualBox provider could not be made available"
92+
return 1
93+
}
94+
95+
_ensure_virtualbox
96+
export VAGRANT_DEFAULT_PROVIDER=virtualbox

.buildkite/scripts/steps/scout_update_metadata.sh

100644100755
File mode changed.

.github/CODEOWNERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,8 +1473,6 @@ x-pack/solutions/observability/plugins/observability/server/lib/esql_extensions
14731473
/x-pack/solutions/observability/test/api_integration/apm/ @elastic/obs-presentation-team
14741474
/x-pack/solutions/observability/test/apm_cypress/ @elastic/obs-presentation-team
14751475
/src/apm.js @elastic/kibana-core @vigneshshanmugam
1476-
/src/platform/packages/shared/kbn-utility-types/src/dot.ts @dgieselaar
1477-
/src/platform/packages/shared/kbn-utility-types/src/dot_test.ts @dgieselaar
14781476
/x-pack/solutions/observability/test/serverless/api_integration/test_suites/apm_api_integration/ @elastic/obs-presentation-team
14791477
/x-pack/solutions/observability/test/apm_api_integration/ @elastic/obs-presentation-team
14801478
#CC# /src/plugins/apm_oss/ @elastic/apm-ui

.moon/tasks/node.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ fileGroups:
55
default:
66
- '**/*'
77
production: [ ]
8-
9-
tasks: {}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1898,7 +1898,7 @@
18981898
"postcss-scss": "4.0.9",
18991899
"prettier": "2.8.8",
19001900
"proxy": "2.1.1",
1901-
"qs": "6.14.1",
1901+
"qs": "6.14.2",
19021902
"react-refresh": "0.18.0",
19031903
"react-test-renderer": "17.0.2",
19041904
"recast": "0.23.9",

0 commit comments

Comments
 (0)