-
Notifications
You must be signed in to change notification settings - Fork 917
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
Remove distinction between build and run accounts #6952
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the refactor! Left an optional suggestion for you
metadata.push({ | ||
location, | ||
id, | ||
serviceAccounts: serviceAccountsForBackend(projectNumber, backend), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is updating this field to be a Set
an option?
return target.serviceAccounts.length === test.serviceAccounts.length && target.serviceAccounts.every(sa => test.serviceAccounts.indexOf(sa) != -1); | ||
return ( | ||
target.serviceAccounts.length === test.serviceAccounts.length && | ||
target.serviceAccounts.every((sa) => test.serviceAccounts.indexOf(sa) !== -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having BackendMetadata.serviceAccounts be a Set
could help making equality checks a little more straightforward. Otherwise, we end up with an order-dependent equality check which may be unexpected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I see there are some issues in the apphosting commands files, see src/commands/apphosting-secrets-set.ts and src/commands/apphosting-secrets-grantaccess.ts
Luckily the distinction was easier to remove than to write!