Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz committed Oct 31, 2024
1 parent 8ab30f5 commit ae7d52d
Show file tree
Hide file tree
Showing 3 changed files with 164 additions and 164 deletions.
120 changes: 60 additions & 60 deletions .buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ export async function pickTestGroupRunOrder() {
parallelism: unit.count,
timeout_in_minutes: 120,
key: 'jest',
agents: expandAgentQueue('n2-4-spot'),
agents: expandAgentQueue('n2-2-spot'),
retry: {
automatic: [
{ exit_status: '-1', limit: 3 },
Expand All @@ -496,65 +496,65 @@ export async function pickTestGroupRunOrder() {
},
}
: [],
integration.count > 0
? {
label: 'Jest Integration Tests',
command: getRequiredEnv('JEST_INTEGRATION_SCRIPT'),
parallelism: integration.count,
timeout_in_minutes: 120,
key: 'jest-integration',
agents: expandAgentQueue('n2-4-spot'),
retry: {
automatic: [
{ exit_status: '-1', limit: 3 },
...(JEST_CONFIGS_RETRY_COUNT > 0
? [{ exit_status: '*', limit: JEST_CONFIGS_RETRY_COUNT }]
: []),
],
},
}
: [],
functionalGroups.length
? {
group: 'FTR Configs',
key: 'ftr-configs',
depends_on: FTR_CONFIGS_DEPS,
steps: functionalGroups
.sort((a, b) =>
// if both groups are sorted by number then sort by that
typeof a.sortBy === 'number' && typeof b.sortBy === 'number'
? a.sortBy - b.sortBy
: // if both groups are sorted by string, sort by that
typeof a.sortBy === 'string' && typeof b.sortBy === 'string'
? a.sortBy.localeCompare(b.sortBy)
: // if a is sorted by number then order it later than b
typeof a.sortBy === 'number'
? 1
: -1
)
.map(
({ title, key, queue = defaultQueue }): BuildkiteStep => ({
label: title,
command: getRequiredEnv('FTR_CONFIGS_SCRIPT'),
timeout_in_minutes: 90,
agents: expandAgentQueue(queue),
env: {
FTR_CONFIG_GROUP_KEY: key,
...ftrExtraArgs,
...envFromlabels,
},
retry: {
automatic: [
{ exit_status: '-1', limit: 3 },
...(FTR_CONFIGS_RETRY_COUNT > 0
? [{ exit_status: '*', limit: FTR_CONFIGS_RETRY_COUNT }]
: []),
],
},
})
),
}
: [],
// integration.count > 0
// ? {
// label: 'Jest Integration Tests',
// command: getRequiredEnv('JEST_INTEGRATION_SCRIPT'),
// parallelism: integration.count,
// timeout_in_minutes: 120,
// key: 'jest-integration',
// agents: expandAgentQueue('n2-4-spot'),
// retry: {
// automatic: [
// { exit_status: '-1', limit: 3 },
// ...(JEST_CONFIGS_RETRY_COUNT > 0
// ? [{ exit_status: '*', limit: JEST_CONFIGS_RETRY_COUNT }]
// : []),
// ],
// },
// }
// : [],
// functionalGroups.length
// ? {
// group: 'FTR Configs',
// key: 'ftr-configs',
// depends_on: FTR_CONFIGS_DEPS,
// steps: functionalGroups
// .sort((a, b) =>
// // if both groups are sorted by number then sort by that
// typeof a.sortBy === 'number' && typeof b.sortBy === 'number'
// ? a.sortBy - b.sortBy
// : // if both groups are sorted by string, sort by that
// typeof a.sortBy === 'string' && typeof b.sortBy === 'string'
// ? a.sortBy.localeCompare(b.sortBy)
// : // if a is sorted by number then order it later than b
// typeof a.sortBy === 'number'
// ? 1
// : -1
// )
// .map(
// ({ title, key, queue = defaultQueue }): BuildkiteStep => ({
// label: title,
// command: getRequiredEnv('FTR_CONFIGS_SCRIPT'),
// timeout_in_minutes: 90,
// agents: expandAgentQueue(queue),
// env: {
// FTR_CONFIG_GROUP_KEY: key,
// ...ftrExtraArgs,
// ...envFromlabels,
// },
// retry: {
// automatic: [
// { exit_status: '-1', limit: 3 },
// ...(FTR_CONFIGS_RETRY_COUNT > 0
// ? [{ exit_status: '*', limit: FTR_CONFIGS_RETRY_COUNT }]
// : []),
// ],
// },
// })
// ),
// }
// : [],
].flat()
);
}
206 changes: 103 additions & 103 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,83 +7,83 @@ steps:

- wait

- command: .buildkite/scripts/steps/build_kibana.sh
label: Build Kibana Distribution and Plugins
agents:
machineType: n2-standard-16
preemptible: true
key: build
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '-1'
limit: 3
# - command: .buildkite/scripts/steps/build_kibana.sh
# label: Build Kibana Distribution and Plugins
# agents:
# machineType: n2-standard-16
# preemptible: true
# key: build
# if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''"
# timeout_in_minutes: 90
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3

- command: .buildkite/scripts/steps/quick_checks.sh
label: 'Quick Checks'
agents:
machineType: n2-highcpu-8
preemptible: true
key: quick_checks
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
# - command: .buildkite/scripts/steps/quick_checks.sh
# label: 'Quick Checks'
# agents:
# machineType: n2-highcpu-8
# preemptible: true
# key: quick_checks
# timeout_in_minutes: 60
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3

- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
agents:
machineType: n2-standard-16
preemptible: true
key: linting
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
# - command: .buildkite/scripts/steps/lint.sh
# label: 'Linting'
# agents:
# machineType: n2-standard-16
# preemptible: true
# key: linting
# timeout_in_minutes: 60
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
machineType: n2-standard-32
preemptible: true
key: linting_with_types
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
# - command: .buildkite/scripts/steps/lint_with_types.sh
# label: 'Linting (with types)'
# agents:
# machineType: n2-standard-32
# preemptible: true
# key: linting_with_types
# timeout_in_minutes: 60
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3

- command: .buildkite/scripts/steps/check_types.sh
label: 'Check Types'
agents:
machineType: c4-standard-4
diskType: 'hyperdisk-balanced'
preemptible: true
spotZones: us-central1-a,us-central1-b,us-central1-c
key: check_types
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
# - command: .buildkite/scripts/steps/check_types.sh
# label: 'Check Types'
# agents:
# machineType: c4-standard-4
# diskType: 'hyperdisk-balanced'
# preemptible: true
# spotZones: us-central1-a,us-central1-b,us-central1-c
# key: check_types
# timeout_in_minutes: 60
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3

- wait
# - wait

- command: .buildkite/scripts/steps/ci_stats_ready.sh
label: Mark CI Stats as ready
agents:
machineType: n2-standard-2
timeout_in_minutes: 10
depends_on:
- build
- build_api_docs
retry:
automatic:
- exit_status: '*'
limit: 1
# - command: .buildkite/scripts/steps/ci_stats_ready.sh
# label: Mark CI Stats as ready
# agents:
# machineType: n2-standard-2
# timeout_in_minutes: 10
# depends_on:
# - build
# - build_api_docs
# retry:
# automatic:
# - exit_status: '*'
# limit: 1

- command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh
label: 'Pick Test Group Run Order'
Expand All @@ -99,37 +99,37 @@ steps:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
key: checks
agents:
machineType: n2-standard-2
preemptible: true
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
# - command: .buildkite/scripts/steps/checks.sh
# label: 'Checks'
# key: checks
# agents:
# machineType: n2-standard-2
# preemptible: true
# timeout_in_minutes: 60
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3

- command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh
label: 'Check OAS Snapshot'
agents:
machineType: n2-standard-4
preemptible: true
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3
# - command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh
# label: 'Check OAS Snapshot'
# agents:
# machineType: n2-standard-4
# preemptible: true
# timeout_in_minutes: 60
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3

- command: .buildkite/scripts/steps/api_docs/build_api_docs.sh
label: 'Build API Docs'
agents:
machineType: n2-standard-4
preemptible: true
key: build_api_docs
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '-1'
limit: 3
# - command: .buildkite/scripts/steps/api_docs/build_api_docs.sh
# label: 'Build API Docs'
# agents:
# machineType: n2-standard-4
# preemptible: true
# key: build_api_docs
# timeout_in_minutes: 90
# retry:
# automatic:
# - exit_status: '-1'
# limit: 3
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/test/jest_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ while read -r config; do
# --trace-warnings to debug
# Node.js process-warning detected:
# Warning: Closing file descriptor 24 on garbage collection
cmd="NODE_OPTIONS=\"--max-old-space-size=12288 --trace-warnings\" node ./scripts/jest --config=\"$config\" $parallelism --coverage=false --passWithNoTests"
cmd="NODE_OPTIONS=\"--max-old-space-size=6144 --trace-warnings\" node ./scripts/jest --config=\"$config\" $parallelism --coverage=false --passWithNoTests"
echo "actual full command is:"
echo "$cmd"
echo ""
Expand Down

0 comments on commit ae7d52d

Please sign in to comment.