Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions pkg/credentials/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"context"
"fmt"
"path"
"sync"

machineryapi "github.com/cloudnative-pg/machinery/pkg/api"
"github.com/cloudnative-pg/machinery/pkg/fileutils"
Expand Down Expand Up @@ -328,11 +327,6 @@ func envSetAzureCredentials(
// so tests can change it.
var googleCredentialsDirectory = path.Join(ScratchDataDirectory, ".google-credentials")

// googleCredentialsMutex serializes the writes, because WriteFileAtomic
// names its temporary file after the current second. Remove it once
// cloudnative-pg/machinery#325 is released.
var googleCredentialsMutex sync.Mutex

func envSetGoogleCredentials(
ctx context.Context,
c client.Client,
Expand Down Expand Up @@ -363,8 +357,6 @@ func envSetGoogleCredentials(
googleCredentials.ApplicationCredentials.Key,
)

googleCredentialsMutex.Lock()
defer googleCredentialsMutex.Unlock()
if _, err := fileutils.WriteFileAtomic(credentialsPath, applicationCredentialsContent, 0o600); err != nil {
return nil, err
}
Expand Down
Loading