SUSE / telemetry

Telemetry scaffolding
Apache License 2.0
0 stars 0 forks source link

Data Store: Successfully reported bundles are not being deleted from client data store #18

Closed rtamalin closed 3 months ago

rtamalin commented 3 months ago

When running cmd/generator multiple times to submit SLE-SERVER-SCCHwInfo type data the previous bundles are being sent with new submissions.

I see this on the server side where the processing of the telemetry report indicates multiple bundles are included in the report, when only one bundle should have been sent, and the number of bundles grows over time.

rtamalin commented 3 months ago

Note that the cmd/clientds tool doesn't report any bundles present in the client data store so the bundles are being correctly marked as processed.

This suggests two problems:

rtamalin commented 3 months ago

So reports are deleted once submitted, but the associated bundles and data items are not being deleted. Since the bundles reference a report id, when the next report is created with the same id, the existing bundles associated with it are included in that report's submission.

rtamalin commented 3 months ago

The cmd/clientds tool should be displaying the data items and bundles that remain in the data store, but fails to do so because it is using the methods that look for data items that haven't yet been associated with bundles and bundles that haven't yet been associated with reports. This is being tracked in issue #20

rtamalin commented 3 months ago

Foreign key support is disabled by default in SQLite3 and needs to be explicitly enabled when opening the database.

rtamalin commented 3 months ago

This issue has been addressed by the changes in PR #21