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

watch with double go routines #730

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

alex-schneider
Copy link
Contributor

@alex-schneider alex-schneider commented Feb 24, 2023

closes #692


Reviewer checklist
  • Read PR description: a summary about the changes is required
  • Changelog updated
  • Documentation: docs/{Reference, Cli, ...}, Docker and cli help/usage
  • Pulled branch, manually tested
  • Verified requirements are met
  • Reviewed the code
  • Reviewed the related tests

@johakoch
Copy link
Collaborator

handler/transport/probe.go:

	// do not start go-routine on config check (-watch)
	if _, exist := opts.Context.Value(request.ConfigDryRun).(bool); exist {
		return
	}

	if _, exist := tc.Context.Value(request.ConfigDryRun).(bool); !exist {
		go p.probe(opts.Context)
	}

Looks like the first part already tries to solve the problem. Why does it not work?

@alex-schneider alex-schneider force-pushed the 692-watch-with-double-go-routines branch from 21e0bd5 to fc988d2 Compare February 24, 2023 14:00
handler/transport/probe.go Outdated Show resolved Hide resolved
@malud malud changed the title 692 watch with double go routines watch with double go routines Mar 3, 2023
@johakoch johakoch merged commit cd68a2e into release.1.12 Mar 3, 2023
@johakoch johakoch deleted the 692-watch-with-double-go-routines branch March 3, 2023 12:35
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

Successfully merging this pull request may close these issues.

NewServerConfiguration() called twice after config reload with -watch causing e.g. double health probes/jobs
3 participants