Skip to content

Commit

Permalink
Bypass failing step
Browse files Browse the repository at this point in the history
state is broken upstream it seems
  • Loading branch information
Reasonable-Solutions committed Feb 15, 2024
1 parent 9511d4d commit af7433e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion internal/reconcilers/github/team/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func GetTeamRepositories(ctx context.Context, client protoapi.ReconcilersClient,
if err != nil {
return nil, err
}

return st.Repositories, nil
}

Expand Down
10 changes: 6 additions & 4 deletions internal/reconcilers/google/cdn/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,17 @@ func (r *cdnReconciler) Reconcile(ctx context.Context, client *apiclient.APIClie
tenantTeamName := fmt.Sprintf("%s-%s", strings.ReplaceAll(r.tenantName, ".", "-"), naisTeam.Slug)
bucketName := str.SlugHashPrefixTruncate(tenantTeamName, "nais-cdn", gcp.StorageBucketNameMaxLength)

// ✅
googleServiceAccount, err := r.getOrCreateServiceAccount(ctx, naisTeam.Slug)
if err != nil {
return fmt.Errorf("get or create service account: %w", err)
}

err = r.setServiceAccountPolicy(ctx, googleServiceAccount, naisTeam.Slug, client)
if err != nil {
return fmt.Errorf("set service account policy: %w", err)
}
// ❌
//err = r.setServiceAccountPolicy(ctx, googleServiceAccount, naisTeam.Slug, client)
//if err != nil {
// return fmt.Errorf("set service account policy: %w", err)
//}

err = r.createBucketIfNotExists(ctx, bucketName, labels)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/reconcilers/google/gcp/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (r *googleGcpReconciler) Reconcile(ctx context.Context, client *apiclient.A
return fmt.Errorf("no Google Workspace group exists for team %q yet", naisTeam.Slug)
}

it := iterator.New(ctx, 100, func(limit, offset int64) (*protoapi.ListTeamEnvironmentsResponse, error) {
it := iterator.New[*protoapi.TeamEnvironment](ctx, 100, func(limit, offset int64) (*protoapi.ListTeamEnvironmentsResponse, error) {
return client.Teams().Environments(ctx, &protoapi.ListTeamEnvironmentsRequest{Limit: limit, Offset: offset, Slug: naisTeam.Slug})
})

Expand Down Expand Up @@ -188,7 +188,7 @@ func (r *googleGcpReconciler) Reconcile(ctx context.Context, client *apiclient.A
func (r *googleGcpReconciler) Delete(ctx context.Context, client *apiclient.APIClient, naisTeam *protoapi.Team, log logrus.FieldLogger) error {
var errors []error

it := iterator.New(ctx, 100, func(limit, offset int64) (*protoapi.ListTeamEnvironmentsResponse, error) {
it := iterator.New[*protoapi.TeamEnvironment, *protoapi.ListTeamEnvironmentsResponse](ctx, 100, func(limit, offset int64) (*protoapi.ListTeamEnvironmentsResponse, error) {
return client.Teams().Environments(ctx, &protoapi.ListTeamEnvironmentsRequest{Limit: limit, Offset: offset, Slug: naisTeam.Slug})
})

Expand Down

0 comments on commit af7433e

Please sign in to comment.