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

[ws-daemon] Always remove temp backup file #4941

Merged
merged 1 commit into from
Jul 25, 2021

Conversation

csweichel
Copy link
Contributor

This PR makes ws-daemon always remove the temporary backup archive, also in case of an error. The original intent of not deleting the file when an error occurred was to leave a way of workspace content recovery in this case. In practise this

  • behaviour has lead to more failure because of disks filling up, and
  • it's utterly impractical as a means of recovery at scale.

fixes #4939

@aledbf
Copy link
Member

aledbf commented Jul 25, 2021

/lgtm

@roboquat
Copy link
Contributor

LGTM label has been added.

Git tree hash: 5d2ea339b6bc673fb70c2a88d9efa29b3a48ff36

@roboquat
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@csweichel
Copy link
Contributor Author

csweichel commented Jul 25, 2021

/werft run no-preview

👍 started the job as gitpod-build-csweichel-ws-daemon-too-large-backups-4939.1

@codecov
Copy link

codecov bot commented Jul 25, 2021

Codecov Report

Merging #4941 (a3ec72b) into main (d035b70) will increase coverage by 22.30%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           main    #4941       +/-   ##
=========================================
+ Coverage      0   22.30%   +22.30%     
=========================================
  Files         0       13       +13     
  Lines         0     2089     +2089     
=========================================
+ Hits          0      466      +466     
- Misses        0     1561     +1561     
- Partials      0       62       +62     
Flag Coverage Δ
components-ws-daemon-app 22.30% <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% <0.00%> (ø)
components/ws-daemon/pkg/quota/sandbox_linux.go 0.00% <0.00%> (ø)
components/ws-daemon/pkg/resources/limiter.go 77.77% <0.00%> (ø)
components/ws-daemon/pkg/resources/controller.go 34.05% <0.00%> (ø)
components/ws-daemon/pkg/content/config.go 62.50% <0.00%> (ø)
components/ws-daemon/pkg/content/archive.go 57.47% <0.00%> (ø)
components/ws-daemon/pkg/resources/dispatch.go 0.00% <0.00%> (ø)
components/ws-daemon/pkg/content/tar.go 45.63% <0.00%> (ø)
... and 4 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 d035b70...a3ec72b. Read the comment docs.

@roboquat roboquat merged commit cf0e512 into main Jul 25, 2021
@roboquat roboquat deleted the csweichel/ws-daemon-too-large-backups-4939 branch July 25, 2021 21:28
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.

[ws-daemon] Too large backups are not deleted from the tmpdir
3 participants