-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix the exception behavior when config.string
contains ${VAR} in the comments.
#16050
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ def deep_replace(value) | |
end | ||
else | ||
if value.is_a?(Array) | ||
value_array_index = 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. review note: this isn't used anywhere. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. :+1 it's a leftover from #13603 |
||
value.each_with_index do |single_value, i| | ||
value[i] = deep_replace(single_value) | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -172,7 +172,6 @@ public void displayDebugInformation() { | |
logger.debug("\n\n{}", configPart.getText()); | ||
} | ||
logger.debug("Merged config"); | ||
mashhurs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
logger.debug("\n\n{}", this.configString()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. review note: this line makes twice same config print (when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's duplicated only when the config in composed by just one SourceWithMetadata, but when the config is loaded from multiple files, like when glob operator is used, it logs, every single section, and then also the effective pipeline definition as it's passed down to the compiler. Example single file:
Example multiple files:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @andsel for checking this. It is not related to the PR/feature but printing config multiple times is really confuses user. I have placed back and will check if we can add a condition to properly print considering all config cases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great, I agree with you that replicating information could be misleading, but please file an issue to improve logging, maybe segments could logged at trace level while the full pipeline definition at debug, or something similar. |
||
} | ||
|
||
public SourceWithMetadata lookupSource(int globalLineNumber, int sourceColumn) | ||
|
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.
okay, things are clear now.
We do not really need var substitution when loading the YAML. Once we have pipeline definitions from YAML, we properly load the configs based on the given options (
config.string
,config.path
). Then, imperative pipeline compile operation executes the LSCL which wipes out the comments based on the rule