You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Validator ergonomics for consumer repos: validate CLI exits 0 on stub, validate.py takes one file, default schema path assumes repo layout #266
Three small friction points that show up when you consume the spec from your own repository — vendoring core-spec/osi-schema.json and validation/validate.py into a repo that holds domain models — rather than working inside apache/ossie itself.
All three are on main as of today.
1. ossie validate exits 0 while printing not yet implemented
cli/cmd/validate.go:
varvalidateCmd=&cobra.Command{
Use: "validate [flags] <path> [<path>...]",
Short: "Validate one or more OSSIE YAML or JSON files",
Args: cobra.MinimumNArgs(1),
RunE: runValidate,
}
funcrunValidate(cmd*cobra.Command, args []string) error {
fmt.Fprintln(cmd.OutOrStdout(), "not yet implemented")
returnnil
}
ossie validate broken-model.yaml prints one line and exits 0. Dropped into a CI step, that is indistinguishable from a pass — the one failure mode worth avoiding in a validation command. The help text also advertises [<path>...], --strict and --output, none of which do anything yet.
Suggestion: return a non-zero error (or mark the command hidden / Deprecated) until it is wired up.
2. validation/validate.py accepts exactly one file
So validate.py models/**/*.yaml fails with a usage error rather than validating the set. Any repo with more than one model ends up wrapping it in a shell loop, which loses the aggregate summary and makes "did everything pass?" a matter of collecting exit codes by hand.
Suggestion: accept N paths, validate each, print a per-file PASS/FAIL, and exit non-zero if any file failed.
3. The default schema path assumes the upstream repo layout
Vendored as scripts/validate.py in a consumer repo, that resolves to <repo>/core-spec/osi-schema.json — a directory the user never created. --schema solves it, but the first-run error (Error: Schema not found: …/core-spec/osi-schema.json) points at a path nobody chose, which is a confusing place to start.
Suggestion: keep the current default, then fall back to ./schema/osi-schema.json and/or an OSSIE_SCHEMA environment variable before erroring — and mention --schema in the error message.
Context
I hit these while putting together a scaffold for consumer repositories. The workaround is a Makefile that loops per file and always passes --schema, which works fine but is the sort of thing every consumer will end up reinventing.
Happy to send a PR for any or all of these if the direction sounds right — please say which of the three you'd take, and whether the Go CLI is expected to absorb the Python validator's job eventually (that would change what's worth fixing in validate.py).
I opened #390 for the first item: the four unimplemented commands (validate, convert, plugin install, plugin remove) now return an error and exit 1 instead of printing not yet implemented and exiting 0. It is the same thing #345 lists in its closing note.
The two validate.py points (several files per run, schema path fallback) are separate. cskwork, you offered a PR for these in July and that still seems the natural path; if it is no longer on your plate I can follow up, though #271 and #373 both touch main() there right now so it may be worth waiting for those.
All three items appear landed on current main (642cb89) — re-checked each, so noting it for triage:
1. ossie validate exiting 0 on a stub — closed by #390. cli/cmd/validate.go is now return fmt.Errorf("%s is not yet implemented", cmd.CommandPath()), so the command exits non-zero instead of printing a line and passing. convert and the two plugin mutators took the same treatment.
The aggregate summary the issue asked for is there, so a consumer repo no longer needs the Makefile loop that collects exit codes by hand.
3. default schema path assuming the upstream layout — closed by #545. resolve_schema_path() prefers OSSIE_SCHEMA when set, and the not-found diagnostic now ends with Pass --schema <schema_file> or set OSSIE_SCHEMA to point at ossie-schema.json. — which is the --schema hint the issue suggested, instead of pointing at a path nobody chose. The module docstring documents the vendored case too.
One thing I cannot answer from the code, because it is the design question the issue raises at the end: whether the Go CLI is expected to absorb this validator's job eventually. If it is, item 2 and 3 may be worth less than they look; if not, this issue can probably be closed. cc @kayemkim@cskwork since the September thread here was about who would take it.
Activity
kayemkim commentedon Sep 14, 2026
I opened #390 for the first item: the four unimplemented commands (
validate,convert,plugin install,plugin remove) now return an error and exit 1 instead of printingnot yet implementedand exiting 0. It is the same thing #345 lists in its closing note.The two
validate.pypoints (several files per run, schema path fallback) are separate. cskwork, you offered a PR for these in July and that still seems the natural path; if it is no longer on your plate I can follow up, though #271 and #373 both touchmain()there right now so it may be worth waiting for those.ihadoop commentedon Oct 10, 2026
All three items appear landed on current
main(642cb89) — re-checked each, so noting it for triage:1.
ossie validateexiting 0 on a stub — closed by #390.cli/cmd/validate.gois nowreturn fmt.Errorf("%s is not yet implemented", cmd.CommandPath()), so the command exits non-zero instead of printing a line and passing.convertand the twopluginmutators took the same treatment.2. one file per run — closed by #545. Verified:
The aggregate summary the issue asked for is there, so a consumer repo no longer needs the Makefile loop that collects exit codes by hand.
3. default schema path assuming the upstream layout — closed by #545.
resolve_schema_path()prefersOSSIE_SCHEMAwhen set, and the not-found diagnostic now ends withPass --schema <schema_file> or set OSSIE_SCHEMA to point at ossie-schema.json.— which is the--schemahint the issue suggested, instead of pointing at a path nobody chose. The module docstring documents the vendored case too.One thing I cannot answer from the code, because it is the design question the issue raises at the end: whether the Go CLI is expected to absorb this validator's job eventually. If it is, item 2 and 3 may be worth less than they look; if not, this issue can probably be closed. cc @kayemkim @cskwork since the September thread here was about who would take it.
Not my call to close.