Skip to content
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

Add ExecutionProgress() method to function interface to report exec progress #2023

Merged
merged 21 commits into from
Oct 3, 2023

Conversation

PrasadG193
Copy link
Contributor

@PrasadG193 PrasadG193 commented Apr 17, 2023

Change Overview

This PR adds ExecProgress() method to Kanister function interface to report the function exec progress.
This PR replaces the weight based progress calculation logic with function-specific implementation.
By default, all functions report progressPercent as 0 during exec and 100 once the execution is completed.
Ideally, each function should have a way to get stats of execution progress. Which can be added as a followup

The design has been discussed here: #1875

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

Sample output of actionSet status of each phase completion status

TC:1 Blueprint action consists of 3 phases and all phases succeeds

1. First phase completed

status:
  actions:
  - artifacts:
      operatorBackup:
        keyValue:
          path: '{{ .Phases.phase3.Output.path }}'
    blueprint: operator-blueprint
    deferPhase:
      name: ""
      progress: {}
      state: ""
    name: backup
    object:
      apiVersion: ""
      group: ""
      kind: statefulset
      name: mysql
      namespace: mysql
      resource: ""
    phases:
    - name: phase1
      output:
        path: /operator-backups/2023-04-19T18-42-49/backup.tgz
      progress:
        lastTransitionTime: "2023-04-19T18:43:10Z"
        progressPercent: "100"
      state: complete
    - name: phase2
      progress: {}
      state: running
    - name: phase3
      progress: {}
      state: pending
  error:
    message: ""
  progress:
    lastTransitionTime: "2023-04-19T18:43:10Z"
    percentCompleted: "33"
    runningPhase: phase2
  state: running

2. Second phase completed

status:
  actions:
  - artifacts:
      operatorBackup:
        keyValue:
          path: '{{ .Phases.phase3.Output.path }}'
    blueprint: operator-blueprint
    deferPhase:
      name: ""
      progress: {}
      state: ""
    name: backup
    object:
      apiVersion: ""
      group: ""
      kind: statefulset
      name: mysql
      namespace: mysql
      resource: ""
    phases:
    - name: phase1
      output:
        path: /operator-backups/2023-04-19T18-42-49/backup.tgz
      progress:
        lastTransitionTime: "2023-04-19T18:43:10Z"
        progressPercent: "100"
      state: complete
    - name: phase2
      output:
        path: /operator-backups/2023-04-19T18-42-49/backup.tgz
      progress:
        lastTransitionTime: "2023-04-19T18:43:28Z"
        progressPercent: "100"
      state: complete
    - name: phase3
      progress: {}
      state: running
  error:
    message: ""
  progress:
    lastTransitionTime: "2023-04-19T18:43:28Z"
    percentCompleted: "66"
    runningPhase: phase3
  state: running

3. Third phase completed

status:
  actions:
  - artifacts:
      operatorBackup:
        keyValue:
          path: /operator-backups/2023-04-19T18-42-49/backup.tgz
    blueprint: operator-blueprint
    deferPhase:
      name: ""
      progress: {}
      state: ""
    name: backup
    object:
      apiVersion: ""
      group: ""
      kind: statefulset
      name: mysql
      namespace: mysql
      resource: ""
    phases:
    - name: phase1
      output:
        path: /operator-backups/2023-04-19T18-42-49/backup.tgz
      progress:
        lastTransitionTime: "2023-04-19T18:43:10Z"
        progressPercent: "100"
      state: complete
    - name: phase2
      output:
        path: /operator-backups/2023-04-19T18-42-49/backup.tgz
      progress:
        lastTransitionTime: "2023-04-19T18:43:28Z"
        progressPercent: "100"
      state: complete
    - name: phase3
      output:
        path: /operator-backups/2023-04-19T18-42-49/backup.tgz
      progress:
        lastTransitionTime: "2023-04-19T18:43:48Z"
        progressPercent: "100"
      state: complete
  error:
    message: ""
  progress:
    lastTransitionTime: "2023-04-19T18:43:48Z"
    percentCompleted: "100"
  state: complete

TC:2 Blueprint consists of 3 phases, first phases succeeds and 2nd one fails

1. First Phase started

status:                                                                                                                                               
  actions:                                                                                                                                            
  - artifacts:                                                                                                                                        
      operatorBackup:                                                                                                                                 
        keyValue:                                                                                                                                     
          path: '{{ .Phases.phase3.Output.path }}'                                                                                                    
    blueprint: operator-blueprint                                                                                                                     
    deferPhase:                                                                                                                                       
      name: ""                                                             
      progress: {}                                                                                                                                    
      state: ""                                                            
    name: backup                                                                                                                                      
    object:                                                                
      apiVersion: v1                                                                                                                                  
      group: apps                                                          
      kind: statefulset                                                                                                                               
      name: mysql                                                          
      namespace: mysql                                                                                                                                
      resource: statefulsets                                                                                                                          
    phases:                                                                                                                                           
    - name: phase1                                                                                                                                    
      progress: {}                                                                                                                                    
      state: running                                                                                                                                  
    - name: phase2                                                                                                                                    
      progress: {}                                                                                                                                    
      state: pending                                                                                                                                  
    - name: phase3                                                                                                                                    
      progress: {}                                                                                                                                    
      state: pending                                                       
  error:                                                                                                                                              
    message: ""                                                            
  progress:                                                                                                                                           
    runningPhase: phase1                                                   
  state: running

2. First phase completed and Second phase started

status:                                                                                                                                               
  actions:                                                                                                                                            
  - artifacts:                                                                                                                                        
      operatorBackup:                                                                                                                                 
        keyValue:                                                                                                                                     
          path: '{{ .Phases.phase3.Output.path }}'                                                                                                    
    blueprint: operator-blueprint                                                                                                                     
    deferPhase:                                                                                                                                       
      name: ""                                                             
      progress: {}                                                                                                                                    
      state: ""                                                            
    name: backup                                                                                                                                      
    object:                                                                
      apiVersion: v1                                                                                                                                  
      group: apps                                                          
      kind: statefulset                                                                                                                               
      name: mysql                                                          
      namespace: mysql                                                                                                                                
      resource: statefulsets                                                                                                                          
    phases:                                                                                                                                           
    - name: phase1                                                                                                                                    
      progress: {}                                                                                                                                    
      state: running                                                                                                                                  
    - name: phase2                                                                                                                                    
      progress: {}                                                                                                                                    
      state: pending                                                                                                                                  
    - name: phase3                                                                                                                                    
      progress: {}                                                                                                                                    
      state: pending                                                       
  error:                                                                                                                                              
    message: ""                                                            
  progress:                                                                                                                                           
    runningPhase: phase1                                                   
  state: running

3. Second phase failed

status:                                                                                                                                                                                                     
  actions:                                                                                                                                                                                                            
  - artifacts:                                                                                                                                                                                                        
      operatorBackup:                                                                                                                                                                                                 
        keyValue:                                                                                                                                                                                                     
          path: '{{ .Phases.phase3.Output.path }}'                                                                                                                                                                    
    blueprint: operator-blueprint                                                                                                                                                                                     
    deferPhase:                                                                                                                                                                                                       
      name: ""                                                                                                                                                                                                        
      progress: {}                                                                                                                                                                                                    
      state: ""                                                                                                                                                                                                       
    name: backup                                                                                                                                                                                                      
    object:                                                                                                                                                                                                           
      apiVersion: v1                                                                                                                                                                                                  
      group: apps                                                                                                                                                                                                     
      kind: statefulset                                                                                                                                                                                               
      name: mysql                                                                                                                                                                                                     
      namespace: mysql                                                                                                                                                                                                
      resource: statefulsets                                                                                                                                                                                          
    phases:                                                                                                                                                                                                           
    - name: phase1                                                                                                                                                                                                    
      output:                                                                                                                                                                                                         
        path: /operator-backups/2023-05-22T07-32-36/backup.tgz                                                                                                                                                        
      progress:                                                                                                                                                                                                       
        lastTransitionTime: "2023-05-22T07:32:54Z"                                                                                                                                                                    
        progressPercent: "100"                                                                                                                                                                                         
      state: complete                                                                                                                                                                                                 
    - name: phase2                                                                                                                                                                                                    
      progress: {}                                                                                                                                                                                                    
      state: failed                                                                                                                                                                                                   
    - name: phase3                                                                                                                                                                                                    
      progress: {}                                                                                                                                                                                                    
      state: pending                                                                                                                                                                                                  
  error:                                                                                                                                                                                                              
    message: "Failed while waiting for Pod kanister-job-sk2bk to complete: Pod failed                                                                                                                                 
      or did not transition into complete state: Running backup\
     .
     .
  progress:                                                                                                                                                             
    lastTransitionTime: "2023-05-22T07:32:54Z"                                          
    percentCompleted: "33"                                                           
  state: failed                                                                     

TC:3 Blueprint with actions having multiple phases. And actionset running multiple action

1. First phase if each action is running

status:       
  actions:        
  - artifacts: 
      operatorBackup:
        keyValue:
          path: '{{ .Phases.backupPhase3.Output.path }}'
    blueprint: operator-blueprint
    deferPhase:        
      name: ""   
      progress: {}    
      state: ""   
    name: backup
    object:              
      apiVersion: ""
      group: ""     
      kind: statefulset  
      name: mysql 
      namespace: mysql
      resource: ""       
    phases:       
    - name: backupPhase1
      progress:
        lastTransitionTime: "2023-08-11T06:41:08Z"
        progressPercent: "0"
      state: running           
    - name: backupPhase2
      progress: {}
      state: pending               
    - name: backupPhase3
      progress: {}
      state: pending                             
  - blueprint: operator-blueprint                 
    deferPhase:                                    
      name: ""                                     
      progress: {}                                   
      state: ""                                       
    name: restore                                      
    object:                                              
      apiVersion: ""                                      
      group: ""                                           
      kind: statefulset                                   
      name: mysql                                         
      namespace: mysql                                    
      resource: ""                                        
    phases:                                               
    - name: restorePhase1                                 
      progress: {}                                        
      state: running                                      
    - name: restorePhase2                                 
      progress: {}                                        
      state: pending                                      
    - name: restorePhase3                                 
      progress: {}                                        
      state: pending                                      
  error:                                                  
    message: ""                                           
  progress:                                               
    lastTransitionTime: "2023-08-11T06:41:08Z"            
    percentCompleted: "0"                                 
    runningPhase: restorePhase1                           
  state: running

2. First phase of second action is completed

status:                                                                                                                                                                                                                                 
  actions:                                                
  - artifacts:                                            
      operatorBackup:                                     
        keyValue:                                         
          path: '{{ .Phases.backupPhase3.Output.path }}'                                                            
    blueprint: operator-blueprint                         
    deferPhase:                                           
      name: ""                                            
      progress: {}                                        
      state: ""                                           
    name: backup                                          
    object:                                               
      apiVersion: ""                                      
      group: ""                                           
      kind: statefulset                                   
      name: mysql                                         
      namespace: mysql                                    
      resource: ""                                        
    phases:                                               
    - name: backupPhase1                                  
      progress:                                           
        lastTransitionTime: "2023-08-11T06:41:08Z"                                                                  
        progressPercent: "0"                              
      state: running                                      
    - name: backupPhase2                                  
      progress: {}                                        
      state: pending                                      
    - name: backupPhase3                                  
      progress: {}                                        
      state: pending                                      
  - blueprint: operator-blueprint                         
    deferPhase:                                           
      name: ""                                            
      progress: {}                                        
      state: ""                                           
    name: restore                                         
    object:                                               
      apiVersion: ""                                      
      group: ""                                           
      kind: statefulset                                   
      name: mysql                                         
      namespace: mysql                                    
      resource: ""                                        
    phases:                                               
    - name: restorePhase1                                 
      progress:                                           
        lastTransitionTime: "2023-08-11T06:41:18Z"                                                                  
        progressPercent: "100"                            
      state: complete                                     
    - name: restorePhase2                                 
      progress: {}                                        
      state: pending                                      
    - name: restorePhase3                                 
      progress: {}                                        
      state: pending                                      
  error:                                                  
    message: ""                                           
  progress:                                               
    lastTransitionTime: "2023-08-11T06:41:18Z"            
    percentCompleted: "16"                                
    runningPhase: restorePhase1                           
  state: running

3. First phase of both the action is completed and 2nd phase is running

status:                                                                                                                                                                                                                                 
  actions:                                                                                                                                                                                                                              
  - artifacts:                                                                                                                                                                                                                          
      operatorBackup:                                                                                                                                                                                                                   
        keyValue:                                                                                                                                                                                                                       
          path: '{{ .Phases.backupPhase3.Output.path }}'                                                                                                                                                                                
    blueprint: operator-blueprint                         
    deferPhase:                                           
      name: ""                                            
      progress: {}                                        
      state: ""                                           
    name: backup                                          
    object:                                               
      apiVersion: ""                                      
      group: ""                                           
      kind: statefulset                                   
      name: mysql                                         
      namespace: mysql                                    
      resource: ""                                        
    phases:                                               
    - name: backupPhase1                                  
      output:                                             
        path: /operator-backups/2023-08-11T06-41-03/backup.tgz                                                      
      progress:                                           
        lastTransitionTime: "2023-08-11T06:41:22Z"                                                                  
        progressPercent: "100"                            
      state: complete                                     
    - name: backupPhase2                                  
      progress: {}                                        
      state: running                                      
    - name: backupPhase3                                  
      progress: {}                                        
      state: pending                                      
  - blueprint: operator-blueprint                         
    deferPhase:                                           
      name: ""                                            
      progress: {}                                        
      state: ""                                           
    name: restore                                         
    object:                                               
      apiVersion: ""                                      
      group: ""                                           
      kind: statefulset                                   
      name: mysql                                         
      namespace: mysql                                    
      resource: ""                                        
    phases:                                               
    - name: restorePhase1                                 
      progress:                                           
        lastTransitionTime: "2023-08-11T06:41:18Z"                                                                  
        progressPercent: "100"                            
      state: complete                                     
    - name: restorePhase2                                 
      progress:                                           
        lastTransitionTime: "2023-08-11T06:41:23Z"                                                                  
        progressPercent: "0"                              
      state: running                                      
    - name: restorePhase3                                 
      progress: {}                                        
      state: pending                                      
  error:                                                  
    message: ""                                           
  progress:                                               
    lastTransitionTime: "2023-08-11T06:41:22Z"            
    percentCompleted: "33"                                
    runningPhase: backupPhase2                            
  state: running

4. 2nd phase of second action is completed

status:                                                                                                                                                                                                                       [849/4603]
  actions:                                                                                                                                                                                                                              
  - artifacts:                                                                                                                                                                                                                          
      operatorBackup:                                                                                                                                                                                                                   
        keyValue:                                                                                                                                                                                                                       
          path: '{{ .Phases.backupPhase3.Output.path }}'                                                                                                                                                                                
    blueprint: operator-blueprint                                                                                                                                                                                                       
    deferPhase:                                                                                                                                                                                                                         
      name: ""                                                                                                                                                                                                                          
      progress: {}                                                                                                                                                                                                                      
      state: ""                                                                                                                                                                                                                         
    name: backup                                                                                                                                                                                                                        
    object:                                                                                                                                                                                                                             
      apiVersion: ""                                                                                                                                                                                                                    
      group: ""                                                                                                                                                                                                                         
      kind: statefulset                                                                                                                                                                                                                 
      name: mysql                                                                                                                                                                                                                       
      namespace: mysql                                                                                                                                                                                                                  
      resource: ""                                                                                                                                                                                                                      
    phases:                                               
    - name: backupPhase1                                                                                            
      output:                                             
        path: /operator-backups/2023-08-11T06-41-03/backup.tgz                                                      
      progress:                                           
        lastTransitionTime: "2023-08-11T06:41:22Z"                                                                  
        progressPercent: "100"                                                                                      
      state: complete                                     
    - name: backupPhase2                                  
      progress:                                                                                                     
        lastTransitionTime: "2023-08-11T06:41:27Z"                                                                  
        progressPercent: "0"                                                                                        
      state: running                                      
    - name: backupPhase3                                                                                            
      progress: {}                                                                                                  
      state: pending                                      
  - blueprint: operator-blueprint                         
    deferPhase:                                           
      name: ""                                                                                                      
      progress: {}                                        
      state: ""                                           
    name: restore                                         
    object:                                               
      apiVersion: ""                                      
      group: ""                                           
      kind: statefulset                                   
      name: mysql                                         
      namespace: mysql                                    
      resource: ""                                        
    phases:                                               
    - name: restorePhase1                                 
      progress:                                           
        lastTransitionTime: "2023-08-11T06:41:18Z"                                                                  
        progressPercent: "100"                            
      state: complete                                     
    - name: restorePhase2                                 
      progress:                                           
        lastTransitionTime: "2023-08-11T06:41:33Z"                                                                  
        progressPercent: "100"                            
      state: complete                                     
    - name: restorePhase3                                 
      progress: {}                                        
      state: running                                      
  error:                                                  
    message: ""                                           
  progress:                                               
    lastTransitionTime: "2023-08-11T06:41:33Z"            
    percentCompleted: "50"                                
    runningPhase: restorePhase3                           
  state: running

5. All the actions are completed

status:                                                                                                             
  actions:                                                                                                          
  - artifacts:                                                                                                      
      operatorBackup:                                                                                               
        keyValue:                                                                                                   
          path: /operator-backups/2023-08-11T06-41-03/backup.tgz                                                    
    blueprint: operator-blueprint                         
    deferPhase:                                           
      name: ""                                            
      progress: {}                                        
      state: ""                                           
    name: backup                                          
    object:                                                                                                         
      apiVersion: ""                                                                                                
      group: ""                                                                                                     
      kind: statefulset                                                                                             
      name: mysql                                                                                                   
      namespace: mysql                                                                                              
      resource: ""                                                                                                  
    phases:                                                                                                         
    - name: backupPhase1                                                                                            
      output:                                                                                                       
        path: /operator-backups/2023-08-11T06-41-03/backup.tgz                                                      
      progress:                                                                                                     
        lastTransitionTime: "2023-08-11T06:41:22Z"                                                                  
        progressPercent: "100"                                                                                      
      state: complete                                                                                               
    - name: backupPhase2                                                                                            
      output:                                                                                                       
        path: /operator-backups/2023-08-11T06-41-03/backup.tgz                                                      
      progress:                                                                                                     
        lastTransitionTime: "2023-08-11T06:41:42Z"                                                                  
        progressPercent: "100"                                                                                      
      state: complete                                                                                               
    - name: backupPhase3                                                                                            
      output:                                                                                                       
        path: /operator-backups/2023-08-11T06-41-03/backup.tgz                                                      
      progress:                                                                                                     
        lastTransitionTime: "2023-08-11T06:42:02Z"                                                                  
        progressPercent: "100"                            
      state: complete                                     
  - blueprint: operator-blueprint                         
    deferPhase:                                           
      name: ""                                            
      progress: {}                                        
      state: ""                                           
    name: restore                                         
    object:                                                                                                         
      apiVersion: ""                                                                                                
      group: ""                                                                                                     
      kind: statefulset                                                                                             
      name: mysql                                                                                                   
      namespace: mysql                                                                                              
      resource: ""                                                                                                  
    phases:                                                                                                         
    - name: restorePhase1                                                                                           
      progress:                                                                                                     
        lastTransitionTime: "2023-08-11T06:41:18Z"                                                                  
        progressPercent: "100"                                                                                      
      state: complete                                                                                               
    - name: restorePhase2                                                                                           
      progress:                                                                                                     
        lastTransitionTime: "2023-08-11T06:41:33Z"                                                                  
        progressPercent: "100"                                                                                      
      state: complete                                                                                               
    - name: restorePhase3                                                                                           
      progress:                                                                                                     
        lastTransitionTime: "2023-08-11T06:41:47Z"                                                                  
        progressPercent: "100"                            
      state: complete                                     
  error:                                                  
    message: ""                                           
  progress:                                               
    lastTransitionTime: "2023-08-11T06:41:52Z"            
    percentCompleted: "100"                               
  state: complete

@github-actions
Copy link
Contributor

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@infraq infraq added this to In Progress in Kanister Apr 17, 2023
@PrasadG193 PrasadG193 marked this pull request as ready for review May 11, 2023 17:36
@PrasadG193 PrasadG193 force-pushed the phase-progress-interface branch 2 times, most recently from c8f8520 to defe297 Compare May 22, 2023 18:07
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
pkg/progress/action.go Outdated Show resolved Hide resolved
pkg/apis/cr/v1alpha1/types.go Show resolved Hide resolved
output, err = p.Exec(ctx, *bp, action.Name, *tp)
doneProgressTrack()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to call it again even after calling it from defer ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the doneProgressTrack() needs to be called as soon as Exec() is done. The defer() gets called once all the phase Exec is done and action is completed (or failed). When the next phase execution starts during interaction in this function, the older phase's Progress() starts sending completion percent as 0. So before running next phase, the goroutine for current phase needs to be closed. Let me know if this makes sense or not.

pkg/function/backup_data.go Outdated Show resolved Hide resolved
pkg/kanister.go Outdated Show resolved Hide resolved
pkg/controller/controller.go Outdated Show resolved Hide resolved
@viveksinghggits
Copy link
Contributor

The other question that I had was, how are we going to handle the Kopia related function. Some functions are already, in so they are going to break right?

@PrasadG193
Copy link
Contributor Author

@viveksinghggits I've already rebased the PR with master which has kopia based function. I've implemented ExecProgress() for those as well.

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
@PrasadG193 PrasadG193 changed the title Add ExecProgress() method to function interface to report exec progress Add ExecutionProgress() method to function interface to report exec progress Jun 16, 2023
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Copy link
Contributor

@viveksinghggits viveksinghggits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me almost, just some small questions.

pkg/apis/cr/v1alpha1/types.go Show resolved Hide resolved
Comment on lines +153 to +159
if actionSet.Status.Actions[i].Phases[j].Name != phaseName {
continue
}
if actionSet.Status.Actions[i].Phases[j].State == crv1alpha1.StatePending ||
actionSet.Status.Actions[i].Phases[j].State == crv1alpha1.StateFailed {
continue
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we combine these two statements? I am ok with this change if you think it's more readable.

pkg/controller/controller.go Outdated Show resolved Hide resolved
@PrasadG193
Copy link
Contributor Author

@pavannd1 could you please take a look?

pkg/apis/cr/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/apis/cr/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/apis/cr/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/apis/cr/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/controller/controller.go Outdated Show resolved Hide resolved
pkg/controller/controller.go Outdated Show resolved Hide resolved
pkg/phase.go Show resolved Hide resolved
pkg/progress/action.go Outdated Show resolved Hide resolved
pkg/controller/controller.go Show resolved Hide resolved
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
PrasadG193 and others added 5 commits August 4, 2023 12:00
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
@PrasadG193
Copy link
Contributor Author

Added test case scenario when executing multiple actions with the same blueprint in the PR's test plan. @pavannd1 @viveksinghggits PTAL

@viveksinghggits
Copy link
Contributor

Added test case scenario when executing multiple actions with the same blueprint in the PR's test plan. @pavannd1 @viveksinghggits PTAL

I had already looked into the PR so I am going to skip 🍏 , but just wanted to make sure that the issue that we talked about where two actions are running in parallel is not going to cause any issues with runningPhase right?
If yes, do we have a ticket/issue somewhere to track that?

@PrasadG193
Copy link
Contributor Author

@viveksinghggits I've filed - #2270

@PrasadG193
Copy link
Contributor Author

@pavannd1 could you please re-review the PR?

Copy link
Contributor

@pavannd1 pavannd1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Feel free to merge once CI passes.

Kanister automation moved this from In Progress to Reviewer approved Sep 13, 2023
PrasadG193 and others added 5 commits September 20, 2023 15:55
* Implement ExecutionProgress method on Kanister functions

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Set LastTransitionTime in ExecutionProgress return

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Update pkg/function/backup_data.go

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>

---------

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Signed-off-by: Prasad Ghangal <prasad.ganghal@veeam.com>
Signed-off-by: Prasad Ghangal <prasad.ganghal@veeam.com>
@mergify mergify bot merged commit f9d0fdc into master Oct 3, 2023
15 checks passed
Kanister automation moved this from Reviewer approved to Done Oct 3, 2023
@mergify mergify bot deleted the phase-progress-interface branch October 3, 2023 08:09
leuyentran pushed a commit that referenced this pull request Oct 18, 2023
…rogress (#2023)

* Add phase level progress fields in actionset object

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Change weight based progress calc with func implementation

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Refactor and add unit tests for phase progress

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Update generated deepcopy methods

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Fix import cycle issue in test

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Update pkg/apis/cr/v1alpha1/types.go

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>

* Update pkg/apis/cr/v1alpha1/types.go

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>

* Update pkg/apis/cr/v1alpha1/types.go

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>

* Update pkg/apis/cr/v1alpha1/types.go

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>

* Use correct action index while updating action phase state

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Implement ExecutionProgress method on Kanister functions (#2117)

* Implement ExecutionProgress method on Kanister functions

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Set LastTransitionTime in ExecutionProgress return

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>

* Update pkg/function/backup_data.go

Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>

---------

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>

* Implement ExecProgress on test function

Signed-off-by: Prasad Ghangal <prasad.ganghal@veeam.com>

* Remove unused mockPhase in test

Signed-off-by: Prasad Ghangal <prasad.ganghal@veeam.com>

* Remove unnecessary whitespace in updateActionProgress func

Signed-off-by: Prasad Ghangal <prasad.ganghal@veeam.com>

---------

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ganghal@veeam.com>
Co-authored-by: Pavan Navarathna <6504783+pavannd1@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants