Skip to content

Commit

Permalink
Fix typo of repeated 'failed'
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWuest committed Mar 4, 2024
1 parent 0e5794b commit 0aa1ddf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/biscepter/replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ func (r *replica) initNextSystem() (*RunningSystem, error) {
cmd := exec.Command("git", "checkout", commitHash)
cmd.Dir = r.repoPath
if err := cmd.Run(); err != nil {
return nil, errors.Join(fmt.Errorf("git checkout of hash %s at %s failed failed for replica %d", commitHash, r.repoPath, r.index), err)
return nil, errors.Join(fmt.Errorf("git checkout of hash %s at %s failed for replica %d", commitHash, r.repoPath, r.index), err)
}

// Update all submodules
cmd = exec.Command("git", "submodule", "update", "--init", "--recursive")
cmd.Dir = r.repoPath
if err := cmd.Run(); err != nil {
return nil, errors.Join(fmt.Errorf("git submodule update at %s failed failed for replica %d", r.repoPath, r.index), err)
return nil, errors.Join(fmt.Errorf("git submodule update at %s failed for replica %d", r.repoPath, r.index), err)
}

// Create docker client
Expand Down Expand Up @@ -196,7 +196,7 @@ func (r *replica) initNextSystem() (*RunningSystem, error) {
ForceRemove: true,
})
if err != nil {
return nil, errors.Join(fmt.Errorf("image build of %s for commit hash %s failed failed for replica %d", imageName, commitHash, r.index), err)
return nil, errors.Join(fmt.Errorf("image build of %s for commit hash %s failed for replica %d", imageName, commitHash, r.index), err)
}
// Wait for build to be done
_, err = io.ReadAll(buildRes.Body)
Expand Down Expand Up @@ -257,12 +257,12 @@ func (r *replica) initNextSystem() (*RunningSystem, error) {
// Create the new container
resp, err := apiClient.ContainerCreate(context.Background(), containerConfig, hostConfig, nil, nil, containerName)
if err != nil {
return nil, errors.Join(fmt.Errorf("container creation with name %s of image %s failed failed for replica %d", containerName, imageName, r.index), err)
return nil, errors.Join(fmt.Errorf("container creation with name %s of image %s failed for replica %d", containerName, imageName, r.index), err)
}

// Start the new container
if err := apiClient.ContainerStart(context.Background(), resp.ID, container.StartOptions{}); err != nil {
return nil, errors.Join(fmt.Errorf("container start with name %s and id %s of image %s failed failed for replica %d", containerName, resp.ID, imageName, r.index), err)
return nil, errors.Join(fmt.Errorf("container start with name %s and id %s of image %s failed for replica %d", containerName, resp.ID, imageName, r.index), err)
}

r.log.Infof("Started container %s running commit %s, performing healthchecks...", containerName, commitHash)
Expand All @@ -271,7 +271,7 @@ func (r *replica) initNextSystem() (*RunningSystem, error) {
for _, healthcheck := range r.parentJob.Healthchecks {
success, err := healthcheck.performHealthcheck(ports, r.log)
if !success {
return nil, fmt.Errorf("healthcheck on port %d failed failed for replica %d", healthcheck.Port, r.index)
return nil, fmt.Errorf("healthcheck on port %d failed for replica %d", healthcheck.Port, r.index)
} else if err != nil {
return nil, err
}
Expand Down

0 comments on commit 0aa1ddf

Please sign in to comment.