seqeralabs / tower-cli

Nextflow Tower CLI tool
Apache License 2.0
43 stars 9 forks source link

add --launch-container option in launch command #444

Closed munishchouhan closed 3 months ago

munishchouhan commented 3 months ago

This PR will add --launch-container option in launch command

pditommaso commented 3 months ago

ok, let's sync with @tcrespog for the sdk

munishchouhan commented 3 months ago

PR to add in sdk https://github.com/seqeralabs/tower-sdk-gencode/pull/8

munishchouhan commented 3 months ago

PR to add in sdk seqeralabs/tower-sdk-gencode#8

this SDK PR is not correct, checking with @JaimeSeqLabs to fix it

munishchouhan commented 3 months ago

SDK pr has been fixed

munishchouhan commented 3 months ago

@tcrespog is there recent chnages in GoogleBatchPlatform?

Tests are failing for it with new tower sdk


org.opentest4j.AssertionFailedError: expected: <> but was: <
 ERROR: The program tried to reflectively invoke method public java.lang.String io.seqera.tower.model.GoogleBatchConfig.getNextflowConfig() without it being registered for runtime reflection. Add it to the reflection metadata to solve this problem. See https://www.graalvm.org/latest/reference-manual/native-image/metadata/#reflection for help.

 ERROR: Connection error. Check the connection using the command 'tw info'.
>
    at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
    at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
    at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
    at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
    at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1141)
    at app//io.seqera.tower.cli.BaseCmdTest.assertOutput(BaseCmdTest.java:183)
    at app//io.seqera.tower.cli.computeenvs.platforms.GoogleBatchPlatformTest.testAdd(GoogleBatchPlatformTest.java:61)
    at java.base@17.0.8/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base@17.0.8/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base@17.0.8/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
tcrespog commented 3 months ago

is there recent chnages in GoogleBatchPlatform?

Yes, in In GoogleBatchConfig and others: https://github.com/seqeralabs/platform/pull/6691.

JaimeSeqLabs commented 3 months ago

Tests are failing for it with new tower sdk

The program tried to reflectively invoke method public java.lang.String io.seqera.tower.model.GoogleBatchConfig.getNextflowConfig() without it being registered for runtime reflection

I'm assuming the tests failing here are the native ones. This is most likely because we need to manually add the new method signature to the reflect-config.json file. (probably more methods that GraalVM missed in the last update)

pditommaso commented 3 months ago

Was the --launch-container option tested?

munishchouhan commented 3 months ago

Was the --launch-container option tested?

I am not sure, how to test it?

JaimeSeqLabs commented 3 months ago
  1. Run a local instance of Seqera Platform
  2. Point tw-cli to the local instance: export TOWER_API_ENDPOINT=http://localhost:8000/api
  3. Do a launch using the new parameter: tw --insecure launch ... --launch-container ...
pditommaso commented 3 months ago

This option allows you to change the nextflow launcher used by Platform when running a workflow. Use for example quay.io/seqeralabs/nf-launcher:j17-24.07.0-edge.

You may want to use https://cloud.stage-seqera.io/ for sake of simplicity and run this "workflow" https://github.com/pditommaso/nf-sleep

When running it should show 24.07.0 as nextflow version.

Screenshot 2024-08-22 at 18 33 25

(or use your local platform as Jaime is suggesting)

munishchouhan commented 3 months ago

Ok finally my pipeline runs and i can test it successfully client:

% ./build/native/nativeCompile/tw  launch https://github.com/pditommaso/nf-sleep  \
--launch-container quay.io/seqeralabs/nf-launcher:j17-24.07.0-edge
pipeline_run
pditommaso commented 3 months ago

Excellent.