steampipe
steampipe copied to clipboard
Unexpected EOF / segfault
These are seemingly identical.
with repos(full_name) as (
values
('turbot/steampipe-plugin-github')
) select * from repos
+--------------------------------+
| full_name |
+--------------------------------+
| turbot/steampipe-plugin-github |
+--------------------------------+
with repos as (
select
full_name
from
github_search_repository
where
query = 'turbot/steampipe-plugin-github in:name'
) select * from repos
+--------------------------------+
| full_name |
+--------------------------------+
| turbot/steampipe-plugin-github |
+--------------------------------+
But one of these is not like the other. At least the crash produces a spew of entrails that hopefully will help.
with repos(full_name) as (
values
('turbot/steampipe-plugin-github')
)
select
c.sha
from
repos r
join
github_search_commit c
on
r.full_name = c.repository_full_name
where
query = 'committer-date:2022-08-01..2022-09-01 repo:' || r.full_name
+------------------------------------------+
| sha |
+------------------------------------------+
| 3c98a5bdaa01e1a5f8d7ea3756ec768651031115 |
| 23164d2a69225fbf86a72b02e388b0d7bd96c563 |
| 1f7731f3efdecb6c15b8004ce2e48372f9d6d836 |
+------------------------------------------+
with repos as (
select
full_name
from
github_search_repository
where
query = 'turbot/steampipe-plugin-github in:name'
)
select
c.sha
from
repos r
join
github_search_commit c
on
r.full_name = c.repository_full_name
where
query = 'committer-date:2022-08-01..2022-09-01 repo:' || r.full_name
Error: unexpected EOF
Logs: https://gist.github.com/judell/60a13d7f848ba08adc2dd1c6b8748bc8
@kaidaguerre this might be an interesting clue?
create table repos as (
select
full_name
from
github_search_repository g
where
query = 'turbot/steampipe-plugin-github in:name'
)
select
r.full_name,
g.sha
from
repos r
join
github_search_commit g
on
r.full_name = g.repository_full_name
where
g.query = 'committer-date:2022-08-01..2022-09-01 repo:turbot/steampipe-plugin-github'
+------------------------------------------+
| sha |
+------------------------------------------+
| 3c98a5bdaa01e1a5f8d7ea3756ec768651031115 |
| 23164d2a69225fbf86a72b02e388b0d7bd96c563 |
| 1f7731f3efdecb6c15b8004ce2e48372f9d6d836 |
+------------------------------------------+
select
r.full_name,
g.sha
from
repos r
join
github_search_commit g
on
r.full_name = g.repository_full_name
where
g.query = 'committer-date:2022-08-01..2022-09-01 repo:' || r.full_name
Error: unexpected EOF
Workaround: build the query string in a prior CTE.
with repos as (
select
full_name,
'committer-date:2022-08-01..2022-09-01 repo:' || full_name as query
from
github_search_repository
where
query = 'turbot/steampipe-plugin-github in:name'
order by
full_name
)
select
c.sha
from
repos r
join
github_search_commit c
on
r.full_name = c.repository_full_name
where
c.query = r.query