Skip to content

Conversation

@edwardrf
Copy link
Contributor

Description

Allow gcp log stream and query to support multiple projects

Checklist

  • I have performed a self-review of my code
  • I have added appropriate tests
  • I have updated the Defang CLI docs and/or README to reflect my changes, if necessary

if err != nil {
return nil, err
}
projectIds = append([]string{gcp.ProjectId}, projectIds...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bit weird. Either remove ProjectId from Gcp struct, or make it an array.

return nil, err
}

projectIds = append([]string{gcp.ProjectId}, projectIds...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Comment on lines +97 to +98
slices.Sort(projectIds)
projectIds = slices.Compact(projectIds)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dedupe?

Comment on lines +99 to +102
resourceNames := make([]string, len(projectIds))
for i, projectId := range projectIds {
resourceNames[i] = "projects/" + projectId
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dedupe func makeResourceNames or so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants