Skip to content

Write junit-report to reports directory to allow installation from read-only spack#20158

Merged
haampie merged 2 commits intospack:developfrom
vvolkl:junit-writeable
May 19, 2021
Merged

Write junit-report to reports directory to allow installation from read-only spack#20158
haampie merged 2 commits intospack:developfrom
vvolkl:junit-writeable

Conversation

@vvolkl
Copy link
Copy Markdown
Contributor

@vvolkl vvolkl commented Nov 29, 2020

Together with #20137 this lets me use spack instances on read-only filesystems. It seemed like misc_cache was fine to use here, but I can also introduce a separate config entry.

@tldahlgren
Copy link
Copy Markdown
Contributor

@tgamblin @becker33 Any preference on using misc-cache or a new config entry for identifying the unit-report directory?

@vvolkl
Copy link
Copy Markdown
Contributor Author

vvolkl commented Mar 25, 2021

@tgamblin since we were discussing misc_cache, could you take a look at this one as well?

@haampie
Copy link
Copy Markdown
Member

haampie commented Apr 12, 2021

@haampie
Copy link
Copy Markdown
Member

haampie commented Apr 12, 2021

One problem is that this does not work when running tests, because config:misc_cache is unset at that point.

I'm thinking it could make sense to change the default config when running tests s.t. all paths point to $tempdir/..., would that be an idea @alalazo?

haampie added a commit to eth-cscs/spack-batteries-included that referenced this pull request Apr 12, 2021
Add the patch for spack/spack#20158

Add a config.yaml file
basename = fmt.format(x=spec, hash=spec.dag_hash())
dirname = fs.os.path.join(spack.paths.var_path, 'junit-report')
dirname = spack.config.get(
'config:misc_cache', spack.paths.var_path)
Copy link
Copy Markdown
Member

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 clear this every time we clear the misc cache. Reports are really less transient than what we usually put in there.

Can you make it so that these have their own directory within ~/.spack? I'd recommend putting them in ~/.spack/reports/junit, and adding ~/.spack/reports to spack.paths.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tgamblin makes sense, done! The only downside is that this directory location (~/.spack/reports/junit) is now no longer configurable, right? But perhaps that is not required anyway.

tgamblin
tgamblin previously approved these changes May 19, 2021
@haampie
Copy link
Copy Markdown
Member

haampie commented May 19, 2021

Are we actually fine with the tests writing to ~/.spack? Because I think that's what happens right now.

@vvolkl vvolkl force-pushed the junit-writeable branch from 2018236 to e6c8a56 Compare May 19, 2021 14:26
@vvolkl
Copy link
Copy Markdown
Contributor Author

vvolkl commented May 19, 2021

@tgamblin rebased to fix the conflict in paths.py

@haampie I guess they should write to a tmpdir. But you are fixing this in #22921, right?

@vvolkl vvolkl changed the title Write junit-report to misc-cache to allow installation from read-only spack Write junit-report to reports directory to allow installation from read-only spack May 19, 2021
@haampie
Copy link
Copy Markdown
Member

haampie commented May 19, 2021

Yeah, let's leave that outside the scope of this PR.

@haampie haampie enabled auto-merge (squash) May 19, 2021 15:00
@haampie haampie merged commit 88192bf into spack:develop May 19, 2021
@vvolkl vvolkl deleted the junit-writeable branch May 19, 2021 22:27
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Jun 9, 2021
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.

5 participants