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

Empty metrics on metrics tests #75

Open
lwsanty opened this issue Sep 16, 2019 · 1 comment
Open

Empty metrics on metrics tests #75

lwsanty opened this issue Sep 16, 2019 · 1 comment

Comments

@lwsanty
Copy link
Contributor

lwsanty commented Sep 16, 2019

Sometimes during metrics tests from PR #73 empty metrics are written
https://travis-ci.com/src-d/gitcollector/jobs/235932304

--- FAIL: TestPostgres (5.66s)
    --- FAIL: TestPostgres/testPostgresSendMetricsSuccess (0.22s)
        require.go:157: 
                Error Trace:    postgres_test.go:97
                                                        postgres_test.go:63
                Error:          Not equal: 
                                expected: []integration.metric{integration.metric{org:"git-fixtures", discovered:8, downloaded:7, updated:0, failed:1}}
                                actual  : []integration.metric{integration.metric{org:"git-fixtures", discovered:0, downloaded:0, updated:0, failed:0}}
                                
                                Diff:
                                --- Expected
                                +++ Actual
                                @@ -3,6 +3,6 @@
                                   org: (string) (len=12) "git-fixtures",
                                -  discovered: (int) 8,
                                -  downloaded: (int) 7,
                                +  discovered: (int) 0,
                                +  downloaded: (int) 0,
                                   updated: (int) 0,
                                -  failed: (int) 1
                                +  failed: (int) 0
                                  }

I suspect gitcollector in data loss
Cannot reproduce locally

Need more info

Update
OK, seems like the reason is the following

[2019-09-17T14:30:38.901550957+03:00]  WARN discovery stopped: rate limit requests exceeded: GET https://api.github.com/orgs/git-fixtures/repos?per_page=100: 403 API rate limit exceeded for 212.7.22.138. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 60m00s] source=subcmd/download.go:226

This will be fixed in CI as soon as #74 and https://github.com/src-d/infrastructure/issues/1154 will be closed

I have a doubt about this behavior, because it may confuse users, maybe it would be better to add errors field to metrics schema so it would be more clear why all metrics are 0?

wdyt @mcarmonaa @jfontan ?

@mcarmonaa
Copy link
Contributor

If I recall correctly 🤔, it was a requirement that the exported data is just numbers so to know more about errors is necessary check the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants