GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(core): add experimantal cli arg to validate manifest by olblak · Pull Request #9721 · updatecli/updatecli

Conversation

@olblak

@olblak olblak commented Jul 28, 2026

Copy link
Copy Markdown
Member

Fix #1001

Add a function to validate manifest.
This is currently experimental to see if it solves the problem.

Test

To test this pull request, you can run the following commands:

make test

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Potential improvement

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@olblak
feat(core): add function to validate manifest
2dbc8cb
Signed-off-by: Olblak <[email protected]>
@olblak olblak added enhancement New feature or request core All things related to Updatecli core engine labels Jul 28, 2026
@olblak
olblak requested a review from Copilot July 28, 2026 06:49
Copilot started reviewing on behalf of olblak July 28, 2026 06:50
View session
Copilot AI reviewed Jul 28, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces an experimental manifest schema validation capability intended to catch misspelled/unknown keys (and other schema mismatches) before manifests are committed or executed, aligning with the request in #1001.

Changes:

  • Add schema compilation/validation helpers and a manifest-oriented validator that validates resources “by kind” for more precise errors.
  • Add updatecli manifest validate (experimental) plus wiring to optionally validate schemas during other commands via a shared --validate-schema flag.
  • Adjust resource specs / e2e fixtures to match the schema (e.g., conditional url requirement, dockerimage versionfilter shape).

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/plugins/resources/gittag/main.go Loosens schema “required” tagging for url to reflect conditional requirement.
pkg/plugins/resources/gitbranch/main.go Loosens schema “required” tagging for url to reflect conditional requirement.
pkg/core/pipeline/scm/config.go Extracts SCM kind→spec mapping for reuse (schema + validator).
pkg/core/pipeline/autodiscovery/main.go Includes crawler aliases in autodiscovery spec mapping for schema/validation.
pkg/core/pipeline/action/main.go Extracts action kind→spec mapping for reuse (schema + validator).
pkg/core/jsonschema/validate.go Adds generic validator error flattening + YAML normalization.
pkg/core/jsonschema/main.go Makes comment-map retrieval/cache optional so schemas can be built at runtime without cloning repo.
pkg/core/jsonschema/main_test.go Adds coverage ensuring schema generation works without code comments available.
pkg/core/jsonschema/compile.go Adds schema compilation helper that pins draft and strips $schema.
pkg/core/jsonschema/compile_test.go Adds tests validating compilation behavior is draft-independent.
pkg/core/engine/manifest_validate.go Adds engine entrypoint for validating manifests and aggregating problems.
pkg/core/engine/configuration.go Refactors default-manifest detection and wires ValidateSchema option into config loading.
pkg/core/config/schemavalidate.go Implements manifest schema validation with layered checks and per-kind spec validation.
pkg/core/config/schemavalidate_value.go Adds helpers for case-normalization and “did you mean” suggestions.
pkg/core/config/schemavalidate_test.go Adds unit tests for manifest schema validation behavior and messages.
pkg/core/config/schemavalidate_registry.go Builds/compiles schema registry and per-section/per-kind schemas.
pkg/core/config/schemavalidate_registry_test.go Ensures every supported kind compiles and mappings stay in sync.
pkg/core/config/schemavalidate_problem.go Defines SchemaProblem/SchemaReport types and formatting/helpers.
pkg/core/config/schemavalidate_corpus_test.go Validates shipped manifest corpus against schema to prevent regressions.
pkg/core/config/main.go Makes manifest name optional in schema; adds ValidateSchema + OnSchemaProblem options and hooks validation into config loading.
pkg/core/compose/schemavalidate.go Adds optional compose schema validation (single-schema validation path).
pkg/core/compose/schemavalidate_test.go Adds tests for compose schema validation output.
pkg/core/compose/file.go Hooks compose schema validation before post-processing defaults.
go.mod Adds direct deps for Levenshtein suggestions and jsonschema validator.
e2e/venom.d/test_manifest_validate.yaml Adds e2e test suite for updatecli manifest validate.
e2e/updatecli.d/success.d/golang/gomod.yaml Updates fixture to remove schema-invalid kind field in spec.
e2e/updatecli.d/success.d/dockerimage.yaml Updates fixture to match schema-required versionfilter structure.
e2e/updatecli.d/invalid.d/typos.yaml Adds an intentionally-invalid manifest to assert error reporting.
e2e/scripts/test_manifest_validate.bash Adds e2e helper script for validating deprecated manifests.
e2e/scripts/test_manifest_validate_invalid.bash Adds e2e helper script expecting validation failure (inverted exit).
cmd/root.go Wires new manifest/validate run target and global --validate-schema backing var.
cmd/pipeline_diff.go Adds shared --validate-schema flag wiring for pipeline diff.
cmd/pipeline_apply.go Adds shared --validate-schema flag wiring for pipeline apply.
cmd/manifest_validate.go Adds experimental updatecli manifest validate command and flags.
cmd/flags.go Adds shared --validate-schema flag with env default.
cmd/env.go Adds UPDATECLI_VALIDATE_SCHEMA env var.
cmd/diff.go Adds shared --validate-schema flag wiring for deprecated diff command.
cmd/compose_diff.go Adds shared --validate-schema flag wiring + compose schema validation toggle.
cmd/compose_apply.go Adds shared --validate-schema flag wiring + compose schema validation toggle.
cmd/apply.go Adds shared --validate-schema flag wiring for deprecated apply command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkg/core/jsonschema/validate.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkg/core/config/schemavalidate.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkg/core/pipeline/autodiscovery/main.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

olblak and others added 8 commits July 28, 2026 08:58
@olblak
fix: ignore on purpose made typos
fb09b11
Signed-off-by: Olblak <[email protected]>
@olblak
fix: linting issues
6729b88
Signed-off-by: Olblak <[email protected]>
@olblak
Merge remote-tracking branch 'upstream/main' into issue/1001
6ea4388
@olblak
Merge branch 'main' into issue/1001
375a719
@olblak
fix: remove unneeded ignore linter rule
ecc2fec
Signed-off-by: Olblak <[email protected]>
@olblak
Merge branch 'issue/1001' of github.com:olblak/updatecli into issue/1001
641aa09
@olblak
fix: don't make name required
fa37a44
Signed-off-by: Olblak <[email protected]>
@olblak
fix: linter issue
2fb07fa
Signed-off-by: Olblak <[email protected]>
@olblak
olblak enabled auto-merge (squash) July 28, 2026 15:00
olblak and others added 4 commits July 28, 2026 19:51
@olblak
Merge branch 'main' into issue/1001
b4bf9a5
@olblak
Merge branch 'main' into issue/1001
040b280
@olblak
Merge remote-tracking branch 'upstream/main' into issue/1001
418ce21
@olblak
fix: e2e tests
82b06b7
Signed-off-by: Olblak <[email protected]>
@mergify

mergify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@olblak
Merge branch 'main' into issue/1001
9b99664
@olblak
olblak merged commit d988ea3 into updatecli:main Jul 31, 2026
8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@olblak olblak changed the title feat(core): add function to validate manifest feat(core): add experimantal cli arg to validate manifest Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

core All things related to Updatecli core engine enhancement New feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Feature Request: Add Command to validate manifest

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@olblak
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.