| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Olblak <me@olblak.com>
There was a problem hiding this comment.
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:
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.
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
|
Tick the box to add this pull request to the merge queue (same as @mergifyio queue).
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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 testAdditional Information
Checklist
Tradeoff
Potential improvement