Skip to content

Add a custom hook for dev_path changes#46529

Merged
becker33 merged 7 commits intodevelopfrom
psakiev/custom-dev-check
Sep 26, 2024
Merged

Add a custom hook for dev_path changes#46529
becker33 merged 7 commits intodevelopfrom
psakiev/custom-dev-check

Conversation

@psakievich
Copy link
Copy Markdown
Contributor

@psakievich psakievich commented Sep 22, 2024

Using the recent addition of git_sparse_paths in #45473 shows yet another way that our current develop change detection breaks down. In this case if you try to develop with spack develop --p pointing to the full source then any change to the code triggers a rebuild of everything.

There have also been filesytem performance issues as noted in #41976 and #41013

This PR proposes to add a package hook to allow custom overriding of the standard filesystem behavior. I think I can also put in something that resolves the sparse-paths issue more directly, but since there are limited users of that feature (my team at SNL) I think a custom hook is sufficient until more users adopt that feature or a longer term trajectory for base implementation of detecting changes is settled on.

The current form as implemented is probably the "safest" form for all package types so I think it makes sense to leave it as a default.

Pinging @scheibelp @tgamblin

@spackbot-app spackbot-app bot added core PR affects Spack core functionality documentation Improvements or additions to documentation environments labels Sep 22, 2024
@psakievich
Copy link
Copy Markdown
Contributor Author

Why I haven't thrown in the sparse checkout fix here:

Logically it is not that hard. Query for the sparse paths attribute and loop over those with the filesystem recursive check. There is a gotcha though in that sparse checkout also includes all the files in the base directory (skips dirs). So we'd also need to add in a non-recursive check too.

Rather than iterating the details in a PR to core, I'd like to work it out in our project since we have lots of developers eager to test drive spack develop in their workflow on the Sierra project but can't be effective without a fix.

@psakievich psakievich marked this pull request as draft September 23, 2024 17:59
@psakievich psakievich requested a review from becker33 September 25, 2024 22:12
Copy link
Copy Markdown
Member

@becker33 becker33 left a comment

Choose a reason for hiding this comment

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

Couple requests to bring the docs and comments into line with the new code.

@psakievich psakievich force-pushed the psakiev/custom-dev-check branch from 0bf453c to 2128fd7 Compare September 25, 2024 23:15
@psakievich psakievich requested a review from becker33 September 26, 2024 01:41
@becker33 becker33 merged commit ea6e398 into develop Sep 26, 2024
@becker33 becker33 deleted the psakiev/custom-dev-check branch September 26, 2024 15:59
BOUDAOUD34 pushed a commit to CINES-HPC/spack that referenced this pull request Sep 27, 2024
* Add a custom hook for dev_path changes

Co-authored-by: Greg Becker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core PR affects Spack core functionality documentation Improvements or additions to documentation environments

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants