Repository navigation
Add the storage id to the mount config - #12793
Conversation
|
Also @Xenopathic, something to cheer up about 😄 |
There was a problem hiding this comment.
Looks like we're writing the config file for every setup/file access ?
I could imagine cases with concurrency issue when multiple HTTP calls are calling setupFS() which will call initMountPointsHook() and write this config at the same time... who knows in what state the file will be ?
Maybe it would be better to first check whether there's an id in the config. If none was found, then write it.
But don't write it every time.
There was a problem hiding this comment.
Switched it to only writing back the config file if we added the id
51af35c to
4aa2887
Compare
|
Refer to this link for build results (access rights to CI server needed): Build result: FAILURE[...truncated 17 lines...]using GIT_SSH to set credentials using .gitcredentials to set credentials > git config --local credential.helper store --file=/tmp/git7601646795952828275.credentials # timeout=10 > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git config --local --remove-section credential # timeout=10 > git rev-parse origin/pr/12793/merge^{commit} # timeout=10 > git branch -a --contains 3acdcf065a88be0239d4ca10797b58c2d26cd3e7 # timeout=10 > git rev-parse remotes/origin/pr/12793/merge^{commit} # timeout=10Checking out Revision 3acdcf065a88be0239d4ca10797b58c2d26cd3e7 (origin/pr/12793/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 3acdcf065a88be0239d4ca10797b58c2d26cd3e7 > git rev-list 0d8587d0f6192941fc30f077b72d1be19557a78c # timeout=10First time build. Skipping changelog. > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » SLAVEpull-request-analyser-ng-simple » SLAVE completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 1 second💣 Test FAILed. 💣 |
|
Can you try and add a unit test in "tests/mountconfig.php" ? |
|
I guess there is nothing we can do here to avoid "mount.json" to be read twice ? (once in the MountProvider/etc stack and once here) |
|
Hmm, how about doing this storage id check+storing inside of |
|
I just tried creating new mount points (or renaming, or changing the settings), but they do always automatically receive a numeric id. Often I need to access them first for them to get an id. Would it be possible to give them a number right away ? Here are some steps for one of the issues:
|
4aa2887 to
d075b1d
Compare
|
Switched to adding the storage_id on every write |
|
The inspection completed: 4 new issues, 3 updated code elements |
|
Refer to this link for build results (access rights to CI server needed): |
|
Works properly now, thanks! 👍 |
|
@Xenopathic @DeepDiver1975 second reviewer ? |
|
Looks good 👍 |
Add the storage id to the mount config
First step into improving the config is making sure we have a stable id to work with.
cc @DeepDiver1975 @PVince81