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

Add api publish mutex #1130

Conversation

randombenj
Copy link
Member

At the moment it is posible to have multiple publish updates running at the same time. This is a problem as both processes try to update the same files and some unexpected
behaviour might occur.

By using a global mutex, only one publish can be updated at any time.

Fixes #1125

At the moment it is posible to have multiple publish updates
running at the same time. This is a problem as both processes
try to update the same files and some unexpected
behaviour might occur.

By using a global mutex, only one publish can be updated
at any time.
@codecov
Copy link

codecov bot commented Nov 30, 2022

Codecov Report

Merging #1130 (ba22273) into master (71fd730) will decrease coverage by 0.00%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master    #1130      +/-   ##
==========================================
- Coverage   66.31%   66.30%   -0.01%     
==========================================
  Files         141      141              
  Lines       15910    15913       +3     
==========================================
+ Hits        10550    10551       +1     
- Misses       4610     4612       +2     
  Partials      750      750              
Impacted Files Coverage Δ
api/publish.go 0.00% <0.00%> (ø)
context/context.go 68.18% <100.00%> (+0.07%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@randombenj
Copy link
Member Author

After some internal discussion, we noticed that this is actually not an ideal solution.
Even though it might work, it will block all publish operations for all publish endpoints.
There should be only one lock per publish endpoint.

@randombenj randombenj closed this Feb 28, 2023
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.

API: failures and race conditions with concurrent publish update operations
2 participants