Skip to content

Add pinot-bom module for external consumers#18540

Open
anshul98ks123 wants to merge 2 commits into
apache:masterfrom
anshul98ks123:publish-pinot-bom
Open

Add pinot-bom module for external consumers#18540
anshul98ks123 wants to merge 2 commits into
apache:masterfrom
anshul98ks123:publish-pinot-bom

Conversation

@anshul98ks123
Copy link
Copy Markdown
Contributor

@anshul98ks123 anshul98ks123 commented May 20, 2026

Issue

External integrators of Apache Pinot (downstream forks, vendors, embedded users) that inherit from org.apache.pinot:pinot via <parent> cannot pin all pinot-* versions through a single managed entry. There is no published BOM artifact today; consumers have to either:

  • Inherit from <parent>org.apache.pinot:pinot</parent> and accept that ${project.version} inside the parent's <dependencyManagement> re-interpolates against the child's effective POM (leaking the consumer's own ${revision} into Pinot dep coordinates and breaking resolution against Maven Central / mirrors), or
  • Hand-maintain an explicit <version>${apache.pinot.version}</version> override for every new pinot-* module the parent adds.

Every new module (e.g., pinot-sql-ddl, pinot-udf-test, pinot-materialized-view) re-breaks downstream CI until the override list catches up.

The StarTree fork has hit this three times in the last five days alone — see startree-pinot#3309 (added overrides for pinot-sql-ddl + pinot-udf-test) and startree-pinot#3338 (added an override for pinot-materialized-view, the module introduced in #18528).

Fix

Add a new pinot-bom module that publishes a standalone Bill-of-Materials POM listing every published pinot-* artifact at a hardcoded literal version. Downstream consumers import it via <scope>import</scope>:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-bom</artifactId>
      <version>1.6.0-SNAPSHOT</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

The BOM uses literal versions (not ${project.version}) so the published POM does not interpolate against the importer's project. Every new pinot-* module added in subsequent releases is picked up via the BOM with no consumer-side patch required.

The existing <dependencyManagement> block in the parent pom.xml is left untouched — Pinot's own modules continue to inherit it via <parent> exactly as before. The BOM is purely additive.

Testing

./mvnw install -pl pinot-bom -DskipTests
# Verify the installed pom has literal versions, not ${project.version}:
grep '<version>' ~/.m2/repository/org/apache/pinot/pinot-bom/<version>/pinot-bom-*.pom | head
  • pinot-bom builds + installs locally.
  • Installed POM contains literal version strings for every pinot-* dep (verified via grep).
  • Existing pinot-* modules unaffected (no change to their POMs or to the root reactor besides adding the new module entry).
  • Smoke test from a downstream consumer that imports the BOM via <scope>import</scope> — see companion PR startreedata/startree-pinot#3339.

Adds a Maven BOM (Bill of Materials) module that aggregates the
${project.version} pinning of every pinot-* artifact already declared in
the parent POM's <dependencyManagement>. External consumers (downstream
forks, integrators) can now import pinot-bom via <scope>import</scope>
and pick up every Pinot module version through a single managed entry,
instead of either inheriting from pinot's <parent> (which leaks the
consumer's ${revision} into pinot-* coordinates) or copy-pasting per-
artifact overrides each time a new pinot-* module is added.

Usage on the consumer side:

    <dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>org.apache.pinot</groupId>
          <artifactId>pinot-bom</artifactId>
          <version>1.6.0-SNAPSHOT</version>
          <type>pom</type>
          <scope>import</scope>
        </dependency>
      </dependencies>
    </dependencyManagement>

Under <scope>import</scope> Maven fully interpolates the BOM at import
time, so ${project.version} resolves to the BOM's own version, not the
importer's. The 71 existing pinot-* DM entries in the parent POM stay as
they are -- Pinot's own modules continue to inherit them via <parent>
unchanged. No functional change for the existing build.
…t publish time

Replaces the hardcoded 1.6.0-SNAPSHOT literals in every <dependencyManagement>
entry with ${project.version}, then runs flatten-maven-plugin (flattenMode=bom,
pomElements.dependencyManagement=resolve) so the published pom-bom-*.pom carries
literal resolved versions while the source POM stays version-agnostic. Future
parent-version bumps now propagate automatically without an edit to every BOM
entry.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.24%. Comparing base (005cac7) to head (d4608bd).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18540      +/-   ##
============================================
- Coverage     64.27%   64.24%   -0.04%     
  Complexity     1126     1126              
============================================
  Files          3311     3311              
  Lines        203784   203784              
  Branches      31720    31720              
============================================
- Hits         130974   130911      -63     
- Misses        62308    62371      +63     
  Partials      10502    10502              
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.24% <ø> (-0.04%) ⬇️
temurin 64.24% <ø> (-0.04%) ⬇️
unittests 64.23% <ø> (-0.04%) ⬇️
unittests1 56.71% <ø> (-0.03%) ⬇️
unittests2 35.47% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants