What's the proper way to do integration tests for ...
# nextflow-plugins
s
What's the proper way to do integration tests for a core plugin? I want to test some changes to nf-k8s on my infra but locally built nextflow keeps pulling down the latest nf-k8s rather than using the locally built version
a
make compile
will create a
./build.sh
script, this is your development version of Nextflow
s
Do you mean
launch.sh
?
a
errrr
maybe, let me check 😆
I alias
nextflow-dev
to it
s
Yeah I've been trying that, it still won't use the modified nf-k8s plugin
I incremented the version so I would know when it was using the local one and it constantly grabs 1.5.4 instead
a
hmm I don't have to do that, I just run the
launch.sh
script
Remove the nf-k8s plugin selector and see if it uses the default one?
s
Copy code
./launch.sh run -c /etc/nextflow.config  -profile nocleanup  /shared/team/sam/quicktest.nf

 N E X T F L O W   ~  version 26.05.0-edge

ERROR ~ Install is not supported on dev mode - Missing plugin nf-k8s 1.5.4
Copy code
jovyan:/shared/team/sam/nextflow$ echo $NXF_HOME
/shared/team/sam/nextflow/nxf_home/
jovyan:/shared/team/sam/nextflow$ ls nxf_home/plugins/
nf-amazon-3.10.0  nf-azure-1.23.0  nf-cloudcache-0.6.0  nf-codecommit-0.6.0  nf-console-1.3.0  nf-google-1.27.3  nf-k8s-1.5.5  nf-seqera-0.22.0  nf-wave-1.21.0
the plugin gets built and stuck in my test NXF_HOME dir
a
Oooo are you using another plugin?
s
I'm just trying to test nf-k8s
a
What's in these two:
Copy code
-c /etc/nextflow.config  -profile nocleanup
If there's another plugin (like nf-schema), it breaks
I've had this before it's really irritating
s
Nothing relevant, nocleanup sets cleanup to false, nextflow.config has all the stuff required to run on our infra
nothing regarding plugins etc
🤔 1
quicktest is super minimal to reproduce an issue I've been having https://github.com/nextflow-io/nextflow/issues/7247
no nf-schema or anything
s
Same issue really
a
Did you get the same issue when using
make pack
?
s
Claude managed to figure it out actually, there were two things, I had set
NXF_PLUGINS_DIR
which messes with dev mode, and I hadn't updated
modules/nextflow/src/main/resources/META-INF/plugins-info.txt
to ask for the incremented version, once I sorted both of those the plugin got used properly
unfortunately my issue still persists
a
Not sure if this helps but I added a "validate" target to the Makefile of my plugin to set things up so it tests against the compiled version of my plugin instead of downloading previously built plugins https://github.com/phac-nml/nf-iridanext/blob/1f523d1550fe9ac99c9b26272754a66727910c33/Makefile#L28
j
maybe a little later but for nf-k8s I use a folder in the pvc and copy my version on it, them I use a nextflow config similar to :
Copy code
k8s {
    storageClaimName = 'nextflow'
    serviceAccount = 'nextflow-sa'
    pod = [
        [env: 'NXF_PLUGINS_DIR',        value:'/mount/workdir/.nextflow/plugins'],
        [env: 'NXF_HOME',               value:'/mount/workdir/.nextflow'],
        [env: 'NXF_JAR',                value:'nextflow-26.05.0-k8s-one.jar'],
    ]
}
(nextflow-26.05.0-k8s-one.jar is the jar generated by the make install)