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

refactor: extract fs lock into go-fs-lock #4631

Merged
merged 2 commits into from
Mar 30, 2018

Conversation

dignifiedquire
Copy link
Member

@dignifiedquire dignifiedquire commented Jan 31, 2018

Need this code in another place, so I figured I pull it out into its own thing to share the code.

Requires ipfs/go-fs-lock#1 to be merged and published to gx.

@ghost ghost assigned dignifiedquire Jan 31, 2018
@ghost ghost added the status/in-progress In progress label Jan 31, 2018
@dignifiedquire dignifiedquire force-pushed the refactor/extract-fs-lock branch from 10ad1b1 to 3475c6c Compare February 7, 2018 08:42
@dignifiedquire dignifiedquire changed the title [WIP] refactor: extract fs lock into go-fs-lock refactor: extract fs lock into go-fs-lock Feb 7, 2018
@dignifiedquire dignifiedquire force-pushed the refactor/extract-fs-lock branch from 3475c6c to 6ffb521 Compare February 7, 2018 09:47
@whyrusleeping
Copy link
Member

@dignifiedquire will need to rebase, package.json funtimes and all

@dignifiedquire dignifiedquire force-pushed the refactor/extract-fs-lock branch from 6ffb521 to 5243400 Compare February 16, 2018 07:09
@dignifiedquire
Copy link
Member Author

@whyrusleeping fixed

mfsr "github.com/ipfs/go-ipfs/repo/fsrepo/migrations"
serialize "github.com/ipfs/go-ipfs/repo/fsrepo/serialize"
dir "github.com/ipfs/go-ipfs/thirdparty/dir"
lockfile "gx/ipfs/QmTAQSKWDGV7MpNGZrcj9gzbBLk3vG77EcBkCQtPphCknP/go-fs-lock"
Copy link
Contributor

Choose a reason for hiding this comment

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

Since I'm the extracting expert now, I should point out that this import should be grouped with the other gx'ed ones...

@Kubuxu Kubuxu added RFM and removed status/in-progress In progress labels Mar 9, 2018
@Kubuxu Kubuxu added this to the go-ipfs 0.4.15 milestone Mar 9, 2018
@hsanjuan hsanjuan force-pushed the refactor/extract-fs-lock branch from 29156c5 to be8d915 Compare March 13, 2018 17:43
@ghost ghost assigned hsanjuan Mar 13, 2018
@ghost ghost added the status/in-progress In progress label Mar 13, 2018
@hsanjuan
Copy link
Contributor

I have bubbled the last version of go-fs-lock here (ipfs/go-fs-lock#3). I rebased on master, removed lock from package.json which was not used. The newer version should reduce the number of duplicate gx imports.

@hsanjuan
Copy link
Contributor

Did github stop at some point dismissing approvals when someone pushes new changes?

@dignifiedquire
Copy link
Member Author

Did github stop at some point dismissing approvals when someone pushes new changes?

it's a project specific setting you can change

@Kubuxu
Copy link
Member

Kubuxu commented Mar 13, 2018

LGTM and RFM.

@Kubuxu Kubuxu removed the status/in-progress In progress label Mar 13, 2018
@@ -297,7 +301,7 @@ func Init(repoPath string, conf *config.Config) error {
// process. If true, then the repo cannot be opened by this process.
func LockedByOtherProcess(repoPath string) (bool, error) {
Copy link
Member

Choose a reason for hiding this comment

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

@whyrusleeping any real reason to check this early (it's racy anyways)? We could get rid of the fs-repo-lock package entirely (depending directly on go4's lock) if we simply took the lock file when needed instead of checking.

dignifiedquire and others added 2 commits March 29, 2018 12:22

Verified

This commit was signed with the committer’s verified signature.
szokeasaurusrex Daniel Szoke
License: MIT
Signed-off-by: dignifiedquire <dignifiedquire@gmail.com>
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
@Stebalien Stebalien force-pushed the refactor/extract-fs-lock branch from be8d915 to 4792621 Compare March 29, 2018 19:23
@ghost ghost assigned Stebalien Mar 29, 2018
@ghost ghost added the status/in-progress In progress label Mar 29, 2018
@Stebalien Stebalien removed the status/in-progress In progress label Mar 29, 2018
@whyrusleeping whyrusleeping merged commit fa9489e into master Mar 30, 2018
@whyrusleeping whyrusleeping deleted the refactor/extract-fs-lock branch March 30, 2018 00:59
@djdv djdv mentioned this pull request Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants