Skip to content

Commit 49f29cf

Browse files
committed
Temp disable working os/arch combos
1 parent 1eccc68 commit 49f29cf

File tree

4 files changed

+157
-131
lines changed

4 files changed

+157
-131
lines changed

.github/workflows/ci.yml

Lines changed: 111 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -38,80 +38,80 @@ jobs:
3838
matrix:
3939
include:
4040
# x64 glibc
41-
- os: ubuntu-22.04
42-
container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
43-
node: 18
44-
binary: linux-x64-glibc-108
45-
- os: ubuntu-22.04
46-
container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
47-
node: 20
48-
binary: linux-x64-glibc-115
49-
- os: ubuntu-22.04
50-
container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
51-
node: 22
52-
binary: linux-x64-glibc-127
53-
- os: ubuntu-22.04
54-
container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
55-
node: 24
56-
binary: linux-x64-glibc-137
41+
# - os: ubuntu-22.04
42+
# container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
43+
# node: 18
44+
# binary: linux-x64-glibc-108
45+
# - os: ubuntu-22.04
46+
# container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
47+
# node: 20
48+
# binary: linux-x64-glibc-115
49+
# - os: ubuntu-22.04
50+
# container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
51+
# node: 22
52+
# binary: linux-x64-glibc-127
53+
# - os: ubuntu-22.04
54+
# container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
55+
# node: 24
56+
# binary: linux-x64-glibc-137
5757

5858
# x64 musl
59-
- os: ubuntu-22.04
60-
container: node:18-alpine3.17
61-
node: 18
62-
binary: linux-x64-musl-108
63-
- os: ubuntu-22.04
64-
container: node:20-alpine3.17
65-
node: 20
66-
binary: linux-x64-musl-115
67-
- os: ubuntu-22.04
68-
container: node:22-alpine3.18
69-
node: 22
70-
binary: linux-x64-musl-127
71-
- os: ubuntu-22.04
72-
container: node:24-alpine3.20
73-
node: 24
74-
binary: linux-x64-musl-137
59+
# - os: ubuntu-22.04
60+
# container: node:18-alpine3.17
61+
# node: 18
62+
# binary: linux-x64-musl-108
63+
# - os: ubuntu-22.04
64+
# container: node:20-alpine3.17
65+
# node: 20
66+
# binary: linux-x64-musl-115
67+
# - os: ubuntu-22.04
68+
# container: node:22-alpine3.18
69+
# node: 22
70+
# binary: linux-x64-musl-127
71+
# - os: ubuntu-22.04
72+
# container: node:24-alpine3.20
73+
# node: 24
74+
# binary: linux-x64-musl-137
7575

7676
# arm64 glibc
77-
- os: ubuntu-22.04
78-
arch: arm64
79-
node: 18
80-
binary: linux-arm64-glibc-108
81-
- os: ubuntu-22.04
82-
arch: arm64
83-
node: 20
84-
binary: linux-arm64-glibc-115
85-
- os: ubuntu-22.04
86-
arch: arm64
87-
node: 22
88-
binary: linux-arm64-glibc-127
89-
- os: ubuntu-22.04
90-
arch: arm64
91-
node: 24
92-
binary: linux-arm64-glibc-137
77+
# - os: ubuntu-22.04
78+
# arch: arm64
79+
# node: 18
80+
# binary: linux-arm64-glibc-108
81+
# - os: ubuntu-22.04
82+
# arch: arm64
83+
# node: 20
84+
# binary: linux-arm64-glibc-115
85+
# - os: ubuntu-22.04
86+
# arch: arm64
87+
# node: 22
88+
# binary: linux-arm64-glibc-127
89+
# - os: ubuntu-22.04
90+
# arch: arm64
91+
# node: 24
92+
# binary: linux-arm64-glibc-137
9393

9494
# arm64 musl
95-
- os: ubuntu-22.04
96-
arch: arm64
97-
container: node:18-alpine3.17
98-
node: 18
99-
binary: linux-arm64-musl-108
100-
- os: ubuntu-22.04
101-
arch: arm64
102-
container: node:20-alpine3.17
103-
node: 20
104-
binary: linux-arm64-musl-115
105-
- os: ubuntu-22.04
106-
arch: arm64
107-
container: node:22-alpine3.18
108-
node: 22
109-
binary: linux-arm64-musl-127
110-
- os: ubuntu-22.04
111-
arch: arm64
112-
container: node:24-alpine3.20
113-
node: 24
114-
binary: linux-arm64-musl-137
95+
# - os: ubuntu-22.04
96+
# arch: arm64
97+
# container: node:18-alpine3.17
98+
# node: 18
99+
# binary: linux-arm64-musl-108
100+
# - os: ubuntu-22.04
101+
# arch: arm64
102+
# container: node:20-alpine3.17
103+
# node: 20
104+
# binary: linux-arm64-musl-115
105+
# - os: ubuntu-22.04
106+
# arch: arm64
107+
# container: node:22-alpine3.18
108+
# node: 22
109+
# binary: linux-arm64-musl-127
110+
# - os: ubuntu-22.04
111+
# arch: arm64
112+
# container: node:24-alpine3.20
113+
# node: 24
114+
# binary: linux-arm64-musl-137
115115

116116
# macos x64
117117
- os: macos-13
@@ -132,44 +132,44 @@ jobs:
132132
binary: darwin-x64-137
133133

134134
# macos arm64
135-
- os: macos-13
136-
arch: arm64
137-
node: 18
138-
target_platform: darwin
139-
binary: darwin-arm64-108
140-
- os: macos-13
141-
arch: arm64
142-
node: 20
143-
target_platform: darwin
144-
binary: darwin-arm64-115
145-
- os: macos-13
146-
arch: arm64
147-
node: 22
148-
target_platform: darwin
149-
binary: darwin-arm64-127
150-
- os: macos-13
151-
arch: arm64
152-
node: 24
153-
target_platform: darwin
154-
binary: darwin-arm64-137
135+
# - os: macos-13
136+
# arch: arm64
137+
# node: 18
138+
# target_platform: darwin
139+
# binary: darwin-arm64-108
140+
# - os: macos-13
141+
# arch: arm64
142+
# node: 20
143+
# target_platform: darwin
144+
# binary: darwin-arm64-115
145+
# - os: macos-13
146+
# arch: arm64
147+
# node: 22
148+
# target_platform: darwin
149+
# binary: darwin-arm64-127
150+
# - os: macos-13
151+
# arch: arm64
152+
# node: 24
153+
# target_platform: darwin
154+
# binary: darwin-arm64-137
155155

156156
# windows x64
157-
- os: windows-2022
158-
node: 18
159-
arch: x64
160-
binary: win32-x64-108
161-
- os: windows-2022
162-
node: 20
163-
arch: x64
164-
binary: win32-x64-115
165-
- os: windows-2022
166-
node: 22
167-
arch: x64
168-
binary: win32-x64-127
169-
- os: windows-2022
170-
node: 24
171-
arch: x64
172-
binary: win32-x64-137
157+
# - os: windows-2022
158+
# node: 18
159+
# arch: x64
160+
# binary: win32-x64-108
161+
# - os: windows-2022
162+
# node: 20
163+
# arch: x64
164+
# binary: win32-x64-115
165+
# - os: windows-2022
166+
# node: 22
167+
# arch: x64
168+
# binary: win32-x64-127
169+
# - os: windows-2022
170+
# node: 24
171+
# arch: x64
172+
# binary: win32-x64-137
173173

174174
steps:
175175
- name: Setup (alpine)
@@ -313,16 +313,18 @@ jobs:
313313
name: Test (v${{ matrix.node }}) ${{ matrix.os }}
314314
needs: [job_build]
315315
runs-on: ${{ matrix.os }}
316+
env:
317+
DEBUG: true
316318
strategy:
317319
fail-fast: false
318320
matrix:
319321
os: [
320-
ubuntu-24.04,
321-
ubuntu-22.04,
322-
ubuntu-22.04-arm,
323-
macos-latest, # macOS arm64
322+
# ubuntu-24.04,
323+
# ubuntu-22.04,
324+
# ubuntu-22.04-arm,
325+
# macos-latest, # macOS arm64
324326
macos-13, # macOS x64
325-
windows-latest,
327+
# windows-latest,
326328
]
327329
node: [18, 20, 22, 24]
328330
steps:

module.cc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
#error "NODE_MAJOR_VERSION is not defined"
1919
#endif
2020

21+
#define SUPPORTS_ASYNC_CONTEXT_FRAME NODE_MAJOR_VERSION >= 22
22+
#define GET_CONTINUATION_PRESERVED_EMBEDDER_DATA_V2 NODE_MAJOR_VERSION >= 25
23+
2124
using namespace v8;
2225
using namespace node;
2326
using namespace std::chrono;
@@ -128,7 +131,7 @@ JsStackFrames GetStackFrames(Isolate *isolate) {
128131
return frames;
129132
}
130133

131-
#if NODE_MAJOR_VERSION >= 22
134+
#if SUPPORTS_ASYNC_CONTEXT_FRAME
132135
// Function to fetch the thread state from the async context store
133136
std::string GetThreadState(Isolate *isolate,
134137
const AsyncLocalStorageLookup &store) {
@@ -138,7 +141,11 @@ std::string GetThreadState(Isolate *isolate,
138141
// "ContinuationPreservedEmbedderData" map, keyed by the
139142
// AsyncLocalStorage instance.
140143
// https://github.com/nodejs/node/blob/c6316f9db9869864cea84e5f07585fa08e3e06d2/src/async_context_frame.cc#L37
144+
#if GET_CONTINUATION_PRESERVED_EMBEDDER_DATA_V2
145+
auto data = isolate->GetContinuationPreservedEmbedderDataV2().As<Value>();
146+
#else
141147
auto data = isolate->GetContinuationPreservedEmbedderData();
148+
#endif
142149
auto async_local_storage_local = store.async_local_storage.Get(isolate);
143150

144151
if (data.IsEmpty() || !data->IsMap() || async_local_storage_local.IsEmpty()) {
@@ -193,7 +200,7 @@ static void ExecutionInterrupted(Isolate *isolate, void *data) {
193200
auto frames = GetStackFrames(isolate);
194201
std::string state = "";
195202

196-
#if NODE_MAJOR_VERSION >= 22
203+
#if SUPPORTS_ASYNC_CONTEXT_FRAME
197204
if (args->store && args->store->has_value()) {
198205
state = GetThreadState(isolate, args->store->value());
199206
}
@@ -544,7 +551,7 @@ void GetThreadsLastSeen(const FunctionCallbackInfo<Value> &args) {
544551
extern "C" NODE_MODULE_EXPORT void
545552
NODE_MODULE_INITIALIZER(Local<Object> exports, Local<Value> module,
546553
Local<Context> context) {
547-
auto isolate = context->GetIsolate();
554+
auto isolate = v8::Isolate::GetCurrent();
548555

549556
exports
550557
->Set(context,

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@
2929
"build:bindings:configure:arm64": "node-gyp configure --arch=arm64 --target_arch=arm64",
3030
"build:bindings": "node-gyp build && node scripts/copy-target.mjs",
3131
"build:bindings:arm64": "node-gyp build --arch=arm64 && node scripts/copy-target.mjs",
32-
"build:dev": "yarn clean && yarn build:bindings:configure && yarn build",
3332
"build:tarball": "npm pack",
3433
"clean": "node-gyp clean && rm -rf lib && rm -rf build && rm -f *.tgz",
35-
"test": "yarn test:install && node ./test/prepare.mjs && vitest run --silent=false --disable-console-intercept",
34+
"test": "yarn test:install && yarn test:prepare && vitest run --silent=false --disable-console-intercept",
3635
"test:prepare": "node ./test/prepare.mjs",
3736
"test:install": "cross-env ALWAYS_THROW=true yarn install"
3837
},

0 commit comments

Comments
 (0)