Repository navigation
Variables: Smarter resolution flow - #9140
Merged
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9140 +/- ##
==========================================
- Coverage 87.14% 87.01% -0.13%
==========================================
Files 294 293 -1
Lines 11256 11285 +29
==========================================
+ Hits 9809 9820 +11
- Misses 1447 1465 +18
Continue to review full report at Codecov.
|
medikoo
force-pushed
the
0318-smarter-vars-resolution
branch
from
March 18, 2021 12:02
8952df0 to
0fd43c1
Compare
`provider.name` and `plugins` specifically
medikoo
force-pushed
the
0318-smarter-vars-resolution
branch
from
March 18, 2021 12:07
0fd43c1 to
412d190
Compare
pgrzesik
approved these changes
Mar 18, 2021
pgrzesik
left a comment
Contributor
There was a problem hiding this comment.
Looks great, nothing to add 👍
20 tasks done
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9140 +/- ##
==========================================
- Coverage 87.14% 87.01% -0.13%
==========================================
Files 294 293 -1
Lines 11256 11285 +29
==========================================
+ Hits 9809 9820 +11
- Misses 1447 1465 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Instead of resolving all properties with every resolution phase, attempt to resolve only those properties that are required to be resolved at given phase.
While resolving all at first should not be seen harmful (once resolved properties are marked as resolved and are not re-resolved in following resolution phases), it implies a slight negative side effect to JS function resolvers, which are invoked at very early stage, and are subject to unavailability of some properties or sources -> Problem raised here: #8364 (comment)
One minor drawback of new approach is that some unrecoverable errors in variables setup will be discovered in later resolution phase and not in first one
With new partial resolution mechanism introduced, I've updated to resolve only
provider.nameandpluginsproperties if we deal with help command. As that's all properties that are needed to have complete pictures of available CLI commands and their options.Additionally:
variablesResolutionModeis used together withprovider.variableSyntaxprovider.nameis seen as not resolved at given stagescripts/serverless.jsso it's more maintanableisHelpRequestintoresolveInpututilresolveoperation (so far it returned an array of useless data, while all we need to know is that it resolved, hence nowundefinedis returned)