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

Move to local locking via bolt DB #1

Merged
merged 8 commits into from
May 31, 2017
Merged

Move to local locking via bolt DB #1

merged 8 commits into from
May 31, 2017

Conversation

lkysow
Copy link
Collaborator

@lkysow lkysow commented May 25, 2017

Changes

  • not using Stash anymore for locking, using local BoltDB file or DynamoDB

BoltDB Architecture

Key/value database with a map from the LockID to the Run that's being locked:

Run how to identify this Run and which piece of infra it's locking

# value in the DB
type Run struct {
	RepoOwner  string
	RepoName   string
	Path       string
	Env        string
	PullID     int
	User       string
	Timestamp  time.Time
}
# key in the DB is a sha256 of `RepoOwner/RepoName/Path/Env`.

You need the ID to delete the lock.

Todos

  • Delete endpoint /locks/:id and /locks/:id?method=DELETE for GET calls
  • configurable hostname which can be used for the delete lock link
  • Option to store locks in Dynamo DB
  • repo hostname not hard coded
  • config for where the database is stored
  • fix UI
  • remove mention of Stash for locking

Todos in subsequent PRs

  • make detail view for locks and their plans
  • add more tests

@lkysow lkysow merged commit 4e20cc1 into master May 31, 2017
@lkysow lkysow deleted the local-locking branch May 31, 2017 07:10
lkysow pushed a commit that referenced this pull request Nov 16, 2017
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.

1 participant