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

Support using tags when cloning a Spack repository #98

Closed
harshula opened this issue Jun 26, 2024 · 8 comments · Fixed by #111
Closed

Support using tags when cloning a Spack repository #98

harshula opened this issue Jun 26, 2024 · 8 comments · Fixed by #111
Assignees

Comments

@harshula
Copy link

At the moment we appear to be able to clone spack-config and spack-packages based on a tag. We don't appear to have that functionality when cloning Spack.

We now have an ACCESS-NRI Spack fork where we backport essential forks from upstream's develop branch and/or create commits that we require. Hence, it is now important to be stricter with the state/version of the Spack repository that we deploy.

@CodeGat
Copy link
Contributor

CodeGat commented Jun 27, 2024

Will be looking into this as well. We will need to verify that git checkouts of spack don't do anything funny to existing installations.

@CodeGat
Copy link
Contributor

CodeGat commented Jun 27, 2024

@harshula is the expectation that for some tag 0.21-2024.06.28 we would git checkout 0.21-2024.06.28 on the apps/spack/0.21/spack? In terms of things that would break spack mid-install, I think this would be the most likely candidate :D

@harshula
Copy link
Author

harshula commented Jul 1, 2024

I'd like to see the same functionality that is now available for spack-config and spack-packages repositories also made available for the spack repository. We may not use it immediately.

@CodeGat
Copy link
Contributor

CodeGat commented Jul 9, 2024

My issue with this is that we could run into a situation where we have multiple models which all request to deploy to different commits within a single releases/v0.X branch, which would lead to modification of spack state during installs, similar to #59.

As a compromise, could we keep the config/versions.json as it stands now ("spack": "0.22", where 0.22 is the portion of the releases/v0.22 branch), but have a workflow that can change the commit/tag of spack at a particular version (0.XX) if nothing else is currently deploying to it. This can be done either based on modification to a config file, or as a user-dispatchable event.

Solution 1: Config File with Versions

Option one is to have a global build-cd config item that is the tag/commit of spack for a certain releases/v0.X branch to use. For example:

{
  "spack-version": {
    "0.20": "aabbccdd",
    "0.21": "0.21-2024.07.09",
    "0.22": "11122233"
  }
}

This file would act as a versioned piece of provenance regarding what commit of spack (per major version) is currently deployed. The workflow that changes the spack version on Gadi would be triggered by modification of this file.

Solution 2: User-dispatchable Workflow

In this solution, the workflow is an update to the existing Create Deployment Spack workflow in build-cd. If we give a different commit to an existing version of spack, it will update the version of spack on Gadi (if no other models are currently being deployed to it).

@harshula
Copy link
Author

My issue with this is that we could run into a situation where we have multiple models which all request to deploy to different commits within a single releases/v0.X branch ...

Hi @CodeGat , How are you avoiding the same problem w.r.t. spack-config and spack-packages?

@CodeGat
Copy link
Contributor

CodeGat commented Jul 19, 2024

We haven't been able to, yet. But we shouldn't add any more possibilities for concurrent access violations.

@harshula
Copy link
Author

Then a solution must also include a fix for the current way of using tags for spack-config and spack-packages. If not, the concerns are not describing a practical problem. If the git repository is only updated and never reset to an older commit, does that address your concerns?

@CodeGat
Copy link
Contributor

CodeGat commented Jul 22, 2024

Yes, that would. In that case, solution 1 seems to be the way to go

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 a pull request may close this issue.

2 participants