Thanks to visit codestin.com
Credit goes to github.com

Skip to content

flake: TestProvisionerDaemon_SessionToken/PrometheusEnabled #13931

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

Closed
dannykopping opened this issue Jul 18, 2024 · 5 comments · Fixed by #13945 or #14000
Closed

flake: TestProvisionerDaemon_SessionToken/PrometheusEnabled #13931

dannykopping opened this issue Jul 18, 2024 · 5 comments · Fixed by #13945 or #14000
Assignees
Labels
bug risk Prone to bugs s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks

Comments

@dannykopping
Copy link
Contributor

https://github.com/coder/coder/actions/runs/9987661978/job/27602490812?pr=13902

    provisionerdaemons_test.go:207: 
        	Error Trace:	/home/runner/work/coder/coder/enterprise/cli/provisionerdaemons_test.go:207
        	Error:      	Condition never satisfied
        	Test:       	TestProvisionerDaemon_SessionToken/PrometheusEnabled
// Fetch metrics from Prometheus endpoint
var res *http.Response
require.Eventually(t, func() bool {
	req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("http://127.0.0.1:%d", prometheusPort), nil)
	assert.NoError(t, err)
	// nolint:bodyclose
	res, err = http.DefaultClient.Do(req)
	return err == nil
}, testutil.WaitShort, testutil.IntervalFast)
@dannykopping dannykopping added flake s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks labels Jul 18, 2024
@coder-labeler coder-labeler bot added the bug label Jul 18, 2024
@matifali
Copy link
Member

seen again on main
logs: https://github.com/coder/coder/actions/runs/10017620244/job/27692037213#step:5:478

@mtojek
Copy link
Member

mtojek commented Jul 23, 2024

It is not fixed yet. I'm thinkin about alternative solutions.

@mtojek mtojek reopened this Jul 23, 2024
@coder-labeler coder-labeler bot added the bug risk Prone to bugs label Jul 23, 2024
@dannykopping
Copy link
Contributor Author

dannykopping commented Jul 23, 2024

I'm sure you're referring to https://github.com/coder/coder/actions/runs/10058757918/job/27802570559?pr=13983 @mtojek , but I thought I'd add it here in case not.

I realized now that my branch wasn't up-to-date with main, so that could be the reason for that particular flake.

@mtojek
Copy link
Member

mtojek commented Jul 23, 2024

Unfortunately, I'm able to reproduce it fairly easy in the CI now, but I don't see an obvious reason why it is happening:

t.go:102: 2024-07-23 13:27:18.148 [erro]  cli: http server listen  name=prometheus  error="listen tcp 127.0.0.1:54626: bind: address already in use"

I tried to involve lsof to confirm that this port is utilized by go tests, but failed that as well (no command output?)

@matifali
Copy link
Member

If it helps one can get SSH access into the CI runner, by adding this action step

- name: Setup tmate session
  uses: mxschmitt/action-tmate@v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug risk Prone to bugs s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks
Projects
None yet
3 participants