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
Enable multiple revisions for project repos #4659
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
You could save disk space by cloning with depth = 0 when a revision is specified |
Thanks @bentsherman , great idea, will do, for |
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
yes I suppose we could just clone with depth = 0 in all cases, since no revision just defaults to |
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Ah! unfortunately we cannot implement the |
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
… operation Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
…f "master" Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
It's not common but happens. We have this same problem in the Platform as well. This is why the original ticket was planning the checkout the repo as a bare repository, and then checkout the branch into a path named as the commit it associated the branch |
The problem is really with using a branch which can map to any number of revisions. It can be avoided by using a commit or tag. |
This does not fit the user expectation |
Maybe we should change their expectation. It is well known that you shouldn't use Or we could append the commit hash to the directory name if a pipeline is checked out to a particular revision, i.e. |
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
I agree with Ben, we need to make expectations explicit, and remind that sharing the same NF repo collection between multiple people may result in not running the expected branch commit. Even Paolo's solution with explicit commit id in the path does not solve the situation Here's the case that breaks it IMO.
And now in this new situation, how do people get to use the version "they think they are using"? All of the implicitly requested commits are available, but how do you reliably pick one or the other for usage? I don't see an implicit way to achieve this. The simplest way (for the implementation and also, crucially, for the users) is to advise them to use tags or commits if they really care about reproducibility. So my suggestion is: let's keep this implementation, and add a paragraph to the docs to highlight these reproducibility caveats. See commit 8fcbf08 |
These are actually relatively important caveats to clarify, because I have heard multiple instances of site (cluster/service) administrators willing to curate a collection of pipelines for their users, including multiple revisions. |
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
…eproducibility Signed-off-by: Dr Marco De La Pierre <[email protected]> Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco De La Pierre <[email protected]> Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco De La Pierre <[email protected]> Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
2ca48d8
to
7716416
Compare
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
I have been studying and making experiments using a local bare repository, as a local intermediate between the remote repo and the various checked out revisions. In my first round of attempts, I was trying to use the local bare repo as the source of truth for any local checkouts, in substitution for the remote repo. Essentially, the idea was:
This does not work at present, as the general assumption in AssetManager methods is that the "source of truth" has everything available, i.e. both repo information and file contents. However a bare repo lacks the latter. Hence, I started an attempt of targeted usage of either bare or remote, depending on the required information. This not only is confusing, but currently fails in my tests, again because of assumptions that cross each other around the existence and contents of the various types of repos. At the end of today: To bring the effort to a more manageable and productive ground, I have decided to move forward with a radically simplified approach:
This approach, if workable, tackles the main goal of this round of PR revision: to locally use commits to store and run pipelines, to avoid clashes when updating repositories. |
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
I have started to add localBarePath. Scope is:
Ok, I have fixed the chicken and egg at AssetManager instantiation, between defining localPath and devining the repository provider. Using localBarePath has been instrumental. Next:
To this end I have left some intermediate notes in the codebase, AssetManager.groovy. |
@pditommaso Any tips on how to get a commitID for a branch or tag, I am a taker. |
Not sure how much I can help this week. @bentsherman you want to have look at this |
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
thanks Paolo. did good progress myself. |
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
Signed-off-by: Dr Marco Claudio De La Pierre <[email protected]>
This PR adds support for handling local copies of multiple revisions of the same pipeline.
Key points:
NXF_ASSETS
, each pipeline is now pulled as<org>/<repo>[:<revision>]
;:<revision>
is only appended if the corresponding flag was used on CLI,-r
/--revision
revision
attribute to theAssetManager
class, as both pipeline name and revision are now required to fully identify a pipelinerun, pull, clone, drop, list, view, config, info, inspect, kuberun
AssetManagerTest
have been updatedCaveats:
Jgit
does not implementgit worktree
, so the original idea within Allow the concurrent run of multiple pipeline revisions #2870 could not be applieddepth = 1
(shallow clones) was investigated to reduce disk usage, but could not be implemented as it would not allow to checkout branches/tags/commits--revision
and with--revision <default branch>
create two duplicate pulls; this is not optimal, but with very limited known negative impact; [update] this only happens if the default branch is not declared in the manifest and differs frommaster
master
, pulling and running it is now possible without specifying the branch name explicitlyCloses #2870 .
Also indirectly addresses #3593