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

Experimental GCP MC workspace creation support #2981

Closed
wants to merge 22 commits into from

Conversation

aherbst-broad
Copy link
Contributor

@aherbst-broad aherbst-broad commented Aug 7, 2024

Context

This is a proof-of-concept demonstrating the ability for Rawls to handle the creation and fetching of GCP MC workspaces (i.e., GCP workspaces managed by WSM).

This PR

  • Adds code in the MultiCloudWorkspaceService to create GCP workspaces in WSM. This behavior is flagged and requires that a) the parent billing project has a billing profile and b) the system:mc_gcp flag is passed in the attributes map in the creation request
    • Deletion seems to "just work", cloning does not.
    • I've removed a check that the entity service was making to allow storage of tabular data in Rawls'.
    • I make no claims about workflows
    • There is no affordance in the UI to make these requests so this is an API only PoC at the moment
  • Cleans up and adds documentation in related areas

@aherbst-broad aherbst-broad force-pushed the arh-exp-wor-1104-mk2 branch 3 times, most recently from 3463083 to ce9feee Compare August 7, 2024 18:44
…es in Rawls; formatting, comments and breadcrumbs
@aherbst-broad aherbst-broad changed the title arh exp wor 1104 mk2 Experimental GCP MC workspace creation support Aug 7, 2024
@aherbst-broad aherbst-broad requested review from rtitle, a team, cahrens and blakery and removed request for a team August 14, 2024 15:58
@cahrens cahrens marked this pull request as ready for review August 14, 2024 17:39
workspaceOpt <-
if (isMcRequest(workspaceRequest, billingProfileOpt)) {
billingProfileOpt
.traverse { profileModel =>
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't compiled but -- does this give you an Option[Option[..]]? This may be a use case for .flatTraverse

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check out 5a10420

if (!WorkspaceType.RawlsWorkspace.equals(requestArguments.workspace.workspaceType)) {
// Azure workspaces use a WDS application in the data plane, Rawls entity service requests are not supported.
if (
WorkspaceType.McWorkspace.eq(
Copy link
Contributor

@rtitle rtitle Aug 14, 2024

Choose a reason for hiding this comment

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

Thinking out loud, wondering what might be a good way to represent the "flavor" of workspace in the Rawls model. I guess we have 3 cases that we're supporting, right?

  1. Rawls workspace - GCP
  2. MC workspace - GCP
  3. MC workspace - Azure

Copy link
Contributor

Choose a reason for hiding this comment

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

It's seems like there's a 4th one, the Rawls w/"Rawls Stage" MC Workspace.

Copy link
Contributor

Choose a reason for hiding this comment

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

*nod *

I wonder if it's worth explicitly enumerating all the cases, instead of relying on combinations of certain fields to distinguish them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's admittedly awkward. I'll see about evolving the data model.

@@ -331,6 +359,20 @@ class MultiCloudWorkspaceService(override val ctx: RawlsRequestContext,
} yield profileModel
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding scaladoc comments, I want to do the same in many places in Leo

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.