Skip to content

[bugfix] Do not copy or git clone sourcesdir if --dont-restage is passed#3393

Merged
vkarak merged 3 commits intoreframe-hpc:masterfrom
vkarak:bugfix/dont-restage-skip-clone
Feb 19, 2025
Merged

[bugfix] Do not copy or git clone sourcesdir if --dont-restage is passed#3393
vkarak merged 3 commits intoreframe-hpc:masterfrom
vkarak:bugfix/dont-restage-skip-clone

Conversation

@vkarak
Copy link
Contributor

@vkarak vkarak commented Feb 13, 2025

There was a more general problem with --dont-restage apart from trying to re-issue a git clone command if sourcesdir was a url. Even if it wasn't, it would still copy the contents of the sourcesdir to stagedir. Now we neither copy nor clone if --dont-restage is passed.

However, since we now disallow a copy if --dont-restage is passed, that would mean that --dont-restage would cause a test to fail if it was run for the first time with --dont-restage as its resources wouldn't be copied. To overcome this, each test now write a mark in the stage directory. Before copying the resources to the stage directory, it checks if the mark exists. If it does, it means that there has been a previous run and that the stagedir contents haven't been wiped out, which means --dont-restage was passed. If the mark does not exists, the it's a fresh run (either the first ever run of a test, even with --dont-restage, or just a regular rerun without --dont-restage).

Fixes #3305.

@vkarak vkarak added this to the ReFrame 4.7.4 milestone Feb 13, 2025
@vkarak vkarak self-assigned this Feb 13, 2025
@vkarak vkarak force-pushed the bugfix/dont-restage-skip-clone branch from 5173cc7 to 92d1a39 Compare February 13, 2025 22:41
Co-authored-by: Theofilos Manitaras <manitaras@cscs.ch>
@vkarak vkarak enabled auto-merge February 19, 2025 16:13
@vkarak vkarak merged commit 6653b73 into reframe-hpc:master Feb 19, 2025
36 checks passed
@vkarak vkarak deleted the bugfix/dont-restage-skip-clone branch February 19, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

--keep-stage-files --dont-restage fails when used together with sourcesdir

2 participants