Skip to content

[Build] Split tasks by arch for increased parallelism#223471

Merged
Ikuni17 merged 18 commits intoelastic:mainfrom
Ikuni17:build/split-arch-tasks
Jul 7, 2025
Merged

[Build] Split tasks by arch for increased parallelism#223471
Ikuni17 merged 18 commits intoelastic:mainfrom
Ikuni17:build/split-arch-tasks

Conversation

@Ikuni17
Copy link
Copy Markdown
Contributor

@Ikuni17 Ikuni17 commented Jun 11, 2025

Summary

Closes elastic/kibana-operations#110

This is a continuation of #217929. Previously a Task created two artifacts of a specific flavor, one for x64 and one for ARM64. These were still running serially, even though the Task itself was parallelized. This PR splits each architecture into its own Task so we can increase parallelism. The result is a 14% further decrease in time taken for the build step; 53 min down to 46 min. Between the two PRs, the artifact build time is reduced 57%!

Testing

https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6555

Next steps

  • Moving the ARM artifact builds to an ARM native machine would likely see the next biggest reduction because they take 2-3 times longer than their x86 counterparts. Though this would likely be a decent amount of work.
  • Some of the global tasks could be grouped into parallel tasks, but there is some dependency between those tasks and the gains would be minimal.

@Ikuni17 Ikuni17 self-assigned this Jun 11, 2025
@Ikuni17 Ikuni17 added Team:Operations Kibana-Operations Team release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor labels Jun 11, 2025
@Ikuni17 Ikuni17 force-pushed the build/split-arch-tasks branch from 08f5103 to c133402 Compare June 11, 2025 23:02
@Ikuni17
Copy link
Copy Markdown
Contributor Author

Ikuni17 commented Jun 11, 2025

buildkite test this

@Ikuni17
Copy link
Copy Markdown
Contributor Author

Ikuni17 commented Jun 13, 2025

buildkite test this

@Ikuni17 Ikuni17 marked this pull request as ready for review June 13, 2025 20:27
@Ikuni17 Ikuni17 requested a review from a team as a code owner June 13, 2025 20:28
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@Ikuni17 Ikuni17 enabled auto-merge (squash) June 13, 2025 20:28
for (const [, dockerTemplate] of Object.entries(dockerTemplates)) {
await write(resolve(dockerBuildDir, dockerTemplate.name), dockerTemplate.generator(scope));
let filename: string;
if (!dockerTemplate.name.includes('kibana.yml') && flags.architecture === 'aarch64') {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running in parallel, an image flavor will have a race condition since both architectures are writing to the same build_docker.sh and Dockerfile. The result is two of the same architectures artifact. So now we're creating the files for each architecture.

if (options.createDebPackage) {
// control w/ --deb or --skip-os-packages
artifactTasks.push(Tasks.CreateDebPackage);
artifactTasks.push(Tasks.CreateDebPackageX64);
Copy link
Copy Markdown
Member

@delanni delanni Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this mean, that we're always building both platforms (i.e.: --all-platforms even without adding this flag)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --all-platforms flag is only related to building the archives and in some instances we're forcing it to true depending on other flags. All of the Tasks are building both platforms already, without any control via flags. Currently, one task creates two artifacts serially. So we're splitting that task up by platform to let them run in parallel.

(dockerTag ? dockerTag : version) + (dockerTagQualifier ? '-' + dockerTagQualifier : '');
const dockerTargetName = `${imageTag}${imageFlavor}:${tag}`;
const dockerArchitecture = architecture === 'aarch64' ? 'linux/arm64' : 'linux/amd64';
const dockerfileName = architecture === 'aarch64' ? 'Dockerfile.arm64' : 'Dockerfile';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't these be Dockerfile.arm64 and Dockerfile.x64 for symmetry?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ikuni17
Copy link
Copy Markdown
Contributor Author

Ikuni17 commented Jul 7, 2025

💚 All backports created successfully

Status Branch Result
9.0
8.19
8.18
8.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 7, 2025
…#226889)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Build] Split tasks by arch for increased parallelism
(#223471)](#223471)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"Ikuni17@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-07T19:24:32Z","message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:prev-major","backport:current-major","v9.2.0"],"title":"[Build]
Split tasks by arch for increased
parallelism","number":223471,"url":"https://github.com/elastic/kibana/pull/223471","mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223471","number":223471,"mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}}]}]
BACKPORT-->

Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 8, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

7 similar comments
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

Ikuni17 added a commit that referenced this pull request Jul 17, 2025
#226892)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Build] Split tasks by arch for increased parallelism
(#223471)](#223471)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"Ikuni17@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-07T19:24:32Z","message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:prev-major","backport:current-major","v9.2.0"],"title":"[Build]
Split tasks by arch for increased
parallelism","number":223471,"url":"https://github.com/elastic/kibana/pull/223471","mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223471","number":223471,"mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},{"url":"https://github.com/elastic/kibana/pull/226889","number":226889,"branch":"9.1","state":"OPEN"}]}]
BACKPORT-->
Ikuni17 added a commit that referenced this pull request Jul 17, 2025
#226895)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Build] Split tasks by arch for increased parallelism
(#223471)](#223471)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"Ikuni17@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-07T19:24:32Z","message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:prev-major","backport:current-major","v9.2.0"],"title":"[Build]
Split tasks by arch for increased
parallelism","number":223471,"url":"https://github.com/elastic/kibana/pull/223471","mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223471","number":223471,"mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},{"url":"https://github.com/elastic/kibana/pull/226889","number":226889,"branch":"9.1","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

1 similar comment
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @Ikuni17

@mistic mistic added v8.17.10 and removed v8.17.9 labels Jul 22, 2025
Ikuni17 added a commit that referenced this pull request Jul 22, 2025
…#226890)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Build] Split tasks by arch for increased parallelism
(#223471)](#223471)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"Ikuni17@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-07T19:24:32Z","message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:prev-major","backport:current-major","v9.2.0"],"title":"[Build]
Split tasks by arch for increased
parallelism","number":223471,"url":"https://github.com/elastic/kibana/pull/223471","mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223471","number":223471,"mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},{"url":"https://github.com/elastic/kibana/pull/226889","number":226889,"branch":"9.1","state":"OPEN"}]}]
BACKPORT-->
Ikuni17 added a commit that referenced this pull request Jul 22, 2025
#226894)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Build] Split tasks by arch for increased parallelism
(#223471)](#223471)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"Ikuni17@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-07-07T19:24:32Z","message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:prev-major","backport:current-major","v9.2.0"],"title":"[Build]
Split tasks by arch for increased
parallelism","number":223471,"url":"https://github.com/elastic/kibana/pull/223471","mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/223471","number":223471,"mergeCommit":{"message":"[Build]
Split tasks by arch for increased parallelism (#223471)\n\n##
Summary\nCloses elastic/kibana-operations#110\n\nThis is a continuation
of #217929. Previously a `Task` created two\nartifacts of a specific
flavor, one for `x64` and one for `ARM64`. These\nwere still running
serially, even though the `Task` itself was\nparallelized. This PR
splits each architecture into its own `Task` so we\ncan increase
parallelism. The result is a 14% further decrease in time\ntaken for the
build step; 53 min down to 46 min. Between the two PRs,\nthe artifact
build time is reduced 57%!\n\n###
Testing\nhttps://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413\n\n###
Next steps\n- Moving the ARM artifact builds to an ARM native machine
would likely\nsee the next biggest reduction because they take 2-3 times
longer than\ntheir x86 counterparts. Though this would likely be a
decent amount of\nwork.\n- Some of the `global` tasks could be grouped
into parallel tasks, but\nthere is some dependency between those tasks
and the gains would
be\nminimal.","sha":"b51fab26002ede310821ef34f692ef21bc7a48c8"}},{"url":"https://github.com/elastic/kibana/pull/226889","number":226889,"branch":"9.1","state":"OPEN"}]}]
BACKPORT-->
@kibanamachine kibanamachine added v8.18.4 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Jul 22, 2025
kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
## Summary
Closes elastic/kibana-operations#110

This is a continuation of elastic#217929. Previously a `Task` created two
artifacts of a specific flavor, one for `x64` and one for `ARM64`. These
were still running serially, even though the `Task` itself was
parallelized. This PR splits each architecture into its own `Task` so we
can increase parallelism. The result is a 14% further decrease in time
taken for the build step; 53 min down to 46 min. Between the two PRs,
the artifact build time is reduced 57%!

### Testing
https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/6413

### Next steps
- Moving the ARM artifact builds to an ARM native machine would likely
see the next biggest reduction because they take 2-3 times longer than
their x86 counterparts. Though this would likely be a decent amount of
work.
- Some of the `global` tasks could be grouped into parallel tasks, but
there is some dependency between those tasks and the gains would be
minimal.
@Ikuni17 Ikuni17 deleted the build/split-arch-tasks branch October 24, 2025 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Operations Kibana-Operations Team v8.17.10 v8.18.4 v8.19.0 v9.0.4 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants