{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":178360215,"defaultBranch":"master","name":"cli","ownerLogin":"djs55","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2019-03-29T08:03:01.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/198586?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1702993794.0","currentOid":""},"activityList":{"items":[{"before":"f29eeeb4fe6e09beb6a2c4b0c51a6cf4fbcda27b","after":"6a77718c5e8b3ca1410eff93607a12727a2e15ba","ref":"refs/heads/windows-file-rename","pushedAt":"2023-12-19T13:53:03.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"context: FILE_SHARE_DELETE + ReplaceFile + MoveFileEx is enough\n\nReplaceFile works even if the target is open (with FILE_SHARE_DELETE)\nHowever it fails if the target does not exist yet. Therefore we try\nMoveFileEx to cover this case and retry ReplaceFile afterwards.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"context: FILE_SHARE_DELETE + ReplaceFile + MoveFileEx is enough"}},{"before":null,"after":"f29eeeb4fe6e09beb6a2c4b0c51a6cf4fbcda27b","ref":"refs/heads/windows-file-rename","pushedAt":"2023-12-19T13:49:54.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"context: FILE_SHARE_DELETE + ReplaceFile + MoveFileEx is enough\n\nReplaceFile works even if the target is open (with FILE_SHARE_DELETE)\nHowever it fails if the target does not exist yet. Therefore we try\nMoveFileEx to cover this case and retry ReplaceFile afterwards.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"context: FILE_SHARE_DELETE + ReplaceFile + MoveFileEx is enough"}},{"before":"3bb24139b2931c97f8491eb2596a083662abd126","after":"81b67b23a1817257445b5583f6abb565dd58cb9b","ref":"refs/heads/windows-file-share-delete","pushedAt":"2023-12-18T15:04:29.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"context: FILE_SHARE_DELETE is not enough\n\nIt's still a sharing violation if the rename target is open. All we\ncan do is delete the file and then run the rename, but this isn't\natomic so anyone who tries to read the file in the gap will see a\nfile not found error.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"context: FILE_SHARE_DELETE is not enough"}},{"before":null,"after":"3bb24139b2931c97f8491eb2596a083662abd126","ref":"refs/heads/windows-file-share-delete","pushedAt":"2023-12-18T14:19:31.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"context: read meta.json with FILE_SHARE_DELETE\n\nUse the same fork of os.Open() as moby/moby to read meta.json with\nFILE_SHARE_DELETE on Windows, to ensure that a concurrent call to\nCreateOrUpdate which calls os.Rename() will succeed, rather than fail\nwith \"Access is Denied\".\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"context: read meta.json with FILE_SHARE_DELETE"}},{"before":"8eeb3b4d9aae71604f20a24b1dc0deaffd90d1b3","after":"ab429fe3c96a4a36775f1252c1ba0f5b3f2c714c","ref":"refs/heads/windows-lock","pushedAt":"2023-12-18T11:59:06.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"Revert \"vendor: github.com/hashicorp/go-multierror\"\n\nThis reverts commit 13af591955d2c8812eced0dc2238ae6db4091891.","shortMessageHtmlLink":"Revert \"vendor: github.com/hashicorp/go-multierror\""}},{"before":"1820f379aed1ff5cfcec0b144024030334037345","after":"8eeb3b4d9aae71604f20a24b1dc0deaffd90d1b3","ref":"refs/heads/windows-lock","pushedAt":"2023-12-18T11:58:28.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: use stdlib errors rather than github.com/pkg/errors\n\nhttps://github.com/pkg/errors has been archived since Dec 2021\n\nReplace\n- errors.Errorf and errors.Wrap with fmt.Errorf(\"%w\")\n- multierror.Append with errors.Join\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: use stdlib errors rather than github.com/pkg/errors"}},{"before":"c37bb67016374cc6890e2e87f9214e9f75df69d8","after":"1820f379aed1ff5cfcec0b144024030334037345","ref":"refs/heads/windows-lock","pushedAt":"2023-12-18T09:57:15.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: serialise access with a file lock\n\nPreviously the code attempts to use ioutils.AtomicWriteFile to update\nmeta.json but this fails on Windows if another process has the meta.json\nopen for reading (unlike on Unix OSes).\n\nExample error:\n```\nrename C:\\Users\\docker\\.docker\\contexts\\meta\\\\.tmp-meta.json2945721760 C:\\Users\\docker\\.docker\\contexts\\meta\\\\meta.json: Access is denied.\n```\n\nSo if one `docker context inspect` is running, then another `docker context`\ncommand can fail transiently in `CreateOrUpdate`.\n\nAvoid this problem by serialising accesses to the context filesystem db\nusing a lock file via github.com/gofrs/flock which uses LockFileEx\non Windows and syscall.Flock on Unix. The lock is associated with a\nfile descriptor / handle and released by calling Close() or when the\nprocess exits.\n\nNote this means that functions which could previously fail for one reason\ncan now fail for two (the original + a lock/unlock failure). Use\ngo-multierror to return all the errors. When we upgrade to go 1.20 we can\nuse errors.Join.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: serialise access with a file lock"}},{"before":null,"after":"c37bb67016374cc6890e2e87f9214e9f75df69d8","ref":"refs/heads/windows-lock","pushedAt":"2023-12-18T08:26:12.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: serialise access with a file lock\n\nPreviously the code attempts to use ioutils.AtomicWriteFile to update\nmeta.json but this fails on Windows if another process has the meta.json\nopen for reading (unlike on Unix OSes).\n\nExample error:\n```\nrename C:\\Users\\docker\\.docker\\contexts\\meta\\\\.tmp-meta.json2945721760 C:\\Users\\docker\\.docker\\contexts\\meta\\\\meta.json: Access is denied.\n```\n\nSo if one `docker context inspect` is running, then another `docker context`\ncommand can fail transiently in `CreateOrUpdate`.\n\nAvoid this problem by serialising accesses to the context filesystem db\nusing a lock file via github.com/gofrs/flock which uses LockFileEx\non Windows and syscall.Flock on Unix. The lock is associated with a\nfile descriptor / handle and released by calling Close() or when the\nprocess exits.\n\nNote this means that functions which could previously fail for one reason\ncan now fail for two (the original + a lock/unlock failure). Use\ngo-multierror to return all the errors. When we upgrade to go 1.20 we can\nuse errors.Join.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: serialise access with a file lock"}},{"before":"8837d113e3dccab016a3f2e93fcf5a38e37335d2","after":"70d01b926282f69949ee874215a67cc8ba53416a","ref":"refs/heads/master","pushedAt":"2023-12-18T08:22:27.000Z","pushType":"push","commitsCount":343,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"Merge pull request #4719 from thaJeztah/go_compat\n\nadd //go:build directives to prevent downgrading to go1.16 language","shortMessageHtmlLink":"Merge pull request docker#4719 from thaJeztah/go_compat"}},{"before":"41a787605de361d6077495aee3615699a71be533","after":"7468116267d0b342e7ef574e0910e3f40bd320e3","ref":"refs/heads/v25.0.0-beta.1-lock","pushedAt":"2023-12-17T20:25:01.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: serialise access with a file lock\n\nPreviously the code attempts to use ioutils.AtomicWriteFile to update\nmeta.json but this fails on Windows if another process has the meta.json\nopen for reading (unlike on Unix OSes).\n\nExample error:\n```\nrename C:\\Users\\docker\\.docker\\contexts\\meta\\\\.tmp-meta.json2945721760 C:\\Users\\docker\\.docker\\contexts\\meta\\\\meta.json: Access is denied.\n```\n\nSo if one `docker context inspect` is running, then another `docker context`\ncommand can fail transiently in `CreateOrUpdate`.\n\nAvoid this problem by serialising accesses to the context filesystem db\nusing a lock file via github.com/gofrs/flock which uses LockFileEx\non Windows and syscall.Flock on Unix. The lock is associated with a\nfile descriptor / handle and released by calling Close() or when the\nprocess exits.\n\nNote this means that functions which could previously fail for one reason\ncan now fail for two (the original + a lock/unlock failure). Use\ngo-multierror to return all the errors. When we upgrade to go 1.20 we can\nuse errors.Join.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: serialise access with a file lock"}},{"before":"e03f65aba05a8130dd1dcf95dd91d1bedc89e42f","after":"41a787605de361d6077495aee3615699a71be533","ref":"refs/heads/v25.0.0-beta.1-lock","pushedAt":"2023-12-17T19:33:28.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: serialise access with a file lock\n\nPreviously the code attempts to use ioutils.AtomicWriteFile to update\nmeta.json but this fails on Windows if another process has the meta.json\nopen for reading (unlike on Unix OSes).\n\nSo if one `docker context inspect` is running, then another `docker context`\ncommand can fail transiently in `CreateOrUpdate`.\n\nAvoid this problem by serialising accesses to the context filesystem db\nusing a lock file via github.com/gofrs/flock which uses LockFileEx\non Windows and syscall.Flock on Unix OSes. The lock is associated with a\nfile descriptor / handle and released by calling Close() or when the\nprocess exits.\n\nNote this means that functions which could previously fail for one reason\ncan now fail for two (the original + a lock/unlock failure). Use\ngo-multierror to return all the errors. When we upgrade to go 1.20 we can\nuse errors.Join.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: serialise access with a file lock"}},{"before":"5c950cf7bb55d0c3500a74e10c3da93650abefb1","after":"e03f65aba05a8130dd1dcf95dd91d1bedc89e42f","ref":"refs/heads/v25.0.0-beta.1-lock","pushedAt":"2023-12-17T19:27:28.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: serialise access with a file lock\n\nPreviously the code attempts to use ioutils.AtomicWriteFile to update\nmeta.json but this fails on Windows if another process has the meta.json\nopen for reading (unlike on Unix OSes).\n\nSo if one `docker context inspect` is running, then another `docker context`\ncommand can fail transiently in `CreateOrUpdate`.\n\nAvoid this problem by serialising accesses to the context filesystem db\nusing a lock file via github.com/gofrs/flock which uses LockFileEx\non Windows and syscall.Flock on Unix OSes. The lock is associated with a\nfile descriptor / handle and released by calling Close() or when the\nprocess exits.\n\nNote this means that functions which could previously fail for one reason\ncan now fail for two (the original + a lock/unlock failure). Use\ngo-multierror to return all the errors. When we upgrade to go 1.20 we can\nuse errors.Join.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: serialise access with a file lock"}},{"before":"7308b34b28b06de58800010e127d97fbdf779b85","after":"5c950cf7bb55d0c3500a74e10c3da93650abefb1","ref":"refs/heads/v25.0.0-beta.1-lock","pushedAt":"2023-12-17T19:22:17.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: serialise access with a file lock\n\nPreviously the code attempts to use ioutils.AtomicWriteFile to update\nmeta.json but this fails on Windows if another process has the meta.json\nopen for reading (unlike on Unix OSes).\n\nSo if one `docker context inspect` is running, then another `docker context`\ncommand can fail transiently in `CreateOrUpdate`.\n\nAvoid this problem by serialising accesses to the context filesystem db\nusing a lock file via github.com/gofrs/flock which uses LockFileEx\non Windows and syscall.Flock on Unix OSes. The lock is associated with a\nfile descriptor / handle and released by calling Close() or when the\nprocess exits.\n\nNote this means that functions which could previously fail for one reason\ncan now fail for two (the original + a lock/unlock failure). Use\ngo-multierror to return all the errors. When we upgrade to go 1.20 we can\nuse errors.Join.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: serialise access with a file lock"}},{"before":null,"after":"7308b34b28b06de58800010e127d97fbdf779b85","ref":"refs/heads/v25.0.0-beta.1-lock","pushedAt":"2023-12-17T16:21:25.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: serialise access with a file lock\n\nPreviously the code attempts to use ioutils.AtomicWriteFile to update\nmeta.json but this fails on Windows if another process has the meta.json\nopen for reading (unlike on Unix OSes).\n\nSo if one `docker context inspect` is running, then another `docker context`\ncommand can fail transiently in `CreateOrUpdate`.\n\nAvoid this problem by serialising accesses to the context filesystem db\nusing a lock file via github.com/gofrs/flock which uses LockFileEx\non Windows and syscall.Flock on Unix OSes. The lock is associated with a\nfile descriptor / handle and released by calling Close() or when the\nprocess exits.\n\nNote this means that functions which could previously fail for one reason\ncan now fail for two (the original + a lock/unlock failure). Use\ngo-multierror to return all the errors. When we upgrade to go 1.20 we can\nuse errors.Join.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: serialise access with a file lock"}},{"before":"35270b33b071d3f45bfdb81ab4377cde179ca4ef","after":"bbd818f5348dd712bc94a8f5c397e282917a2add","ref":"refs/heads/lock","pushedAt":"2023-12-17T15:23:52.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"store: serialise access with a file lock\n\nPreviously the code attempts to use ioutils.AtomicWriteFile to update\nmeta.json but this fails on Windows if another process has the meta.json\nopen for reading (unlike on Unix OSes).\n\nSo if one `docker context inspect` is running, then another `docker context`\ncommand can fail transiently in `CreateOrUpdate`.\n\nAvoid this problem by serialising accesses to the context filesystem db\nusing a lock file via github.com/gofrs/flock which uses LockFileEx\non Windows and syscall.Flock on Unix OSes. The lock is associated with a\nfile descriptor / handle and released by calling Close() or when the\nprocess exits.\n\nNote this means that functions which could previously fail for one reason\ncan now fail for two (the original + a lock/unlock failure). Use\ngo-multierror to return all the errors. When we upgrade to go 1.20 we can\nuse errors.Join.\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"store: serialise access with a file lock"}},{"before":null,"after":"35270b33b071d3f45bfdb81ab4377cde179ca4ef","ref":"refs/heads/lock","pushedAt":"2023-12-15T14:42:54.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"vendor: github.com/hashicorp/go-multierror\n\nSigned-off-by: David Scott ","shortMessageHtmlLink":"vendor: github.com/hashicorp/go-multierror"}},{"before":"8dd94d382409b7384d210a2ed84b52f0d4a12995","after":"8837d113e3dccab016a3f2e93fcf5a38e37335d2","ref":"refs/heads/master","pushedAt":"2023-07-21T16:32:10.000Z","pushType":"push","commitsCount":857,"pusher":{"login":"djs55","name":"David Scott","path":"/djs55","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/198586?s=80&v=4"},"commit":{"message":"Merge pull request #4456 from thaJeztah/cli_engine_deps\n\nvendor: update dependencies for engine","shortMessageHtmlLink":"Merge pull request docker#4456 from thaJeztah/cli_engine_deps"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADzdoHvQA","startCursor":null,"endCursor":null}},"title":"Activity ยท djs55/cli"}