DImuthuUpe commented on code in PR #743:
URL: https://github.com/apache/airavata/pull/743#discussion_r4501859168


##########
internal/ssh/interactive.go:
##########
@@ -21,9 +21,10 @@ type SSHInteractiveAuth struct {
        CreatedAt  time.Time
        dialConfig SSHDialConfig
 
-       // banner is set before the auth is published and never changes, so it 
needs
-       // no lock.
-       banner string
+       // banner and connection are set before the auth is published and never 
change, so
+       // they need no lock. connection is the client connection the prompts 
go back to.
+       banner     string
+       connection string

Review Comment:
   Why do we need another connection string?



##########
internal/ssh/interactive.go:
##########
@@ -61,7 +62,7 @@ func (s *SSHInteractiveAuth) Challenge(ctx context.Context, 
name, instruction st
        select {
        case <-s.authWaitSignal:
        case <-ctx.Done():
-               return nil, ctx.Err()
+               return nil, context.Cause(ctx)

Review Comment:
   @yasithdev What is the reason for this change?



##########
api/session/model/session.go:
##########
@@ -0,0 +1,35 @@
+/**
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+ */
+
+// Package model holds the session entity: an owner's handle on a series of 
runs, each
+// an existing BATCH_JOB process.
+package model
+
+// Session owns the runs that carry its id. CurrentProcessID is a cache of the 
newest
+// run, maintained by the session service; it carries no foreign key, like
+// Process.LastStatusID.
+type Session struct {
+       ID               string 
`gorm:"column:session_id;primaryKey;type:varchar(36)" json:"sessionId"`
+       OwnerID          string `gorm:"column:user_id;type:varchar(255);not 
null;index" json:"userId"`
+       CreatedAt        int64  `gorm:"column:created_at;type:bigint;not null" 
json:"createdAt"`
+       CurrentProcessID string 
`gorm:"column:current_process_id;type:varchar(36);not null" 
json:"currentProcessId"`
+}

Review Comment:
   Can we use the same process object instead of session? 



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