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

Remove distinction between build and run accounts #6952

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

inlined
Copy link
Member

@inlined inlined commented Apr 2, 2024

Luckily the distinction was easier to remove than to write!

@inlined inlined requested a review from tonyjhuang April 2, 2024 22:09
Copy link
Contributor

@tonyjhuang tonyjhuang left a 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),
Copy link
Contributor

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)
Copy link
Contributor

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

Copy link
Contributor

@tonyjhuang tonyjhuang left a 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

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.

None yet

2 participants