Skip to content

Use Bazel for Kibana builds #69706

@mistic

Description

@mistic

We are planning to slowly introduce and using Bazel as our main build tool.
That issues summarises the steps we plan to take during the process.

Phase 1 (COMPLETED) #79757 #92220

Goals

  • Introduce the first building blocks in order to be possible to use bazel into the project
  • Build packages/** using Bazel
  • Share built code on the CI for packages/** with subsequent CI builds and local developer installations

Expected Benefits

  • Little reduction on CI build times because in the majority of the times packages won't need to be rebuilt
  • Reduce bootstrap time on local development installations specially when switching between branches
  • Introducing the benefits on Bazel for packages/**: reproducible and correct builds that only rebuilds when the inputs changes

Rough Planned Timeline

We are planning to land the phase 1 between 7.13-7.14

Steps

Phase 2 (ON GOING) #104519

Rough Planned Timeline

We are planning to land the phase 2 between 8.0-8.1

Goals

  • Improve the developer experience on the features introduced on the previous Phase 1
  • Enable the benefit of the remote cache for the majority of the developers
  • Remove legacy code from the previous bootstrap process
  • Simplify Windows development

Expected Benefits

  • Further reduction in the bootstrap time for packages
  • Improve running time of unit tests for packages

Steps

Phase 3

Goals

  • Migrate production build system to Bazel (rpm, deb, Docker, tar, zip)
  • Migrate plugins to build with Bazel (keep both legacy and Bazel build systems running in parallel). We will continue to use the legacy build system until all plugins have been migrated and will cut over.
  • Builds will no longer copy to target directories, which was used in Phase 1.
  • babel/register can be completely removed since server-side code will be pre-built.
  • Server restarts can be optimized to only restart on non-type changes as identified by Bazel.
  • Open questions:
    • Should we move scripts to run through Bazel, or update the existing scripts to reference Bazel dist?

Phase 4

Goals

  • Improve identification of when tests should be ran - no more need to explicitly check docs.
  • Remove kbn/pm, or simplify enough to remove build step
  • Implement CI automated merging queue to run unit tests prior to merging

Metadata

Metadata

Assignees

Labels

ReleaseStatusItem of high enough importance that it should be called out in release status meetingsTeam:OperationsPlatform Operations Team t//buildchoreepic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions