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

Fix admin repo startup deadlock because of rill.yaml read #4762

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

AdityaHegde
Copy link
Collaborator

No description provided.

Comment on lines 268 to 276
// Read rill.yaml and fill in `ignore_paths`
rawYaml, err := h.Get(context.Background(), "/rill.yaml")
if err == nil {
yml := &rillYAML{}
err = yaml.Unmarshal([]byte(rawYaml), yml)
if err == nil {
h.ignorePaths = yml.IgnorePaths
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will read rill.yaml and mutate ignorePaths without holding repoMu.

I think putting it back in the singleflight and using os.ReadFile directly (or an internal get that doesn't take a lock) would be a simpler approach

@AdityaHegde AdityaHegde added the blocker A release blocker issue that should be resolved before a new release label Apr 30, 2024
@begelundmuller begelundmuller merged commit a4dc5be into main Apr 30, 2024
4 checks passed
@begelundmuller begelundmuller deleted the admin-driver-startup-deadlock branch April 30, 2024 11:31
k-anshul pushed a commit that referenced this pull request Apr 30, 2024
* Fix admin repo startup deadlock

* Moving inside lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker A release blocker issue that should be resolved before a new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants