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

Introduce GuardedPrebuild to be used in #10696 #10940

Merged
merged 2 commits into from
Jun 29, 2022
Merged

Conversation

geropl
Copy link
Member

@geropl geropl commented Jun 27, 2022

Description

Introduces GuardedPrebuild to guard operations on Prebuilds.
This will be used in a follow-up PR (#10696).

Related Issue(s)

Based on: #10939
Context: #10696

How to test

  • (components/server && yarn test)

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@geropl geropl force-pushed the gpl/guarded-prebuild branch from 86bedfd to 3eb0c84 Compare June 28, 2022 15:03
@roboquat roboquat added size/M and removed size/XL labels Jun 28, 2022
@geropl geropl marked this pull request as ready for review June 28, 2022 15:26
@geropl geropl requested a review from a team June 28, 2022 15:26
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jun 28, 2022
Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

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

Looks good and makes sense to me, many thanks!

I guess my biggest question is -- why do we need this extra resource guard? Isn't it enough to guard on access to the workspace (or on the workspaceLog)? Do we expect access models for workspaces, logs, and prebuilds to differ significantly in the future?

/hold

workspaceType: "prebuild",
isOwner: false,
teamRole: undefined,
expectation: false,
Copy link
Member

Choose a reason for hiding this comment

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

@geropl, out of curiosity, what the expected effect of this change for a non-team-member to open a workspace on a configured repository? e.g. is this rule also enforced on workspace startup?

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR does just introduce the GuardedPrebuild, but it is not used yet.

A follow up PR will introduce prebuild APIs (get/findByWorkspaceId), and it felt wrong to re-/ab-use workspace or workspaceinstance for it.

@geropl geropl force-pushed the gpl/guarded-prebuild branch from 3eb0c84 to 0a37cf9 Compare June 29, 2022 07:36
@roboquat roboquat added size/L and removed size/M labels Jun 29, 2022
@geropl
Copy link
Member Author

geropl commented Jun 29, 2022

Do we expect access models for workspaces, logs, and prebuilds to differ significantly in the future?

@jankeromnes Not really, but I'd like to have it explicit. That way it's easier to either a) migrate to other implementations, or b) remove in the future. 🧘

@geropl
Copy link
Member Author

geropl commented Jun 29, 2022

/unhold

@roboquat roboquat merged commit 097abd8 into main Jun 29, 2022
@roboquat roboquat deleted the gpl/guarded-prebuild branch June 29, 2022 07:47
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants