Skip to content
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

Match pipelines name exactly #425

Merged
merged 4 commits into from
Jul 22, 2024

Conversation

JaimeSeqLabs
Copy link
Contributor

Description

Closes #360

When searching a pipeline by name match the names exactly, not partially.

Guidelines for testing

  1. Create a pipeline named HelloWorld
  2. Create a second pipeline named HelloWorldSecond
  3. When viewing pipelines by name the search matches the exact name and no "Multiple pipelines found" error is thrown.
$> ./tw pipelines view -n HelloWorld -w JaimeInc/Wsp

  Pipeline at [JaimeInc / Wsp] workspace:

    --------------+--------------------------------------
     ID           | 30153220095308                       
     Name         | HelloOptimization                    
     Description  |                                      
     Repository   | https://github.com/nextflow-io/hello 
     Compute env. | Org-batch-ce                         
     Labels       | owner=jaime                          

  Configuration:
....
  1. When the name includes " characters they are escaped (and the search should fail because pipeline names can only contain aplhanumeric, dash and underscore)
$> ./tw pipelines view -n '"Hello"World"' -w JaimeInc/Wsp

 ERROR: Unknown pipeline '\"Hello\"Optimization\"' at [JaimeInc / Wsp] workspace

Copy link
Member

@joaquimgamero joaquimgamero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JaimeSeqLabs I tested this through native compile and it works as described!

  • Looking for pipeline HelloWorld in personal workspace:
Screenshot 2024-07-02 at 16 38 26
  • Looking for pipeline HelloWorldSecond in personal workspace:
Screenshot 2024-07-02 at 16 39 21
  • Looking for a pipeline including quotes fails:
Screenshot 2024-07-02 at 16 40 02

Let me know if you want me to test additional scenarios.

@JaimeSeqLabs JaimeSeqLabs requested a review from pgeadas July 8, 2024 11:59
@JaimeSeqLabs JaimeSeqLabs merged commit 7354447 into master Jul 22, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Partial matching behavior on tw pipelines command
3 participants