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

Fix labels missing from runs dump output #423

Merged
merged 9 commits into from
Jul 22, 2024

Conversation

JaimeSeqLabs
Copy link
Contributor

@JaimeSeqLabs JaimeSeqLabs commented Jun 17, 2024

Description

Closes #384

This PR adds the missing 'labels' query attribute needed to retrieve the workflow labels along with the rest of the metadata.
Also, the runs dump sub-cmd has been refactored to improve code readability and test coverage.

Guidelines for testing

In order to test the changes an existing workflow run with labels is needed, however, the example run used in the original issue can be re-used here.

Dump the workflow run:

$> ./tw runs dump -i UkcqQpttWqvPg -w seqeralabs/showcase -o rnaseq-showcase.tar.gz

Extract the files in the current directory:

$> tar -xzf rnaseq-showcase.tar.gz

Check that the file workflow-metadata.json contains a 'labels' field:

{
  "pipelineId" : 232551719896592,
  "workspaceId" : 138659136604200,
  "workspaceName" : "showcase",
  "userId" : 8456,
  "runUrl" : "https://tower.nf/orgs/seqeralabs/workspaces/showcase/watch/UkcqQpttWqvPg",
  "labels" : [ {  // <--- New field!
    "id" : 75554545402364,
    "name" : "aligner_rsem",
    "resource" : false,
    "isDefault" : false
  }, {
    "id" : 142259147750578,
    "name" : "owner",
    "value" : "harshil",
    "resource" : true,
    "isDefault" : false
  }, {
    "id" : 213027699544669,
    "name" : "workspace",
    "value" : "showcase",
    "resource" : true,
    "isDefault" : false
  }, {
    "id" : 153544452690741,
    "name" : "yeast",
    "resource" : false,
    "isDefault" : false
  } ]
}

…tribute-missing

# Conflicts:
#	src/main/java/io/seqera/tower/cli/commands/runs/DumpCmd.java
Copy link
Contributor

@tcrespog tcrespog left a comment

Choose a reason for hiding this comment

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

Also tested it and works successfully.

@JaimeSeqLabs JaimeSeqLabs merged commit cce3014 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.

Pipeline and resource labels missing from tw runs dump output
2 participants