Skip to content

Add release schedule metadata to Node.js inventory#1330

Closed
colincasey wants to merge 13 commits intomainfrom
ccasey/inventory-metadata
Closed

Add release schedule metadata to Node.js inventory#1330
colincasey wants to merge 13 commits intomainfrom
ccasey/inventory-metadata

Conversation

@colincasey
Copy link
Copy Markdown
Contributor

@colincasey colincasey commented Mar 20, 2026

Summary

  • Adds release schedule fetching to the inventory updater xtask
  • Inventory output uses [[releases]] format from libherokubuildpack's Schedule type
  • Each release entry includes requirement (e.g., v24), end_of_life (native TOML date), and inline metadata (start, lts, maintenance dates)
  • Releases sorted descending by version (v26, v25, ..., v0.12, v0.10, v0.8)
  • from_inventory falls back to old format for migration

Stacked on #1328

Test plan

  • cargo clippy --all-targets -- --deny warnings passes
  • cargo test passes
  • Inventory format verified ([[releases]] with inline metadata tables, descending order)
  • Xtask successfully regenerates inventory with schedule

W-21451605

@colincasey colincasey self-assigned this Mar 20, 2026
@colincasey colincasey marked this pull request as ready for review March 20, 2026 18:34
@colincasey colincasey requested a review from a team as a code owner March 20, 2026 18:34
Comment thread crates/xtask-update-nodejs-inventory/src/node_releases.rs Outdated
Comment thread crates/xtask-update-nodejs-inventory/src/node_releases.rs Outdated
Comment thread crates/xtask-update-nodejs-inventory/src/output.rs
Comment thread crates/xtask-update-nodejs-inventory/src/output.rs Outdated
Comment thread crates/nodejs-data/src/lib.rs Outdated
Comment thread crates/xtask-update-nodejs-inventory/src/node_releases.rs Outdated
Comment thread crates/nodejs-data/src/lib.rs Outdated
Comment thread crates/xtask-update-nodejs-inventory/src/output.rs Outdated
@runesoerensen
Copy link
Copy Markdown
Contributor

runesoerensen commented Mar 22, 2026

I took a stab at implementing this with a slightly different approach #1332 -- mostly to explore a solution that might work well with the Inventory logic / provides some basic plumbing that could be shared :)

Comment thread crates/xtask-update-nodejs-inventory/src/output.rs Outdated
@colincasey colincasey force-pushed the ccasey/inventory-metadata branch 2 times, most recently from 6d4d80e to b006d66 Compare April 1, 2026 19:38
Comment thread inventory/nodejs.toml
@colincasey colincasey force-pushed the ccasey/nodejs-data-crate branch from fbc651d to 5fad153 Compare April 2, 2026 18:56
@colincasey colincasey force-pushed the ccasey/inventory-metadata branch from b006d66 to 7199597 Compare April 2, 2026 18:56
@colincasey colincasey force-pushed the ccasey/nodejs-data-crate branch from 5fad153 to 0aac35d Compare April 2, 2026 20:01
@colincasey colincasey force-pushed the ccasey/inventory-metadata branch from 7199597 to 09b78f2 Compare April 2, 2026 20:01
Comment on lines +284 to +291
// Special cases: development releases that don't have their
// own schedule entries. v0.10 also covers v0.9.x, and
// v0.12 also covers v0.11.x.
match minor {
10 => version.minor() == 9,
12 => version.minor() == 11,
_ => false,
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the point of this mapping? Why are we matching v0.9 and v0.11 artifacts to other releases?

It doesn't seem like there's any real value in resolving inacurate release data, presumably to show warnings for unstable/development releases that reached end of life over a decade ago (and that, as far as I can tell, no-one are actually using based on Honeycomb data)?

Replace local `src/utils/vrs.rs` module with shared types from the
`nodejs-data` crate. Renames `Requirement` to `Range` throughout and
re-exports `NodejsArtifact`/`NodejsInventory` from the shared crate.
Removes the `DefaultNodeRequirement` wrapper since `Range` now captures
the original string in its Display impl.
…mStr for NodejsReleaseLine

Switch libcnb/libherokubuildpack deps from the add-release-schedule-module
branch back to published =0.30.3 crates. Implement release schedule types
directly in nodejs-data instead of depending on upstream schedule module.
Add FromStr impl for NodejsReleaseLine and fix test compilation errors.
…tory

Adapt xtask to use BTreeMap-based NodejsReleaseSchedule, remove toml_edit
dependency for inline table formatting, fix sha2 version mismatch, and
regenerate inventory with the new [schedule.vN] table format.
@colincasey colincasey force-pushed the ccasey/inventory-metadata branch from 09b78f2 to bdcf6f2 Compare April 6, 2026 16:35
@colincasey colincasey force-pushed the ccasey/nodejs-data-crate branch from 0aac35d to b40843b Compare April 6, 2026 16:35
Base automatically changed from ccasey/nodejs-data-crate to main April 7, 2026 18:51
@colincasey colincasey closed this Apr 7, 2026
@colincasey colincasey deleted the ccasey/inventory-metadata branch April 7, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants