viash-io / viash

script + metadata = standalone component
https://viash.io
GNU General Public License v3.0
39 stars 2 forks source link

[BUG] Filtering on engines without engines defined results in unexpected behaviour #690

Closed Grifs closed 7 months ago

Grifs commented 7 months ago

What happened?

When a component has no engines defined, a native engine gets implicitely added. However, when running viash ns build --engine native, the component gets rejected as at the filtering step, no native engine exists yet.

Same goes for viash ns test

Steps to reproduce

Create a component without an engine defined:

name: foo

run ns test

viash ns test 
Warning: no resources specified!
The working directory for the namespace tests is /tmp/viash_ns_test3210261991562471446
           namespace                 name               runner               engine            test_name exit_code duration               result
                                      foo           executable               native                start                                        
                                      foo           executable               native                tests        -1        0              MISSING
no tests found
====================================================================
Not all configs built and tested successfully
  1/1 tests missing

run ns test with --engine filter

viash ns test --engine native
Warning: no resources specified!
no engine id matching regex 'native' could not be found in the config.
The working directory for the namespace tests is /tmp/viash_ns_test8256720915213954339
           namespace                 name               runner               engine            test_name exit_code duration               result
All 0 configs built and tested successfully

Expected behavior

Either things should be consistent or alternatively a warning could be displayed.

Relevant log output

No response

Version

Viash 0.9.0-RC2

Possible solution

No response

Confirmation

Additional context

No response

Grifs commented 7 months ago

Fixed in Viash 0.9.0-RC3