GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #690 from crazy-max/history-export-finalize · docker/actions-toolkit@34ddc49

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/buildx
    • history.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/buildx/history.ts‎

Copy file name to clipboardExpand all lines: src/buildx/history.ts
+11-3Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,11 @@ export class History {
105105
return await this.exportLegacy(builderName, nodeName, refs, outDir, opts.image);
106106
}
107107

108-
// wait 3 seconds to ensure build records are finalized: https://github.com/moby/buildkit/pull/5109
109-
await Util.sleep(3);
108+
if (await this.buildx.versionSatisfies('<0.24.0')) {
109+
// wait 3 seconds to ensure build records are finalized: https://github.com/moby/buildkit/pull/5109
110+
// not necessary since buildx 0.24.0: https://github.com/docker/buildx/pull/3152
111+
await Util.sleep(3);
112+
}
110113

111114
const summaries: Summaries = {};
112115
if (!opts.noSummaries) {
@@ -139,7 +142,12 @@ export class History {
139142

140143
const dockerbuildPath = path.join(outDir, `${History.exportFilename(refs)}.dockerbuild`);
141144

142-
const cmd = await this.getExportCommand(['--builder', builderName, '--output', dockerbuildPath, ...refs]);
145+
const exportArgs = ['--builder', builderName, '--output', dockerbuildPath, ...refs];
146+
if (await this.buildx.versionSatisfies('>=0.24.0')) {
147+
exportArgs.push('--finalize');
148+
}
149+
150+
const cmd = await this.getExportCommand(exportArgs);
143151
await Exec.getExecOutput(cmd.command, cmd.args);
144152

145153
const dockerbuildStats = fs.statSync(dockerbuildPath);

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.