Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
fix: remove zisi_go_drop_runtime_override flag (#1685)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Apr 19, 2024
1 parent 66b668b commit a789be6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
3 changes: 0 additions & 3 deletions src/feature_flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export const defaultFlags = {
// If multiple glob stars are in includedFiles, fail the build instead of warning.
zisi_esbuild_fail_double_glob: false,

// drops the "runtimeVersion" override field
zisi_go_drop_runtime_override: false,

// fixes symlinks in included files
zisi_fix_symlinks: false,
} as const
Expand Down
2 changes: 0 additions & 2 deletions src/runtimes/go/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ const zipFunction: ZipFunction = async function ({
srcPath,
stat,
isInternal,
featureFlags,
}) {
const destPath = join(destFolder, filename)
const isSource = extname(mainFile) === '.go'
Expand All @@ -138,7 +137,6 @@ const zipFunction: ZipFunction = async function ({
config,
displayName: config?.name,
generator: config?.generator || getInternalValue(isInternal),
runtimeVersion: featureFlags.zisi_go_drop_runtime_override ? undefined : 'provided.al2',
}

// If `zipGo` is enabled, we create a zip archive with the Go binary and the
Expand Down
7 changes: 1 addition & 6 deletions tests/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1780,9 +1780,6 @@ describe('zip-it-and-ship-it', () => {
zipGo: true,
},
},
featureFlags: {
zisi_go_drop_runtime_override: true,
},
},
})
const binaryPath = join(FIXTURES_DIR, fixtureName, 'test')
Expand Down Expand Up @@ -1836,7 +1833,7 @@ describe('zip-it-and-ship-it', () => {

const manifest = JSON.parse(await readFile(manifestPath, 'utf-8'))

expect(manifest.functions[0].runtimeVersion).toEqual('provided.al2')
expect(manifest.functions[0].runtimeVersion).toBeUndefined()

// remove the binary before unzipping
await rm(join(tmpDir, 'go-func-1'), { maxRetries: 10 })
Expand Down Expand Up @@ -1896,7 +1893,6 @@ describe('zip-it-and-ship-it', () => {
path: expect.anything(),
entryFilename: '',
runtime: 'go',
runtimeVersion: 'provided.al2',
},
{
config: expect.anything(),
Expand All @@ -1905,7 +1901,6 @@ describe('zip-it-and-ship-it', () => {
path: expect.anything(),
entryFilename: '',
runtime: 'go',
runtimeVersion: 'provided.al2',
},
])

Expand Down

1 comment on commit a789be6

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⏱ Benchmark results

  • largeDepsEsbuild: 1.2s
  • largeDepsNft: 5.4s
  • largeDepsZisi: 10.2s

Please sign in to comment.