Commit 83813de
authored
fix: Don't panic on empty-string for timestamp (#489)
#### Summary
Fixes this panic:
```
12:22PM ERR column resolver finished with panic error={} client=pagerduty column=created_at duration=0.138344 module=pagerduty-src stack="failed to set column created_at: cannot parse as Timestamptz\ngoroutine 402 [running]:\nruntime/debug.Stack()\n\t/usr/local/Cellar/go/1.19.1/libexec/src/runtime/debug/stack.go:24 +0x65\ngithub.com/cloudquery/plugin-sdk/plugins.(*SourcePlugin).resolveColumn.func1()\n\t/Users/shimonp/projects/plugin-sdk-shimonp21/plugins/source_scheduler_dfs.go:226 +0x86\npanic({0x163c740, 0xc00049a860})\n\t/usr/local/Cellar/go/1.19.1/libexec/src/runtime/panic.go:884 +0x212\ngithub.com/cloudquery/plugin-sdk/schema.(*Resource).Set(0xc0005e8740?, {0x16f71e7, 0xa}, {0x15fb260?, 0xc0000e6158?})\n\t/Users/shimonp/projects/plugin-sdk-shimonp21/schema/resource.go:74 +0x155\ngithub.com/cloudquery/plugin-sdk/schema.PathResolver.func1({0x18?, 0x1676020?}, {0xc0000be001?, 0xc0003a1a58?}, 0xc0005e8740, {{0x16f71e7, 0xa}, 0x9, {0x0, 0x0}, ...})\n\t/Users/shimonp/projects/plugin-sdk-shimonp21/schema/resolvers.go:17 +0x73\ngithub.com/cloudquery/plugin-sdk/plugins.(*SourcePlugin).resolveColumn(0xc000294000, {0x17f5398, 0xc000516e40}, {{0x17f3878, 0xc00026a470}, 0x1, {0x0, 0x0}, {0xc000418a00, 0x5a, ...}, ...}, ...)\n\t/Users/shimonp/projects/plugin-sdk-shimonp21/plugins/source_scheduler_dfs.go:233 +0x1cd\ngithub.com/cloudquery/plugin-sdk/plugins.(*SourcePlugin).resolveResource(0xc000294000, {0x17f53d0?, 0xc000319b60?}, 0xc0001f8f80, {0x17ef700, 0xc00034a7e0}, 0x14?, {0x16c49c0, 0xc0000e6100})\n\t/Users/shimonp/projects/plugin-sdk-shimonp21/plugins/source_scheduler_dfs.go:209 +0x805\ngithub.com/cloudquery/plugin-sdk/plugins.(*SourcePlugin).resolveResourcesDfs.func1.1()\n\t/Users/shimonp/projects/plugin-sdk-shimonp21/plugins/source_scheduler_dfs.go:148 +0x105\ncreated by github.com/cloudquery/plugin-sdk/plugins.(*SourcePlugin).resolveResourcesDfs.func1\n\t/Users/shimonp/projects/plugin-sdk-shimonp21/plugins/source_scheduler_dfs.go:144 +0xf6\n" table=pagerduty_user_notification_rules
```1 parent cb5f6bb commit 83813de
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
0 commit comments