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

Add mount /tmp as tmpfs to drone script #11132

Closed
wants to merge 9 commits into from

Conversation

guillep2k
Copy link
Member

@guillep2k guillep2k commented Apr 19, 2020

Lets check if we can mount /tmp as tmpfs in our scripts.

Not working (see my next comment), but I'll leave this here in case someone comes up with a fix.

@guillep2k guillep2k added pr/wip This PR is not ready for review topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Apr 19, 2020
@guillep2k guillep2k force-pushed the force-tmpfs branch 9 times, most recently from 4ccc40c to 2d2dbbf Compare April 19, 2020 15:07
@guillep2k
Copy link
Member Author

No luck, apparently....

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 19, 2020
@guillep2k guillep2k added the status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR label Apr 19, 2020
@guillep2k
Copy link
Member Author

I can run locally using:

drone exec --trusted --pipeline testing-amd64 

but that's out of the question in our setup, I guess. ☹️

@lafriks
Copy link
Member

lafriks commented Apr 19, 2020

Yeah that needs option set to trusted for repository

@lafriks
Copy link
Member

lafriks commented Apr 19, 2020

But problem with that is that allows even for PRs to allow access to host. Only way to prevent this would be signing yaml file and not allow to change them in PR

@guillep2k
Copy link
Member Author

So I've made some local tests in my humble VM server, and I can see that the benefits are not very noticeable if I/O bottleneck isn't actually a problem (my server is pretty much idle on a Sunday afternoon). I've executed test-sqlite two times for each scenario (everything was built in advance).

using tmpfs:

sudo mount -t tmpfs integrations-data integrations-data
time make test-sqlite
[....]
real    12m21.794s
user    11m44.621s
sys     3m16.102s

real    12m20.810s
user    11m46.417s
sys     3m12.369s

normal (NOT using tmpfs):

sudo umount integrations-data/
time make test-sqlite
[....]
real    12m53.892s
user    11m37.175s
sys     4m3.791s

real    12m49.556s
user    11m34.685s
sys     4m3.578s

@guillep2k
Copy link
Member Author

But problem with that is that allows even for PRs to allow access to host. Only way to prevent this would be signing yaml file and not allow to change them in PR

@lafriks Given the russian-doll structure of docker, maybe there can be a parent yml that's signed and a child yml we can edit? Or depart from an image composed to implements that?

@lafriks
Copy link
Member

lafriks commented Apr 20, 2020

@guillep2k no that is not possible. Only option to sign would be to run drone sign go-gitea/gitea --save for every PR that changes .drone.yaml file. Only users with admin access to gitea repo can do it.

@lafriks
Copy link
Member

lafriks commented Apr 20, 2020

Initially we had signed drone.yml but we dropped it... maybe for this we could add it back

@zeripath
Copy link
Contributor

oh that would probably allow us to have extra steps - like fmt and linters offering fixing comments.

@guillep2k guillep2k closed this Apr 30, 2020
@guillep2k guillep2k deleted the force-tmpfs branch April 30, 2020 04:28
@guillep2k guillep2k removed the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 30, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr/wip This PR is not ready for review skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. status/blocked This PR cannot be merged yet, i.e. because it depends on another unmerged PR topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants