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

Make most fields in big query diagnostic schema as optional #404

Closed
pritamghanghas opened this issue Jul 5, 2022 · 7 comments
Closed

Make most fields in big query diagnostic schema as optional #404

pritamghanghas opened this issue Jul 5, 2022 · 7 comments

Comments

@pritamghanghas
Copy link
Contributor

pritamghanghas commented Jul 5, 2022

While working on product-management#72, it was observed that we might miss some diagnostic reports due to schema validation of required fields.

We don't want to miss diagnostic reports if some of the current mandatory fields are malformed or missing due to hardware/software issues. Except for timestamp, there isn't any need to mark fields as required.
In case of errors, this might lead to diag not being uploaded and thus problem being masked. Even if there is no large problem being masked, the diag upload frequency which we use to calculate uptime becomes unreliable.

Required Fields as of date that need conversion to optional:
"BN",
"ID",
"BA",
"FR",
"FW",
"VA",
"serial_number",
"PK",
"OK"
"AN",

Acceptance Criterion

  • Make all fields except timestamp optional in nebra-production.hotspot_diagnostics_data.diagnostics
@pritamghanghas
Copy link
Contributor Author

@marvinmarnold This will require making changes to the table. @htsili can probably do it. I have checked. Converting previously required fields to optional is allowed by big query. I can make the device side changes after that.

@htsili
Copy link

htsili commented Jul 26, 2022

@pritamghanghas i think this is now done. Can you please check it?

@pritamghanghas
Copy link
Contributor Author

@htsili LGTM I will work on rest of it.

pritamghanghas pushed a commit that referenced this issue Jul 27, 2022
* start using new schema for diagnostic data
pritamghanghas pushed a commit that referenced this issue Jul 27, 2022
* start using new schema for diagnostic data
pritamghanghas added a commit that referenced this issue Aug 1, 2022
#420)

* start using new schema for diagnostic data

Co-authored-by: Pritam Ghanghas <pghanghas@nebra.com>
@marvinmarnold
Copy link
Contributor

We are seeing diagnostics coming through again so I think this is production already. Is any additional work needed or can this be closed @pritamghanghas ?

@pritamghanghas
Copy link
Contributor Author

@marvinmarnold No, this is in QA now. I will check a few devices from testnet tomorrow and close the ticket.

@KevinWassermann94
Copy link
Contributor

@pritamghanghas This must be in production already. We are getting around 470k upload per day since Jul 28th

@marvinmarnold
Copy link
Contributor

@pritamghanghas can you make sure this gets into production before the end of the sprint.

@KevinWassermann94 this has changes in two places - Google Cloud schema and code. Changing the cloud schema is in prod and restored uploads for most devices. The code change still needs to be deployed but will prob not have a big impact.

@shawaj shawaj mentioned this issue Jul 9, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants