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

Use Agent API for locking mirrors and known_hosts #2146

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DrJosh9000
Copy link
Contributor

@DrJosh9000 DrJosh9000 commented Jun 6, 2023

If the Agent API experiment is enabled and working, then shell will now use it for locking instead of flock.

At least two reasons for this:

  1. The API socket can be bind-mounted into a container and "just work", whereas flock is harder to make work correctly across a container boundary.
  2. Locking and unlocking in the Agent API has no disk cost, so can be polled more frequently, so should be slightly faster.

@DrJosh9000 DrJosh9000 force-pushed the pdp-1075-use-lock-service-2 branch from 7467471 to 432c3cf Compare June 7, 2023 04:05
@DrJosh9000 DrJosh9000 changed the title WIP: Option to use lock package instead of flock WIP: Use Agent API for locking mirrors and known_hosts Jun 7, 2023
@DrJosh9000 DrJosh9000 changed the title WIP: Use Agent API for locking mirrors and known_hosts Use Agent API for locking mirrors and known_hosts Jun 7, 2023
@DrJosh9000 DrJosh9000 force-pushed the pdp-1075-use-lock-service-2 branch from 432c3cf to 73cbd09 Compare June 8, 2023 04:33
@DrJosh9000 DrJosh9000 force-pushed the pdp-1075-use-lock-service-2 branch from 73cbd09 to 97a4fdf Compare June 8, 2023 04:34
@DrJosh9000 DrJosh9000 marked this pull request as ready for review June 8, 2023 04:34
Copy link
Contributor

@moskyb moskyb left a comment

Choose a reason for hiding this comment

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

i like this but.... a post on the community slack reminded me that we probably can't use the agent locking service for locking mirrors, as mirrors are sharable through [E|Z]FS, and mirror locks through the agent API wouldn't be propagated through to the other users of the shared git mirror :/

@DrJosh9000
Copy link
Contributor Author

Perhaps the choice of "lock providers" should be configurable?

Oooh. What about making it a hook?

@DrJosh9000 DrJosh9000 marked this pull request as draft August 15, 2023 05:53
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.

2 participants