-
Notifications
You must be signed in to change notification settings - Fork 12
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
CORE-101 don't attempt to create shell google project if key exists #1569
Conversation
@@ -46,6 +45,10 @@ import scala.jdk.CollectionConverters._ | |||
object GoogleExtensions { | |||
val resourceId = ResourceId("google") | |||
val getPetPrivateKeyAction = ResourceAction("get_pet_private_key") | |||
|
|||
def getShellGoogleProjectName(user: SamUser, googleServicesConfig: GoogleServicesConfig) = |
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.
moved to be in a more accessible spot for tests
@@ -485,9 +488,6 @@ class GoogleExtensions( | |||
} | |||
} yield key | |||
|
|||
def getArbitraryPetServiceAccountKey(user: SamUser, samRequestContext: SamRequestContext): IO[String] = |
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.
this was inlined
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.
👍, with a question: this is still going to be vulnerable to multiple requests hitting getArbitraryPetServiceAccountKey
in short order - if the user has multiple tabs open, or even if a script or the UI shoots off multiple requests that each involve a pet.
Certainly this PR is better than before, so it's worth merging; is it worth protecting against multiple requests?
Quality Gate passedIssues Measures |
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.
+1 again, and thank you!
Ticket: https://broadworkbench.atlassian.net/browse/CORE-101
<Don't forget to include the ticket number in the PR title!>
What:
<For your reviewers' sake, please describe in a sentence or two what this PR is accomplishing (usually from the users' perspective, but not necessarily).>
Why:
<For your reviewers' sake, please describe in ~1 paragraph what the value of this PR is to our users or to ourselves.>
How:
<For your reviewers' sake, please describe in ~1 paragraph how this PR accomplishes its goal.>
<If the PR is big, please indicate where a reviewer should start reading it (i.e. which file or function).>
PR checklist