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

WIP: transfer functionality from PkgEval #1

Open
wants to merge 147 commits into
base: main
Choose a base branch
from

Conversation

ericphanson
Copy link
Contributor

@ericphanson ericphanson commented May 5, 2021

To preserve history, I used git-filter-repo on PkgEval to filter down to just the run.jl file, then set the upstream to this repo and merged with allow unrelated histories.

This probably doesn't work yet but to get farther I need to switch from my Mac laptop to a remote linux machine and I figured this was a reasonable point to open a draft PR.

The tests seem to work at this point.

Keno and others added 30 commits June 22, 2018 20:49
Use it to download the nightly tarball.
Differentiate between versions (version, file, sha) and builds (name, url)
using Example
"""

run_sandboxed_julia(`-e $script`; privileged=true)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I needed privileged=true to run this on my EC2 instance

mkpath(artifacts_path)
read_write_maps = merge(mounts, Dict(
joinpath(rootfs.home, ".julia/artifacts") => artifacts_path,
joinpath(rootfs.home, ".julia") => dot_julia_path
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure we want to map over the whole .julia but I would get permissions errors otherwise. It's not clear to me if read-write means the rootfs is read-only except for the write-mapped bits, or if it means these are the only directories that the code in the sandbox can write to on the host filesystem.

Comment on lines +40 to +42
- run: |
git config --global user.name Tester
git config --global user.email te@st.er
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure if we needed this; copied from PkgEval


[[debian.download]]
sha256 = "3c3c78a1b15490bfdc29cfd10a72f5f16195ccf64ffc4cdfb445cad387ea5b50"
url = "https://github.com/JuliaCI/PkgEval.jl/releases/download/v0.1/debian-buster-20210420.tar.xz"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

still points to PkgEval, I guess we should upload our own?

function run_sandboxed_julia(args=``; wait=true,
registries_dir=joinpath(first(DEPOT_PATH), "registries"),
storage_dir=mktempdir(),
install::String=dirname(dirname(Sys.which("julia"))),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a positional argument without a default in PkgEval. Probably I should move it back to that? This was convenient though

Comment on lines +45 to +47
run_sandboxed_julia(install::String, args=``; env=Dict(), mounts=Dict(),
wait=true, stdin=stdin, stdout=stdout, stderr=stderr,
install_dir="/opt/julia", kwargs...)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

out of date

@ericphanson ericphanson marked this pull request as ready for review May 6, 2021 00:21
@DilumAluthge DilumAluthge requested a review from maleadt May 6, 2021 01:01
@DilumAluthge
Copy link
Member

Still WIP, or ready to review?

@DilumAluthge DilumAluthge requested review from maleadt and staticfloat and removed request for maleadt May 6, 2021 17:03
@ericphanson
Copy link
Contributor Author

ericphanson commented May 6, 2021

it's ready for review but I don't think it's ready for merge, since I have outstanding self-review concerns aha

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.

None yet

5 participants