cncf / devstats

📈CNCF-created tool for analyzing and graphing developer contributions
https://devstats.cncf.io
Apache License 2.0
61 stars 22 forks source link

[bug] company-statistics-by-repository-group broken for k8s #41

Closed dims closed 7 months ago

dims commented 8 months ago

https://k8s.devstats.cncf.io/d/8/company-statistics-by-repository-group?orgId=1&var-period=q&var-metric=activity&var-repogroup_name=Kubernetes&var-repo_name=&var-companies=All&inspect=1&inspectTab=error

shows this failure

image

lukaszgryglicki commented 8 months ago

Fixed, thanks for reporting.

dims commented 7 months ago

@lukaszgryglicki same problem with another company ( same URL! https://k8s.devstats.cncf.io/d/8/company-statistics-by-repository-group?orgId=1 )

image

lukaszgryglicki commented 7 months ago

Will TAL tomorrow.

lukaszgryglicki commented 7 months ago

Checking this.

lukaszgryglicki commented 7 months ago

I think I've found a bug, now testing if that solves this for good...

lukaszgryglicki commented 7 months ago

It fixed this, @dims, the issue seemed to be that

schemaname = 'public' and substring(tablename from %s) is not null

when called with %s = ^scompany_activity(_repos)?$ was returning a hit for table scompany_activity_repos but not for scompany_activity which doesn't seem to be OK for me (the expression in ()? should just be optional and it should hit both tables).

I've changed this to the ~ Postgres operator and it returns the correct hits now:

schemaname = 'public' and tablename ~ %s

Some tables were not returned as candidates to be updated with possible columns list, so the outcome was that columns were missing.

Hope it won't reappear...

lukaszgryglicki commented 7 months ago

Rechecked today (both the DB data and the dashboard) and it seems to be OK.

lukaszgryglicki commented 7 months ago

Rechecked once more after 2 weeks and it is still OK, so I'm assuming that this fixed it :)