kingamarton commented on a change in pull request #207:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/207#discussion_r499667131
##########
File path: pkg/common/configs/config.go
##########
@@ -142,6 +142,20 @@ type LoadSchedulerConfigFunc func(policyGroup string)
(*SchedulerConfig, error)
// Visible by tests
func LoadSchedulerConfigFromByteArray(content []byte) (*SchedulerConfig,
error) {
+ conf, err := ParseAndValidateConfig(content)
+ if err != nil {
+ return nil, err
+ }
+ // Create a sha256 checksum for this validated config
+ PopulateChecksum(content, conf)
+ return conf, err
+}
+
+func PopulateChecksum(content []byte, conf *SchedulerConfig) {
Review comment:
Since we call this function from handler.go as well, we need to keep it
public.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]