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

Prevent bucket creation when workspace doesn't need remote storage support #4989

Merged
merged 2 commits into from
Jul 28, 2021

Conversation

csweichel
Copy link
Contributor

We have some workloads that don't require the use remote storage because we never create a backup or snapshot of their content, namely: image-build and ghost.

This PR introduces a flag on ws-daemon's InitWorkspace call named RemoteStorageDisabled which, when set to true, does not call EnsureExists on the remote storage. If on such a workspace a remote storage operation is attempted (e.g. TakeSnapshot) or DisposeWorkspace(backup: true)) such a call will fail with FailedPrecondition.

This also prevents name clashes due to globally unique bucket names in GCP and S3, and image-builder currently using a fixed owner for all image builds.

fixes #4929

@codecov
Copy link

codecov bot commented Jul 28, 2021

Codecov Report

Merging #4989 (72a1ccf) into main (7892961) will increase coverage by 22.15%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           main    #4989       +/-   ##
=========================================
+ Coverage      0   22.15%   +22.15%     
=========================================
  Files         0       13       +13     
  Lines         0     2103     +2103     
=========================================
+ Hits          0      466      +466     
- Misses        0     1575     +1575     
- Partials      0       62       +62     
Flag Coverage Δ
components-ws-daemon-app 22.15% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/ws-daemon/pkg/content/service.go 0.00% <0.00%> (ø)
...onents/ws-daemon/pkg/internal/session/workspace.go 50.73% <ø> (ø)
components/ws-daemon/pkg/internal/session/store.go 19.38% <0.00%> (ø)
components/ws-daemon/pkg/quota/mounts.go 53.19% <0.00%> (ø)
components/ws-daemon/pkg/quota/size.go 87.30% <0.00%> (ø)
components/ws-daemon/pkg/content/initializer.go 0.00% <0.00%> (ø)
components/ws-daemon/pkg/resources/limiter.go 77.77% <0.00%> (ø)
components/ws-daemon/pkg/resources/controller.go 33.93% <0.00%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7892961...72a1ccf. Read the comment docs.

@csweichel csweichel force-pushed the csweichel/image-builder-mk-the-4929 branch from 7f855d6 to 9f64563 Compare July 28, 2021 14:54
@csweichel csweichel force-pushed the csweichel/image-builder-mk-the-4929 branch from 9f64563 to 72a1ccf Compare July 28, 2021 15:17
@roboquat roboquat added size/XL and removed size/L labels Jul 28, 2021
@csweichel csweichel requested review from geropl and aledbf and removed request for svenefftinge July 28, 2021 15:41
@aledbf
Copy link
Member

aledbf commented Jul 28, 2021

/lgtm

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2c64e4a115d7368bdfebb6450500c63e38520719

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf, csweichel

Associated issue: #4929

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@roboquat roboquat merged commit 5b15f69 into main Jul 28, 2021
@roboquat roboquat deleted the csweichel/image-builder-mk-the-4929 branch July 28, 2021 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[image-builder] (mk3) - the name of the bucket cannot be repeated (S3)
3 participants