-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve IF logging protocols #753
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like something is not right here, see these logs for example:
DEBUG: 2024-05-31T12:29:04.237Z: teads-curve: Computing pipeline for `sum`
DEBUG: 2024-05-31T12:29:04.238Z: sum: Computing pipeline for `coefficient`
DEBUG: 2024-05-31T12:29:04.238Z: coefficient: Computing pipeline for `multiply`
the plugin names do not match (e.g. teads-curve: Computing pipeline for sum)
Also I don't see the console.x
rerouting working. Can you confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - tested with two manifests from our examples folder and saw the logs I exected when running using --debug
. Also tried injecting some dummy log statements into the builtins and saw their messages get emitted via the IF logger during the execution, which is great.
Thanks
src/index.ts
Outdated
import {parseIEProcessArgs} from './util/args'; | ||
import {andHandle} from './util/helpers'; | ||
import {logger} from './util/logger'; | ||
import {validateManifest} from './util/validations'; | ||
|
||
import {STRINGS} from './config'; | ||
|
||
const {DISCLAIMER_MESSAGE} = STRINGS; | ||
const {DISCLAIMER_MESSAGE, STARTING_IMPACT_FRAMEWORK, EXITING_IF} = STRINGS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if exiting if
, then starting if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manushak you got this wrong. in starting
you have written impact framework, however in exiting
just if. So for fixing this inconsistency please use if key in both places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh, I've got it now. The variable names are consistent with the message itself.
@jmcook1186, maybe we need to rename 'Starting Impact framework' to 'Starting IF' to be consistent with 'Exiting IF'. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@narekhovhannisyan renamed
hi @manushak I found a problem wit this PR - it doesn't output to e.g. prints nothing unless you add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manushak
Syncing prameters
is shown at the beginning of the log and without DEBUG label. So no matter running with --debug or without it. The console.debug(SYNCING_PARAMETERS); was called at wrong place

@manushak we are getting ton of checking aggregation method logs. Each field should appear once. ![]() ![]() |
@manushak when running if with debug flag, exhaust's logs are gone under ![]() ![]() |
@MariamKhalatova we get these huge logs because it traverses every input field. |
@manushak It's aggregation log and it's called repetitively for each input member (imagine what would happen with complex pipelines of 1000 nodes). There was memoize log function in code base, you can use that to log each one once. |
@manushak @MariamKhalatova I think the aggregation check only needs to be displayed one time for each parameter (i.e. for each element in |
@MariamKhalatova, I've fixed. Please test |
src/lib/parameterize.ts
Outdated
/** | ||
* Creates a handler for managing unique unit names. | ||
*/ | ||
const setUniqueUnitName = (() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already have something like this in our codebase memoizedLog
you can reuse that with minor modifications for avoiding code duplication
what's the status of this @manushak @MariamKhalatova ? have @MariamKhalatova 's requested changes been addressed? |
the requested changes have been fixed, and are waiting for testing |
Types of changes
A description of the changes proposed in the Pull Request
--debug
command functionality