-
Notifications
You must be signed in to change notification settings - Fork 273
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
perf: improve preprocess action perf by capturing context instead of partially resolving template strings #6745
base: main
Are you sure you want to change the base?
Conversation
partially resolving template strings
...config, | ||
...resolvedBuiltin, | ||
spec, | ||
} |
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.
TODO: can we somehow keep early validation? Is it dangerous to remove?
The yaml highlighting did not work in production builds anyway and removing this functionality made it easier to compare performance between production builds and the dev build for commands like `get graph`.
99f72e9
to
cb0081c
Compare
fail early if we access an unresolved template value
Co-authored-by: Vladimir Vagaytsev <[email protected]>
sources: [], | ||
// this makes sure that the output declaration shape is valid | ||
outputs: serialiseUnresolvedTemplates(outputs), |
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.
@vvagaytsev We neeed to avoid calling serialiseUnresolvedTemplates in production code; It is meant as a test utility. This is not the right appraoch; What we need to do is either change the schema so it accepts unresolved values, or to validate the schema after resolving outputs.
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.
Otherwise outputs will never be resolved
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.
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.
Ah oh sorry, I somehow thought this line was changed by you 🤦 OK, I'll address this, will keep this open as a reminder for me
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.
It's also used in dumpConfig
function, but there it looks ok.
…ion" This reverts commit 3247a3c.
…able used by it changes"
…templates and any modules referencing them"
… var precedence order"
…ons with same key if one is disabled"
596342f
to
36c11ad
Compare
Follow-up fix for 57d968e.
…ion calculation is only affected if the variable is used. fixes #3473
|
||
return { | ||
partial: true, | ||
resolved: deepMap(result.resolved, (v) => capture(v, context)) as Collection<ParsedTemplate>, |
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.
resolved: deepMap(result.resolved, (v) => capture(v, context)) as Collection<ParsedTemplate>, | |
resolved: deepMap(result.resolved, (v) => capture(v, this.context)) as Collection<ParsedTemplate>, |
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: