Skip to content

"Rerun and archive sandbox" button in AWS - #1456

Merged
prandla merged 10 commits into
cms-dev:mainfrom
e-i-o:sandbox-archive
Jul 11, 2025
Merged

"Rerun and archive sandbox" button in AWS#1456
prandla merged 10 commits into
cms-dev:mainfrom
e-i-o:sandbox-archive

Conversation

@prandla

@prandla prandla commented Jul 8, 2025

Copy link
Copy Markdown
Member

Closes #1355.

This still needs a dump updater and SQL updater (because i changed the "sandbox paths" column from a :-separated string to an array). Other parts should be ready for review though.

I changed the UI a bit from the old implementation:
image
sandbox links are clickable when archived. There's also a similar button for the compile sandbox.

There's also most of the logic to archive user test sandboxes, but there's no RPC to invalidate them, so it can't actually be reached currently...

gregoreesmaa and others added 4 commits July 8, 2025 14:40
Also did most of the work to allow rerun+archive of user tests, though
there's no way to invalidate them currently so it's not usable yet...

@veluca93 veluca93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The overall approach seems reasonable to me, but I'd like a second look from @gollux :-)

Comment thread cms/grading/Sandbox.py Outdated
@prandla

prandla commented Jul 10, 2025

Copy link
Copy Markdown
Member Author

should be all done now.

@gollux

gollux commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

Beware that some files in the sandbox could be unreadable for the user running CMS. Well, it should not happen in the first place, but due to #1242, it can.

@prandla

prandla commented Jul 11, 2025

Copy link
Copy Markdown
Member Author

i think it's only possible for compilation (for evaluation, allow_writing_only should prevent it i think?), but it is indeed a possibility.

i think the proper way to handle this is to implement #1242, and then implement an archiver that chmods files as it goes to make them readable. (this then requires some trickery to get the metadata in the archive right.) we would also need similar chmodding before deleting the sandbox (or just letting isolate deal with it).

for now, i guess i can add an extra check and make sure that the case where creating the archive fails is at most a warning.

@gollux

gollux commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

For now, i guess i can add an extra check and make sure that the case where creating the archive fails is at most a warning.

I agree.

Otherwise, I think that allow_writing_only is a terrible hack and I am looking forward for the moment when we remove it. But we really should wait with #1242 for after the IOI :)

@prandla

prandla commented Jul 11, 2025

Copy link
Copy Markdown
Member Author

@gollux does this last patch look okay? :)

@gollux

gollux commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

@gollux does this last patch look okay? :)

Yes.

@prandla
prandla merged commit a22f39c into cms-dev:main Jul 11, 2025
1 check passed
@prandla
prandla deleted the sandbox-archive branch July 11, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

"Rerun and archive sandbox" button in AWS

4 participants