Repository navigation
feat: unified structured logger from lib-node 3 - #135
Merged
Merged
Conversation
…d d-frame - @data-fair/lib-node-registry 0.7.2 -> 0.7.3 (api, worker): concurrent ensureArtefact calls share one download, temp dirs use a random suffix, a failed extraction rejects instead of leaving a half-written version behind the pointer (the missing processing-config-schema.json seen on export-file 0.8.0) - @data-fair/frame 0.18 -> 0.19 (ui): the parent validates child messages (numeric height, http(s) urls only), same message protocol - npm update in range: npm audit 21 -> 2 (1 low, 13 moderate, 7 high before), 0 with --omit=dev; the 2 left are nodemon 3.1.14 (latest) bundling minimatch 10, dev only - agent-surface golden regenerated: vjsf 4.8 documents setData partial writes and the item check of setFieldValue
- @data-fair/lib-node 2 -> 3 and @data-fair/lib-express 1 -> 2: internalError and eventsLog are
replaced by the pino logger (JSON on stdout in production, pretty in dev with pino-pretty)
- api and the worker's parent process log through @data-fair/lib-node/log.js, with static codes
and ids in their own fields; plugin failures and resource kills are warn, not error
- the worker runs each run in withLogContext({ processingId, runId, ownerKey })
- the task child process keeps console (its stdout and stderr are the protocol with the parent),
the parent relays its lines as task-stdout / task-stderr log lines
- eslint no-console on server code, Logging section in AGENTS.md
- shared/log-fields.ts: ownerLogFields (ownerKey, ownerDep, ownerName) and truncateLogValue, the names and limits of data-fair and catalogs - the run log context carries the 3 owner fields; relayed task output and run failure messages are cut at 1000 characters
# Conflicts: # api/package.json # package-lock.json # worker/package.json
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move to
@data-fair/lib-node3 and@data-fair/lib-express2, whose pino logger replacesinternalErrorandeventsLog, as the other services already did (catalogs #44).@data-fair/lib-node/log.js: staticcode, ids in their own fields, the error inerr. Plugin failures and memory kills arewarn,errorstays for internal failures.withLogContext({ processingId, runId, ...ownerLogFields(owner) })(ownerKey,ownerDep,ownerName, as data-fair and catalogs); relayed plugin output is cut at 1000 characters.console(the parent reads<running>on its stdout and shows its stderr to the user); the parent relays those lines astask-stdout/task-stderrlog lines instead of raw writes.no-consoleon server code, a Logging section in AGENTS.md,pino-prettyas a dev dependency.Why: processings was the last service on lib-node 2.
Heads-up: production logs become one JSON object per line (
NODE_ENV=production), so anything parsing the old text lines must follow;df_internal_erroris still emitted during the transition.