Skip to content

fix: disable validation checks when passing --permissive-config#216

Open
dmcilvaney wants to merge 1 commit into
microsoft:mainfrom
dmcilvaney:damcilva/historic_overlays
Open

fix: disable validation checks when passing --permissive-config#216
dmcilvaney wants to merge 1 commit into
microsoft:mainfrom
dmcilvaney:damcilva/historic_overlays

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

Needed for some future work to load and apply historic overlays.

Copilot AI review requested due to automatic review settings June 1, 2026 17:18
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

Extends --permissive-config to also relax post-load cross-reference validation. Previously the flag only affected TOML decoding (allowing unknown fields); semantic checks (component-group membership, package-group membership, image/test-suite references) still failed hard. The PR threads the permissive flag through ProjectConfig.validate so these three checks become slog.Info warnings, supporting future work loading historical overlays where references may target entities defined in another revision.

Changes:

  • Added internal (*ProjectConfig).validate(permissive bool) that downgrades 3 cross-reference checks to log messages when permissive.
  • Public Validate() retained, delegating to validate(false) to preserve existing behavior.
  • loadAndResolveProjectConfig now passes permissiveConfigParsing into the new validate call.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
internal/projectconfig/project.go Splits Validate into a permissive-aware internal validate; demotes 3 cross-ref errors to info logs when permissive.
internal/projectconfig/loader.go Forwards permissiveConfigParsing to the new internal validate.

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 5 out of 5 changed files in this pull request and generated no new comments.

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