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

fix: retrieve ingestion logs with null change set #216

Conversation

mfiedorowicz
Copy link
Member

@mfiedorowicz mfiedorowicz commented Dec 30, 2024

When change set is not being created, for example due to unreachable NetBox, postgres view returns NULL value and row scanning cannot cast to type value:

can't scan into dest[15]: cannot scan NULL into *postgres.ChangeSet

We can solve this by changing ChangeSet type to pointer with sqlc config.

Screenshot 2024-12-30 at 21 38 04

Copy link

Go test coverage

STATUS ELAPSED PACKAGE COVER PASS FAIL SKIP
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/dbstore/postgres 0.0% 0 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/gen/dbstore/postgres 0.0% 0 0 0
🟢 PASS 1.21s github.com/netboxlabs/diode/diode-server/ingester 71.2% 9 0 0
🟢 PASS 1.05s github.com/netboxlabs/diode/diode-server/migrator 68.2% 4 0 0
🟢 PASS 0.01s github.com/netboxlabs/diode/diode-server/netbox 0.0% 0 0 0
🟢 PASS 1.60s github.com/netboxlabs/diode/diode-server/netboxdiodeplugin 78.9% 42 0 0
🟢 PASS 1.43s github.com/netboxlabs/diode/diode-server/reconciler 83.2% 49 0 0
🟢 PASS 1.09s github.com/netboxlabs/diode/diode-server/reconciler/applier 81.8% 1 0 0
🟢 PASS 0.01s github.com/netboxlabs/diode/diode-server/reconciler/changeset 0.0% 0 0 0
🟢 PASS 1.30s github.com/netboxlabs/diode/diode-server/reconciler/differ 80.3% 81 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/server 85.7% 14 0 0
🟢 PASS 1.01s github.com/netboxlabs/diode/diode-server/version 100.0% 1 0 0

Total coverage: 74.8%

@mfiedorowicz mfiedorowicz merged commit e03da8b into feat-postgres-implementation-and-enhancements Dec 30, 2024
3 checks passed
@mfiedorowicz mfiedorowicz deleted the fix-retrieve-ingestion-logs-null-change-set branch December 30, 2024 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants