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 EagerModel MODEL_TAGS field #506

Closed
therealryan opened this issue Aug 15, 2023 · 0 comments · Fixed by #546
Closed

Validate EagerModel MODEL_TAGS field #506

therealryan opened this issue Aug 15, 2023 · 0 comments · Fixed by #546
Labels
enhancement New feature or request java Pull requests that update Java code

Comments

@therealryan
Copy link
Collaborator

therealryan commented Aug 15, 2023

When you register an EagerModel class with a LazyModel, we check if it has a public static TaggedGroup MODEL_TAGS field. The LazyModel instance uses that data to decide whether or not to build the LazyModel when it is asked for flows with particular tags.
We've already got validation that confirms that the TaggedGroup returned from a model instance is accurate, but we should also add validation to check that the TaggedGroup returned from a LazyModel is the same as that in the MODEL_TAGS field.
This blocks the (frankly unlikely, but let's belt-and-braces this thing) failure mode of a LazyModel implementation that has inaccurate data in MODEL_TAGS, but returns a different but accurate result from the tags() method.

@therealryan therealryan added enhancement New feature or request java Pull requests that update Java code labels Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request java Pull requests that update Java code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant