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

Projection configuration fix #192

Merged

Conversation

dylanmcreynolds
Copy link
Contributor

@dylanmcreynolds dylanmcreynolds commented Oct 6, 2020

Addresses an issue found that the projection schema does not have enough types.

Description

The projection schema's "location" field contained "event" and "configuration". This PR adds "start".

Motivation and Context

The initial commits for projections and projectors contained the mistaken notion that the only two places in a docstream that might want to be projected are the start document and event fields. It was realized later that event descriptr configuration fields would also want to be project. This PR adds "start" to the projection location enum, and changes the meaning of "configuration" from the start document to the event descriptor. Fixes

Additionally, fixes Fixes #183. This issue asked for more schema validation against calculated and liked fields. For example:

if type == calculated:
calcuation field is also required
if type == linked:
location field is also required

How Has This Been Tested?

Tests in test_projections added for checking validation changes.

This PR will have a corresponding PR in databroker.

@dylanmcreynolds
Copy link
Contributor Author

arghh....tests failing for jsonshema2

@dylanmcreynolds
Copy link
Contributor Author

Added skips in some tests for less than jsonschema3. h/t to @danielballan

@dylanmcreynolds
Copy link
Contributor Author

Added value field to fix #194

@danielballan danielballan merged commit 06d1a9d into bluesky:master Oct 22, 2020
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.

Projection Schema could provide stronger validation
2 participants