Skip to content

SP-2221: Omit --layers instead of defaulting it to SCHEMA - #419

Merged
Kastriot Salihu (ksalihu) merged 1 commit into
mainfrom
ksalihu/SP-2221-validate-default-layers
Aug 20, 2026
Merged

SP-2221: Omit --layers instead of defaulting it to SCHEMA#419
Kastriot Salihu (ksalihu) merged 1 commit into
mainfrom
ksalihu/SP-2221-validate-default-layers

Conversation

@ksalihu

@ksalihu Kastriot Salihu (ksalihu) commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Draft — do not merge before celonis/pacman#2426 is deployed. Sending no layers to the current API returns 400 layers.NotEmpty. That PR is what makes an absent list mean "every available layer".

Why

config package validate (and the deprecated config validate) declared --layers with a Commander default of ["SCHEMA"]. So the plain command reported schema problems only and said nothing about business rules, package settings or the semantic model, while the Studio problems panel reports five layers for the same package. Nothing in the output indicated four layers had not run, so a short report looked like a clean package.

The docs told users to pass all five explicitly, which only works until a sixth layer ships.

What changed

  • Both --layers declarations drop the ["SCHEMA"] default. The help text now says the option narrows the run rather than that it defaults to SCHEMA.
  • PackageValidationService.validatePackage omits layers from the request body when nothing was passed, and drops an empty array rather than sending one the API rejects.
  • PackageValidationRequest.layers is optional.
  • Docs: "to run all layers" is now "omit the option", and the layer table notes that an empty --layers is rejected.

An explicit --layers SCHEMA BUSINESS still behaves exactly as before.

Testing

npx jest tests/commands/configuration-management/config-validate.spec.ts — 10 passed. Two new cases cover the omitted option producing {} and an empty array being dropped while nodeKeys survives. tsc --noEmit clean; tslint -p . reports only pre-existing errors in files this PR does not touch.

Ticket: SP-2221

Made with Cursor

config package validate defaulted --layers to ["SCHEMA"], so the out-of-the-box
run reported schema problems only and said nothing about business rules, package
settings or the semantic model. A user comparing the output against the Studio
problems panel saw a much shorter list with no indication that four layers had
not run.

Omitting the option now sends no layers at all, which the validate API reads as
every layer available for the team. An explicit list still narrows the run, and
an empty one is dropped rather than sent, since the API rejects it.

Includes-AI-Code: true
@sonarqubecloud

Copy link
Copy Markdown

@ksalihu
Kastriot Salihu (ksalihu) marked this pull request as ready for review August 19, 2026 13:40
@ksalihu
Kastriot Salihu (ksalihu) requested a review from a team as a code owner August 19, 2026 13:40
@ksalihu
Kastriot Salihu (ksalihu) merged commit 5516aab into main Aug 20, 2026
5 checks passed
@ksalihu
Kastriot Salihu (ksalihu) deleted the ksalihu/SP-2221-validate-default-layers branch August 20, 2026 11:25
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