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

SD-838: timeouts #34

Merged
merged 8 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion internal/pkg/argocd/argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func findArgocdAppByManifestPathAnnotation(ctx context.Context, componentPath st
getAppsStart := time.Now()
allRepoApps, err := appClient.List(ctx, &appQuery)
getAppsDuration := time.Since(getAppsStart).Milliseconds()
log.Infof("Got %v ArgoCD applications for repo %s in %v ms", len(allRepoApps.Items), repo, getAppsDuration)
log.Debugf("Got %v ArgoCD applications for repo %s in %v ms", len(allRepoApps.Items), repo, getAppsDuration)
if err != nil {
return nil, err
}
Expand Down
6 changes: 0 additions & 6 deletions internal/pkg/githubapi/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ func createGithubGraphQlClient(githubOauthToken string, githubGraphqlAltURL stri
}

func createGhAppClientPair(ctx context.Context, githubAppId int64, owner string, ghAppPKeyPathEnvVarName string) GhClientPair {
// var ghClientPair *GhClientPair
var githubRestAltURL string
var githubGraphqlAltURL string
githubAppPrivateKeyPath := getCrucialEnv(ghAppPKeyPathEnvVarName)
Expand All @@ -151,16 +150,13 @@ func createGhAppClientPair(ctx context.Context, githubAppId int64, owner string,
log.Errorf("Couldn't find installation for app ID %v and repo owner %s", githubAppId, owner)
}

// ghClientPair.v3Client := createGithubAppRestClient(githubAppPrivateKeyPath, githubAppId, githubAppInstallationId, githubRestAltURL, ctx)
// ghClientPair.v4Client := createGithubAppGraphQlClient(githubAppPrivateKeyPath, githubAppId, githubAppInstallationId, githubGraphqlAltURL, githubRestAltURL, ctx)
return GhClientPair{
v3Client: createGithubAppRestClient(githubAppPrivateKeyPath, githubAppId, githubAppInstallationId, githubRestAltURL, ctx),
v4Client: createGithubAppGraphQlClient(githubAppPrivateKeyPath, githubAppId, githubAppInstallationId, githubGraphqlAltURL, githubRestAltURL, ctx),
}
}

func createGhTokenClientPair(ctx context.Context, ghOauthToken string) GhClientPair {
// var ghClientPair *GhClientPair
var githubRestAltURL string
var githubGraphqlAltURL string
githubHost := getEnv("GITHUB_HOST", "")
Expand All @@ -173,8 +169,6 @@ func createGhTokenClientPair(ctx context.Context, ghOauthToken string) GhClientP
log.Debugf("Using public Github API endpoint")
}

// ghClientPair.v3Client := createGithubRestClient(ghOauthToken, githubRestAltURL, ctx)
// ghClientPair.v4Client := createGithubGraphQlClient(ghOauthToken, githubGraphqlAltURL)
return GhClientPair{
v3Client: createGithubRestClient(ghOauthToken, githubRestAltURL, ctx),
v4Client: createGithubGraphQlClient(ghOauthToken, githubGraphqlAltURL),
Expand Down
Loading
Loading