Skip to content

Commit

Permalink
Add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
JonCrowther committed Oct 28, 2024
1 parent 8ea8a1f commit 19d77d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions extensions/users/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,20 @@ func AddProjectMember(rancherClient *rancher.Client, project *management.Project
if err != nil {
return err
}
fmt.Printf("PRTB: %v", roleTemplateResp)

Check failure on line 129 in extensions/users/users.go

View workflow job for this annotation

GitHub Actions / verify-changes

use of `fmt.Printf` forbidden because "No format prints, please testing or logrus packages" (forbidigo)

var prtb *management.ProjectRoleTemplateBinding
err = kwait.Poll(500*time.Millisecond, 2*time.Minute, func() (done bool, err error) {
prtb, err = rancherClient.Management.ProjectRoleTemplateBinding.ByID(roleTemplateResp.ID)
if err != nil {
fmt.Printf("failed to get by id %v", err)

Check failure on line 135 in extensions/users/users.go

View workflow job for this annotation

GitHub Actions / verify-changes

use of `fmt.Printf` forbidden because "No format prints, please testing or logrus packages" (forbidigo)
return false, err
}
if prtb != nil {
fmt.Printf("prtb.UserID: %v user.ID: %v prtb.ProjectID: %v project.ID: %v", prtb.UserID, user.ID, prtb.ProjectID, project.ID)

Check failure on line 139 in extensions/users/users.go

View workflow job for this annotation

GitHub Actions / verify-changes

use of `fmt.Printf` forbidden because "No format prints, please testing or logrus packages" (forbidigo)
} else {
fmt.Print("prtb is nil")

Check failure on line 141 in extensions/users/users.go

View workflow job for this annotation

GitHub Actions / verify-changes

use of `fmt.Print` forbidden because "No format prints, please testing or logrus packages" (forbidigo)
}
if prtb != nil && prtb.UserID == user.ID && prtb.ProjectID == project.ID {
return true, nil
}
Expand All @@ -143,6 +150,7 @@ func AddProjectMember(rancherClient *rancher.Client, project *management.Project
return err
}

fmt.Printf("waitForPRTBRollout")
err = waitForPRTBRollout(adminClient, prtb, createOp)
if err != nil {
return err
Expand Down

0 comments on commit 19d77d2

Please sign in to comment.