Skip to content

feat: Require components to opt out of auto release calculation#100

Merged
dmcilvaney merged 3 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/skip_manual_release_calcs
Apr 18, 2026
Merged

feat: Require components to opt out of auto release calculation#100
dmcilvaney merged 3 commits intomicrosoft:mainfrom
dmcilvaney:damcilva/skip_manual_release_calcs

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

Instead of failing unexpectedly, force all packages to either use auto release, or explicitly opt out of it.

Copilot AI review requested due to automatic review settings April 15, 2026 03:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds an explicit component-level setting to control whether azldev auto-manages RPM Release, and updates release bumping logic/tests/docs to require an explicit opt-out for non-standard Release values.

Changes:

  • Introduces release-calculation (auto|manual) in component config + schema/docs.
  • Updates release bumping behavior to no-op for manual and to error on non-standard Release under auto.
  • Adjusts/extends tests and schema snapshots to cover the new behavior.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
schemas/azldev.schema.json Adds release-calculation property to generated schema.
scenario/snapshots/TestSnapshots_config_generate-schema_stdout_1.snap Updates schema snapshot output for new field.
scenario/snapshots/TestSnapshotsContainer_config_generate-schema_stdout_1.snap Updates schema snapshot output for new field.
internal/projectconfig/component.go Adds ReleaseCalculation type/field + validation/schema tags; copies field in path normalization.
internal/projectconfig/component_test.go Adds validation-focused test for ReleaseCalculation.
internal/app/azldev/core/sources/release.go Switches opt-out mechanism to release-calculation=manual; updates error messaging.
internal/app/azldev/core/sources/release_test.go Removes HasUserReleaseOverlay tests (function removed).
internal/app/azldev/core/sources/release_internal_test.go Adds internal tests for bump behavior across manual/auto/non-standard releases.
internal/app/azldev/core/components/resolver.go Defaults empty ReleaseCalculation to auto during component creation.
internal/app/azldev/core/components/resolver_test.go Updates resolver tests to set ReleaseCalculation explicitly.
docs/user/reference/config/components.md Documents the new release-calculation setting.

Comment thread internal/projectconfig/component_test.go
Comment thread internal/projectconfig/component_test.go Outdated
Comment thread internal/app/azldev/core/sources/release.go Outdated
Comment thread internal/app/azldev/core/sources/release.go
Comment thread internal/app/azldev/core/sources/release.go Outdated
Comment thread schemas/azldev.schema.json Outdated
"enum": [
"auto",
"manual"
],
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

The description claims “Empty or omitted means auto,” but the schema doesn’t express a default. Adding "default": "auto" would make the behavior discoverable to schema-driven tooling (editors, generators) and align the schema with the stated semantics.

Suggested change
],
],
"default": "auto",

Copilot uses AI. Check for mistakes.
Comment on lines +466 to +468
if componentConfig.ReleaseCalculation == "" {
componentConfig.ReleaseCalculation = projectconfig.ReleaseCalculationAuto
}
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

This mutates the caller-owned *componentconfig.ComponentConfig in-place. If the same struct pointer is reused elsewhere (e.g., cached config maps, shared test fixtures), this can introduce hard-to-track side effects. Prefer defaulting on a local copy before storing it in the resolved component (e.g., copy the struct, set defaults on the copy, and keep the input immutable).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@reubeno reubeno left a comment

Choose a reason for hiding this comment

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

I've got one question regarding extensibility of the config .. but otherwise, changes look good to me. I'll let you triage the copilot feedback to see what's relevant.

Comment thread docs/user/reference/config/components.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 17, 2026 21:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comment thread internal/projectconfig/component.go Outdated
@dmcilvaney dmcilvaney merged commit 1e25de8 into microsoft:main Apr 18, 2026
15 checks passed
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