wilfred-s commented on a change in pull request #364:
URL: 
https://github.com/apache/incubator-yunikorn-k8shim/pull/364#discussion_r809646938



##########
File path: pkg/shim/scheduler.go
##########
@@ -241,16 +242,23 @@ func (ss *KubernetesShim) doScheduling(e *fsm.Event) {
 
 func (ss *KubernetesShim) registerShimLayer() error {
        configuration := conf.GetSchedulerConf()
+
+       var buildInfoMap map[string]string
+       buildInfoMap["version"] = conf.Version
+       buildInfoMap["date"] = conf.Date
+
        registerMessage := si.RegisterResourceManagerRequest{
                RmID:        configuration.ClusterID,
                Version:     configuration.ClusterVersion,
                PolicyGroup: configuration.PolicyGroup,
+               BuildInfo:   buildInfoMap,
        }
 
        log.Logger().Info("register RM to the scheduler",
                zap.String("clusterID", configuration.ClusterID),
                zap.String("clusterVersion", configuration.ClusterVersion),
-               zap.String("policyGroup", configuration.PolicyGroup))
+               zap.String("policyGroup", configuration.PolicyGroup),
+               zap.String("buildInfo", fmt.Sprintf("%v", buildInfoMap)))

Review comment:
       use the `zap.Any("buildInfo", buildInfoMap)` construct and let zap 
figure out how to log this.

##########
File path: pkg/conf/schedulerconf.go
##########
@@ -51,6 +51,9 @@ var once sync.Once
 var configuration *SchedulerConf
 var factory = initConfigs
 
+var Version string
+var Date string
+

Review comment:
       Add a boolean flag to show that it is the plugin version or not. Set to 
true in the schedulerplugin/main.go file

##########
File path: pkg/shim/scheduler.go
##########
@@ -241,16 +242,23 @@ func (ss *KubernetesShim) doScheduling(e *fsm.Event) {
 
 func (ss *KubernetesShim) registerShimLayer() error {
        configuration := conf.GetSchedulerConf()
+
+       var buildInfoMap map[string]string
+       buildInfoMap["version"] = conf.Version
+       buildInfoMap["date"] = conf.Date
+
        registerMessage := si.RegisterResourceManagerRequest{
                RmID:        configuration.ClusterID,
                Version:     configuration.ClusterVersion,
                PolicyGroup: configuration.PolicyGroup,
+               BuildInfo:   buildInfoMap,

Review comment:
       This should be fixed as the SI reference has been updated already to 
include this

##########
File path: pkg/cmd/schedulerplugin/main.go
##########
@@ -40,6 +40,9 @@ func main() {
        pluginconf.BuildVersion = version
        pluginconf.BuildDate = date
 
+       conf.Version = version
+       conf.Date = date
+

Review comment:
       These should replace the plugin config BuildVersion and BuildDate, those 
should be removed here and from the pluginconf code 




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to