Commit d350935
committed
fix: split OSV activity env reads so derive doesn't require sync vars
Cursor pointed out that osvDeriveCriticalFlag was calling
getActivityConfig() and eagerly validating OSV_BULK_BASE_URL,
OSV_TMP_DIR, and OSV_BATCH_SIZE — env vars only the sync activity
uses. Running the derive activity in isolation (e.g. for testing
or debugging) failed with a misleading "Missing required env var"
pointing at vars the derive never needed.
Split into getSyncConfig() and getDeriveConfig(), each activity
reads only its own env. Matches the same shape applied to
proxyActivities in workflows.ts last round — sync and derive are
independent activities and should have independent contracts.
No behavior change in normal scheduled runs (the workflow sets up
the full env anyway); the cleanup is for isolated/debug paths.
72 unit tests still pass.
Signed-off-by: Joan Reyero <joan@reyero.io>1 parent 2510e55 commit d350935
1 file changed
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
26 | | - | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
78 | 85 | | |
79 | 86 | | |
80 | 87 | | |
81 | | - | |
| 88 | + | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
| |||
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
162 | | - | |
| 169 | + | |
163 | 170 | | |
164 | 171 | | |
165 | 172 | | |
| |||
0 commit comments