Open marcodelapierre opened 3 months ago
Name | Link |
---|---|
Latest commit | 69416fc8a0c5158d83d9dc4b190adcac92c8a91c |
Latest deploy log | https://app.netlify.com/sites/nextflow-docs-staging/deploys/667adc3af1e92900086784d6 |
Deploy Preview | https://deploy-preview-5089--nextflow-docs-staging.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Note: some commits were not signed-off (sigh) - leaving as is for now
Extra note on the method AssetManager.download()
- corner case.
It is worthwhile doing some tests on what happens in the following corner case:
It is worth testing against distinct pull orders:
If this code block works as expected, it should be all fine.
I will see if I can make the test soon, and in case will update this thread, otherwise I will leave it for later.
[UPDATE] done some testing, the code block mentioned above indeed does its job, hence this corner case is OK.
PS: one learning I made here is that, when a tag is requested, .resolve
+ .getName
in JGit return a sort of aliased commit, i.e. a commit that does not exist in the repo history, but that points to the correct real commit that corresponds to the requested tag.
[UPDATE] this issue exists already with Nextflow stable release, it was not introduced by this PR.
Issue with a test repo which has lots of tags:
On first pull all good, however see how the commit is made to refer via distance from a tag, tag4~17
:
$ NXF_HOME=$(pwd)/HOME_PR ./launch.sh pull -r 451ebd9dcb56045d80963945305811aa65f413d0 marcodelapierre/hello-nf
Checking marcodelapierre/hello-nf:451ebd9dcb56045d80963945305811aa65f413d0 ...
WARN: Cannot read project manifest -- Cause: Remote resource not found: https://api.github.com/repos/marcodelapierre/hello-nf/contents/nextflow.config?ref=451ebd9dcb56045d80963945305811aa65f413d0
downloaded from https://github.com/marcodelapierre/hello-nf.git - revision: 451ebd9dcb [tag4~17]
On repeated pull:
$ NXF_HOME=$(pwd)/HOME_PR ./launch.sh pull -r 451ebd9dcb56045d80963945305811aa65f413d0 marcodelapierre/hello-nf
Checking marcodelapierre/hello-nf:451ebd9dcb56045d80963945305811aa65f413d0 ...
Remote origin did not advertise Ref for branch refs/tags/tag4~17. This Ref may not exist in the remote or may be hidden by permission settings.
In good contrast, for a repo with not as many tags, all good:
$ NXF_HOME=$(pwd)/HOME_PR ./launch.sh pull -r 3650d7b8371c255a0a89ed5f2e07e2e5c1ed29ae hello
Checking nextflow-io/hello:3650d7b8371c255a0a89ed5f2e07e2e5c1ed29ae ...
downloaded from https://github.com/nextflow-io/hello.git - revision: 3650d7b8371c255a0a89ed5f2e07e2e5c1ed29ae
$ NXF_HOME=$(pwd)/HOME_PR ./launch.sh pull -r 3650d7b8371c255a0a89ed5f2e07e2e5c1ed29ae hello
Checking nextflow-io/hello:3650d7b8371c255a0a89ed5f2e07e2e5c1ed29ae ...
Already-up-to-date - revision: 3650d7b8371c255a0a89ed5f2e07e2e5c1ed29ae
This PR is spawned out of #4659, of which it represents its evolution and finalisation.
Some highlights:
localPath
defined via thecommitId
, for more accurate handling of branch updatesrevisionMap
file, for accurate handling of user requested revisions vs revision update in remote repoAssetManager
class constructor; a dedicated additional method,setRevisionAndLocalPath
, has to be called after instantiation to setlocalPath
andrevision
Some implementation notes:
projectName
determines location ofBARE_REPO
,REVISION_MAP
andREVISION_SUBDIR
localPath
is underREVISION_SUBDIR
and requires revision-to-commit mapping ; for unit testing, redefine thelocalPath
manuallySome caveats:
revisionMap
file: I/O concurrency, refactor to a dedicated class (similar toScriptFile
), others?list
output:commitId
-basedlocalPath
AssetManager
, some non-constructor methods have changed API, typically to get rid of the now un-neededrevision
argumentdownload()
andclone()
@pditommaso for visibility.