-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
CircleCI
committed
Dec 1, 2024
1 parent
758cef0
commit e5d637d
Showing
12 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+74.9 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-14/deasync.node
Binary file not shown.
Binary file added
BIN
+30.9 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-15/deasync.node
Binary file not shown.
Binary file added
BIN
+74.9 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-16/deasync.node
Binary file not shown.
Binary file added
BIN
+30.7 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-17/deasync.node
Binary file not shown.
Binary file added
BIN
+74.9 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-18/deasync.node
Binary file not shown.
Binary file added
BIN
+74.6 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-19/deasync.node
Binary file not shown.
Binary file added
BIN
+74.9 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-20/deasync.node
Binary file not shown.
Binary file added
BIN
+74.9 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-21/deasync.node
Binary file not shown.
Binary file added
BIN
+74.9 KB
scripts/hooks/postinstall/deasync-binaries/linux-arm64-node-22/deasync.node
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env node | ||
|
||
const path = require('path'); | ||
const fs = require('fs-extra'); | ||
|
||
try { | ||
const deasyncPath = path.dirname(require.resolve('deasync')); | ||
const deasyncBinPath = path.join(deasyncPath, 'bin'); | ||
const sourcePath = path.join(__dirname, 'deasync-binaries'); | ||
|
||
console.log('Copying deasync binaries:', 'from', sourcePath, 'to', deasyncBinPath); | ||
fs.copySync(sourcePath, deasyncBinPath, { overwrite: false }); | ||
} catch (e) { | ||
console.error('Failed to copy deasync binaries:', e); | ||
console.warn('@lumigo/opentelemetry/sync endpoint might not work as expected'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import path from "path" | ||
import { range } from 'lodash' | ||
import fs from "fs" | ||
|
||
const deasyncPath = path.dirname(require.resolve("deasync")) | ||
const supportedSyncInitNodeVersions = range(14, 22) | ||
|
||
describe("pre-built binaries for arm64 (applicable when loaded by the operator)", () => { | ||
/* | ||
This test effectively checks the correctness of our post-install script, responsible for adding pre-built binaries | ||
for the `deasync` package to be used on arm64 hosts. | ||
Those binaries are required since: | ||
1. The `deasync` package is a native module, and as such, it needs to be compiled for the target architecture. | ||
2. The operator pre-installs the distro (and therefore pre-compiles the `deasync` package), so it could be later added | ||
from an init-container volume-mount | ||
3. Since that pre-installed version is compiled when building the injector image, it does not product a binary for other target plafforms | ||
4. `deasync` addresses that by providing pre-built binaries for the most common platforms, but not for arm64 :( | ||
*/ | ||
test.each(supportedSyncInitNodeVersions)("binaries are added for arm64 running Node %i", nodeVersion => { | ||
const expectedBinaryPath = path.join(deasyncPath, "bin", `linux-arm64-node-${nodeVersion}`) | ||
expect(fs.existsSync(expectedBinaryPath)).toBe(true) | ||
}) | ||
}) |