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

Normalized message pre processor not using the json schema #7382

Open
4 of 6 tasks
peter-quandify opened this issue Nov 15, 2024 · 9 comments
Open
4 of 6 tasks

Normalized message pre processor not using the json schema #7382

peter-quandify opened this issue Nov 15, 2024 · 9 comments
Assignees
Labels
bug Something isn't working in progress We're working on it

Comments

@peter-quandify
Copy link

Summary

The json schema for the normalized uplink is located in the device-library. It is currently expanding but the message preprocessor is located in the lorawan-stack and does not use the schema supplied in the device-library for validation. Instead it uses a custom go code to validate.

This causes the validators to be out of sync and currently the stack validator is missing quite a few fields.

If only validation is needed in this function, then a library like this could do the trick
https://github.com/kaptinlin/jsonschema

Steps to Reproduce

  1. Add a device with a normalized uplink decoder that has the battery or metering field
  2. Check the log output on decoding to see that it fails

Current Result

Generates an error for each field it does not recognize

Expected Result

Should accept everything that the device-library schema accepts

Relevant Logs

No response

URL

No response

Deployment

The Things Stack Community Edition

The Things Stack Version

No response

Client Name and Version

No response

Other Information

No response

Proposed Fix

No response

Contributing

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

Validation

Code of Conduct

@peter-quandify peter-quandify added the needs/triage We still need to triage this label Nov 15, 2024
@johanstokking
Copy link
Member

@peter-quandify thanks for reporting, we're fixing this.

@KrishnaIyer KrishnaIyer added bug Something isn't working and removed needs/triage We still need to triage this labels Nov 19, 2024
@KrishnaIyer KrishnaIyer self-assigned this Nov 19, 2024
@KrishnaIyer KrishnaIyer added the in progress We're working on it label Nov 19, 2024
@KrishnaIyer KrishnaIyer added this to the v3.33.0 milestone Nov 19, 2024
@KrishnaIyer
Copy link
Member

This is deployed to all clusters and the warnings are gone. Please feel free to comment if not solved and we'll take a look.

@peter-quandify
Copy link
Author

Still get these errors on the TTN cloud console
Screenshot 2024-12-02 at 13 03 25
Screenshot 2024-12-02 at 13 03 19

@johanstokking
Copy link
Member

@happyRip

@KrishnaIyer KrishnaIyer reopened this Dec 3, 2024
@KrishnaIyer
Copy link
Member

@peter-quandify: Which TTSS (TTN) Cluster are you testing on?

@peter-quandify
Copy link
Author

@KrishnaIyer I'm on EU1, the error is still present when I click on Live data in the application. Not on live data for that specific device.

Screenshot 2024-12-06 at 12 12 08

@KrishnaIyer
Copy link
Member

@peter-quandify: we've deployed an update to The Things Stack Sandbox eu1 cluster. Let us know if this is fixed.

@KrishnaIyer KrishnaIyer removed this from the v3.33.0 milestone Dec 15, 2024
@peter-quandify
Copy link
Author

@KrishnaIyer still the same error message
Screenshot 2024-12-17 at 14 25 18

@KrishnaIyer
Copy link
Member

We have made yet another update and we don't see these warning logs on our side. Can you check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress We're working on it
Projects
None yet
Development

No branches or pull requests

3 participants