Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/dco-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on: [pull_request]

jobs:
check:
runs-on: ubuntu-latest
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
steps:
- name: Check for DCO
id: dco-check
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ on:

jobs:
lint:
runs-on: ubuntu-latest
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Cache node modules
Expand All @@ -31,7 +34,9 @@ jobs:
npm run lint

unit-test:
runs-on: ubuntu-latest
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
strategy:
matrix:
# only LTS versions starting from the lowest we support
Expand Down Expand Up @@ -72,7 +77,9 @@ jobs:
retention-days: 1

e2e-test:
runs-on: ubuntu-latest
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
environment: azure-prod
env:
E2E_HOST: ${{ secrets.DATABRICKS_HOST }}
Expand Down Expand Up @@ -110,7 +117,9 @@ jobs:

coverage:
needs: [unit-test, e2e-test]
runs-on: ubuntu-latest
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
env:
cache-name: cache-node-modules

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
Expand Down
20 changes: 17 additions & 3 deletions lib/utils/lz4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@ function tryLoadLZ4Module(): LZ4Module | undefined {
try {
return require('lz4'); // eslint-disable-line global-require
} catch (err) {
const isModuleNotFoundError = err instanceof Error && 'code' in err && err.code === 'MODULE_NOT_FOUND';
if (!isModuleNotFoundError) {
throw err;
if (!(err instanceof Error) || !('code' in err)) {
console.warn('Unexpected error loading LZ4 module: Invalid error object', err);
return undefined;
}

if (err.code === 'MODULE_NOT_FOUND') {
console.warn('LZ4 module not installed: Missing dependency', err);
return undefined;
}

if (err.code === 'ERR_DLOPEN_FAILED') {
console.warn('LZ4 native module failed to load: Architecture or version mismatch', err);
return undefined;
}

// If it's not a known error, return undefined
console.warn('Unknown error loading LZ4 module: Unhandled error code', err);
return undefined;
}
}

Expand Down
Loading