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

Refactor Network Server end device registry Set method validation #6732

Open
4 tasks done
adriansmares opened this issue Nov 30, 2023 · 0 comments
Open
4 tasks done
Assignees
Labels
c/network server This is related to the Network Server technical debt Not necessarily broken, but could be done better/cleaner
Milestone

Comments

@adriansmares
Copy link
Contributor

Summary

References https://github.com/TheThingsIndustries/lorawan-stack/pull/3850#issuecomment-1789261038

We should refactor the Network Server NsEndDeviceRegistry.Set validation logic in order to make it easier to maintain and review.

Current Situation

The Set RPC works using field mask paths towards two end devices - the end device in the update request, and the end device which is stored. This makes the logic hard to validate and asses, and adds a lot of complexity to an RPC which is not called very often.

Why do we need this? Who uses it, and when?

In order to be able to actually check the correctness of the RPC, and ensure that we really correctly validate requests.

Proposed Implementation

  1. Merge the end device patch to the stored (complete) stored end device.
  2. Recursively validate the end device object as a whole.

Contributing

  • I can help by doing more research.
  • I can help by implementing the feature after the proposal above is approved.
  • I can help by testing the feature before it's released.

Code of Conduct

@adriansmares adriansmares added c/network server This is related to the Network Server technical debt Not necessarily broken, but could be done better/cleaner labels Nov 30, 2023
@adriansmares adriansmares added this to the Backlog milestone Nov 30, 2023
@adriansmares adriansmares self-assigned this Nov 30, 2023
@github-actions github-actions bot added the needs/triage We still need to triage this label Nov 30, 2023
@KrishnaIyer KrishnaIyer removed the needs/triage We still need to triage this label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/network server This is related to the Network Server technical debt Not necessarily broken, but could be done better/cleaner
Projects
None yet
Development

No branches or pull requests

2 participants