-
Notifications
You must be signed in to change notification settings - Fork 458
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
[WFCORE-6349] Log yaml files used for configuration extension #5582
Conversation
Hello, The-Huginn. I'm waiting for one of the admins to verify this patch with /ok-to-test in a comment. |
/ok-to-test |
this.configs.add(config); | ||
} | ||
} else { | ||
throw MGMT_OP_LOGGER.missingYamlFile(file != null ? file.toAbsolutePath().toString() : ""); | ||
} | ||
} | ||
MGMT_OP_LOGGER.loadingYamlFiles(System.currentTimeMillis() - start); | ||
MGMT_OP_LOGGER.loadingYamlFiles(System.currentTimeMillis() - start, String.join(",", parsedFiles)); |
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.
I'm not very familiar with yaml
configuration, but since now the log level is INFO, would this load method be called always even if there are no files to process? I'm just wondering if we are going to have always a log trace independently if there are files parsed.
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.
Why use a list for this since we know the number of files
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.
I used list as we know only maximum number of files. They still need to contain the valid root node, which is being checked. I can redo it into array however an additional variable for iterating the array will be needed.
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.
Ok, Let's keep the list
@yersan the extension is loaded only if there are configuration files
@@ -115,13 +116,14 @@ private void load() { | |||
for (String excluded : EXCLUDED_ELEMENTS) { | |||
config.remove(excluded); | |||
} | |||
parsedFiles.add(file.toFile().getName()); |
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 should put the absolute path if the gaol is to know which files were used
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.
I will update it
this.configs.add(config); | ||
} | ||
} else { | ||
throw MGMT_OP_LOGGER.missingYamlFile(file != null ? file.toAbsolutePath().toString() : ""); | ||
} | ||
} | ||
MGMT_OP_LOGGER.loadingYamlFiles(System.currentTimeMillis() - start); | ||
MGMT_OP_LOGGER.loadingYamlFiles(System.currentTimeMillis() - start, String.join(",", parsedFiles)); |
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.
Why use a list for this since we know the number of files
@LogMessage(level = DEBUG) | ||
@Message(id = 487, value = "It took %s ms to load and parse the yaml files") | ||
void loadingYamlFiles(long duration); | ||
@LogMessage(level = INFO) |
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.
This should be left in DEBUG
Core -> Full Integration Build 12763 outcome was FAILURE using a merge of f8f20b1 Failed tests
|
Core -> Full Integration Build 12565 outcome was FAILURE using a merge of 100ebc9 Failed tests
|
@ehsavoie Do you agree with the current status? |
Thanks @The-Huginn and @ehsavoie |
https://issues.redhat.com/browse/WFCORE-6349