Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate manifests before accepting them #122

Closed
thomastaylor312 opened this issue Jun 2, 2023 · 4 comments
Closed

Validate manifests before accepting them #122

thomastaylor312 opened this issue Jun 2, 2023 · 4 comments
Milestone

Comments

@thomastaylor312
Copy link
Contributor

Right now we blindly accept manifests without any validation. This causes issues where you might have misplaced something like your spread definitions and also leads to manifests fighting with each other (if two different manifests link to the same provider with different values, so those scalers each try to compete to set their version of the linkdef). At the minimum, validation should probably include:

  • Collision with other manifests, particularly with actor/provider versions, and linkdefs with different values for the same actor
  • Unrecognized or missing fields when parsing the manifest
@thomastaylor312
Copy link
Contributor Author

One possible solution here is to define a json schema and use that: https://docs.rs/jsonschema/latest/jsonschema/

@brooksmtownsend
Copy link
Member

Consider #123 and @autodidaddict's scenarios when validating the manifests

@brooksmtownsend
Copy link
Member

One more comment, I think this issue should cover the problem outlined in #131 and reject non-string label requirements.

@aish-where-ya
Copy link
Contributor

Here are some of the cases covered in #153

  • Multiple actors or providers cannot have the same names in a single manifest
  • A linkedef - provider reference pair needs to be unique in a capability provider definition.
  • Linkdefs in a manifest should have a unique target

The next PR will cover validation using a JSONSchema for manifest items.

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

No branches or pull requests

3 participants