Skip to content

feat(sources): use rpmdev-bumpspec for release updates - #349

Open
Thien Trung Vuong (trungams) wants to merge 3 commits into
microsoft:mainfrom
trungams:tvuong/bumpspec-integration
Open

feat(sources): use rpmdev-bumpspec for release updates#349
Thien Trung Vuong (trungams) wants to merge 3 commits into
microsoft:mainfrom
trungams:tvuong/bumpspec-integration

Conversation

@trungams

Copy link
Copy Markdown
Member

Introduce rpmdev-bumpspec into the current static release bump logic. The existing bump count and synthetic history remain unchanged and will be updated with follow-up PRs with lock files removal/changelog generation rework.

For every rpmdev-bumpspec invocation, we verify the bump by evaluating the source package EVR before and after the operation and requiring the Release field to strictly increase according to RPM ordering.

Keep rpmdev-bumpspec external while providing one deterministic host operation for release updates. The runner isolates user-specific state, forwards the effective RPM context, and validates each mutation by comparing structured source EVRs with the host RPM implementation.

Treat every operation as a transaction: command, parsing, identity, and ordering failures restore the original spec bytes. Focused in-memory tests cover runtime discovery, sidecar context, build macros, target propagation, strict output contracts, RPM ordering, and rollback.
Keep fingerprint-derived synthetic changes as the source of N while delegating non-autorelease Release and changelog updates to the transactional rpmdev-bumpspec runner. Build, render, and prepare-sources share the same host operation and available build target context.

Remove the custom static-integer parser and release-tag overlay. Each requested bump must produce a strictly newer source Release, and any failed operation restores the complete pre-sequence spec while existing manual and autorelease modes remain unchanged.
Describe the tested host rpmdev-bumpspec workflow, fixed transitional changelog metadata, and strict source-EVR acceptance checks. Clarify that conditional and fallback forms are attempted natively but ineffective mutations fail and restore the original spec.

Keep emitted component guidance and configuration comments aligned with the implementation while documenting the existing manual and autorelease exceptions and the prepare-sources opt-out.
Copilot AI lite review requested due to automatic review settings September 9, 2026 19:33

Copilot AI left a comment

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.

🟡 Changes recommended

An unresolved moderate issue can override an explicit dist macro and invalidate release-bump verification.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR replaces static release arithmetic with host-side rpmdev-bumpspec operations, RPM EVR validation, and rollback support.

Changes:

  • Integrates bumpspec release updates into render, source preparation, and build flows.
  • Adds tests for execution, validation, rollback, and release modes.
  • Updates documentation and agent guidance.
File summaries
File Summary
internal/projectconfig/component.go Updates release-mode documentation.
internal/app/azldev/core/sources/sourceprep.go Adds bumpspec configuration and integration.
internal/app/azldev/core/sources/release.go Applies transactional release bumps.
internal/app/azldev/core/sources/release_test.go Removes obsolete arithmetic tests.
internal/app/azldev/core/sources/release_internal_test.go Tests release modes and rollback.
internal/app/azldev/core/sources/bumpspec.go Executes and validates bumpspec operations; moderate issue (2 votes): dist %{nil} can override an explicit build.defines.dist.
internal/app/azldev/core/sources/bumpspec_internal_test.go Tests bumpspec execution and EVR handling.
internal/app/azldev/cmds/component/render.go Wires bumpspec into rendering.
internal/app/azldev/cmds/component/preparesources.go Wires bumpspec into source preparation.
internal/app/azldev/cmds/component/build.go Passes architecture and macros to release handling.
internal/app/azldev/agentskill/content/comp-toml.md.tmpl Updates release configuration guidance.
internal/app/azldev/agentskill/content/build-component.md.tmpl Documents bumpspec behavior and troubleshooting.
internal/app/azldev/agentskill/agentskill_test.go Validates generated guidance.
docs/user/reference/config/components.md Documents bumpspec requirements and behavior.
Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +261 to +266
args := append(rpmdevBumpspecContextArgs(request),
"-q", "--srpm",
"--define", "dist %{nil}",
"--qf", rpmdevBumpspecEVRQueryFormat,
request.SpecPath,
)
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