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

Updates to hardware/firmware version reporting #254

Merged
merged 23 commits into from
Mar 24, 2022

Conversation

grafnu
Copy link
Collaborator

@grafnu grafnu commented Mar 1, 2022

No description provided.

@grafnu
Copy link
Collaborator Author

grafnu commented Mar 22, 2022

Again, my apologies for a large CL (number of files) -- but it ended up touching a lot of auto-generated code and test cases... not sure how to avoid that. But, it should be pretty easy to "ignore" a bunch of the files since they're derivative changes (not manually written code).

@grafnu grafnu marked this pull request as ready for review March 22, 2022 22:20
@grafnu grafnu changed the base branch from master to staging March 24, 2022 03:15
@grafnu
Copy link
Collaborator Author

grafnu commented Mar 24, 2022

Ok, I've extracted some of the auto-generated changes into a separate branch, so this PR now only contains the "manual" changes that might need a review

etc/validator.out Show resolved Hide resolved
}

private void upgradeMessage(String schemaName, JsonNode jsonNode) {
new MessageUpgrader(schemaName, jsonNode).upgrade();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want more robust handling of messages that don't upgrade?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the upgrade it's run through the current schema validator to make sure the upgraded message is proper, so if "didn't upgrade" means that there are still lingering fields or something it will be caught. I'm not sure what additional handling would be useful... might depend on the specifics of the "didn't upgrade" (like, missing parameter, wrong parameters, etc...).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that "its run through the current schema validator" is at least consistent enough behavior for the user so I'm fine with that.

}

private void upgradeMessage(String schemaName, JsonNode jsonNode) {
new MessageUpgrader(schemaName, jsonNode).upgrade();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that "its run through the current schema validator" is at least consistent enough behavior for the user so I'm fine with that.

@grafnu grafnu merged commit 4ecfd7d into faucetsdn:staging Mar 24, 2022
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.

None yet

2 participants