Skip to content

docs: Add HLD for Bazel migration#2396

Draft
blorente wants to merge 12 commits into
sonic-net:masterfrom
blorente:blorente/add-bazel-hdl
Draft

docs: Add HLD for Bazel migration#2396
blorente wants to merge 12 commits into
sonic-net:masterfrom
blorente:blorente/add-bazel-hdl

Conversation

@blorente

@blorente blorente commented Jun 18, 2026

Copy link
Copy Markdown

Add HLD describing a potential migration to Bazel, including the changes necessary in the current build so that the migration is as un-disruptive as possible.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 18, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.


// TODO BL: Should we include a table here?

#### 4.b Migration

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

include an example of changes required to *mk to opt in

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@bocon13 I have included a more thorough example of the changes in section 7.a (formerly 7.h, but I moved it up because I thought it would be more important than anything else in section 7). Please let me know what you think!

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@blorente blorente changed the title [WIP, please don't review] docs: Add HLD for Bazel migration docs: Add HLD for Bazel migration Jun 26, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

We have already implemented large parts of this document as proofs of concept.

Please see these publications about our work:
- Talk from OCP EMEA Summit 2026: https://www.youtube.com/watch?v=uSKCNDWuXjc

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

add a few more links

Comment thread doc/bazel/bazel_migration_hld.md Outdated
Comment thread doc/bazel/bazel_migration_hld.md Outdated
Comment thread doc/bazel/bazel_migration_hld.md Outdated

The community can use this period to experiment with Bazel, adopt it into their own builds, and generally gather information on whether this is a net benefit.

After the November release, the community will face a decision point: Should we adopt Bazel fully?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what does this mean?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should Bazel become a first class build system?

What does that mean?

  • bazel may be the only option for some components (already true today for components like p4rt)
  • bazel will handle more of dependency graph for these components (sonic deps might also need to be converted to bazel e.g. sonic-utils, py-common)
  • reasonable build performance requires basic bazel infra (i.e. local cache, remote cache)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

reframe phase 1 around trial of build and bazel infra

Comment thread doc/bazel/bazel_migration_hld.md
Comment thread doc/bazel/bazel_migration_hld.md Outdated
Comment thread doc/bazel/bazel_migration_hld.md Outdated
Comment thread doc/bazel/bazel_migration_hld.md Outdated
Comment thread doc/bazel/bazel_migration_hld.md Outdated
Comment thread doc/bazel/bazel_migration_hld.md
Comment thread doc/bazel/bazel_migration_hld.md Outdated
Comment thread doc/bazel/bazel_migration_hld.md Outdated
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@blorente blorente force-pushed the blorente/add-bazel-hdl branch from 66cba30 to a59a8a8 Compare June 30, 2026 11:37
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

blorente added 12 commits July 13, 2026 19:02
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
… sections

Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
Signed-off-by: Borja Lorente <blorente.me@gmail.com>
@blorente blorente force-pushed the blorente/add-bazel-hdl branch from 3c6c7ce to fdd5055 Compare July 13, 2026 18:03
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants