-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ws-worker: support job log level in lightning plan (#867)
* support job log level in lightning plan * add integration test * add changeset * bump lexicon too * version: [email protected] * package lock * bump cli * package lock, always package lock * bundle lexicon --------- Co-authored-by: Joe Clark <[email protected]>
- Loading branch information
1 parent
10e5721
commit 7cbc8cc
Showing
22 changed files
with
522 additions
and
41 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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@openfn/integration-tests-execute", | ||
"private": true, | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "Job execution tests", | ||
"author": "Open Function Group <[email protected]>", | ||
"license": "ISC", | ||
|
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "@openfn/integration-tests-worker", | ||
"private": true, | ||
"version": "1.0.75", | ||
"version": "1.0.76", | ||
"description": "Lightning WOrker integration tests", | ||
"author": "Open Function Group <[email protected]>", | ||
"license": "ISC", | ||
|
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 |
---|---|---|
|
@@ -974,5 +974,48 @@ test.serial('Redact logs which exceed the payload limit', (t) => { | |
}); | ||
}); | ||
|
||
test.serial( | ||
"Don't send job logs to stdout when job_log_level is set to none", | ||
(t) => { | ||
return new Promise(async (done) => { | ||
await worker.destroy(); | ||
({ worker, engineLogger } = await createDummyWorker()); | ||
|
||
const message = 'log that will never exist'; | ||
|
||
const run = { | ||
id: crypto.randomUUID(), | ||
jobs: [ | ||
{ | ||
adaptor: '@openfn/[email protected]', | ||
body: `fn((s) => { console.log("${message}"); return s;})`, | ||
}, | ||
], | ||
options: { | ||
job_log_level: 'none', | ||
}, | ||
}; | ||
|
||
lightning.once('run:complete', () => { | ||
const jsonLogs = engineLogger._history; | ||
// The engine logger shouldn't print out any job logs | ||
const jobLog = jsonLogs.find((l) => l.name === 'JOB'); | ||
t.falsy(jobLog); | ||
const jobLog2 = jsonLogs.find((l) => l.message[0] === message); | ||
t.falsy(jobLog2); | ||
|
||
// But it SHOULD log engine stuff | ||
const runtimeLog = jsonLogs.find( | ||
(l) => l.name === 'engine' && l.message[0].match(/complete workflow/i) | ||
); | ||
t.truthy(runtimeLog); | ||
done(); | ||
}); | ||
|
||
lightning.enqueueRun(run); | ||
}); | ||
} | ||
); | ||
|
||
// REMEMBER the default worker was destroyed at this point! | ||
// If you want to use a worker, you'll have to create your own |
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# @openfn/cli | ||
|
||
## 1.11.2 | ||
|
||
### Patch Changes | ||
|
||
- Updated dependencies | ||
|
||
## 1.11.1 | ||
|
||
### Patch Changes | ||
|
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@openfn/compiler", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Compiler and language tooling for openfn jobs.", | ||
"author": "Open Function Group <[email protected]>", | ||
"license": "ISC", | ||
|
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
{ | ||
"name": "@openfn/lexicon", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Central repo of names and type definitions", | ||
"author": "Open Function Group <[email protected]>", | ||
"license": "ISC", | ||
"type": "module", | ||
"main": "index.js", | ||
"scripts": { | ||
"pack": "pnpm pack --pack-destination ../../dist" | ||
}, | ||
"exports": { | ||
".": { | ||
"import": { | ||
|
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
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
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
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
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
Oops, something went wrong.