Skip to content

Comments

Add platform-related metadata in Lineage records#6545

Open
jorgee wants to merge 11 commits intomasterfrom
add-platform-meta-in-lineage
Open

Add platform-related metadata in Lineage records#6545
jorgee wants to merge 11 commits intomasterfrom
add-platform-meta-in-lineage

Conversation

@jorgee
Copy link
Contributor

@jorgee jorgee commented Nov 6, 2025

close #5077

This PR retrieves the platform metada during the onWorkflowCreate and stores in the seqeraPlatform property in the WorkflowMetadata class. The lineage module has been extended adding a metadata field in the WorkflowRun record including the platform metadata.

This PR includes the changes of #6069.

To tests the whole integration, it is required to generate a nf-launcher image with the nextflow changes as in e2e tests. Then , use tw launch to run a workflow including the options to use a modified launcher image (--launcher-image) and a nextflow.config file (--config) with the following lineage configuration

lineage.enabled=true
lineage.store.location='s3://<bucket>/lineage'

Use a <bucket> associated to the CE running the pipeline to ensure you have the proper permissions.

Once finished, you can use the nextflow lineage commands to inspect the workflow lineage records.

Example of the generated metadata extracted form a test execution:

"metadata" : {
    ...
    "seqeraPlatform": {
        "workflowId": "4mjnvcrG15bCMp",
        "user": {
          "id": "13898",
          "userName": "jorge-ejarque",
          "email": "jorge.ejarque@seqera.io",
          "firstName": "Jorge",
          "lastName": "Ejarque",
          "organization": null
        },
        "workspace": {
          "id": "20121123931769",
          "name": "jorge-test-workspace",
          "fullName": "Jorge test workspace",
          "organization": "test-org-jorge"
        },
        "computeEnv": {
          "id": "3xjr2I8RofsG5Kx0pjZQoQ",
          "name": "test-ce",
          "platform": "aws-cloud"
        },
        "pipeline": {
          "id": "51175491284294",
          "name": "https://github.com/nextflow-io/hello",
          "revision": "master",
          "commitId": null
        },
        "labels": []
      },
}

TODO:

  • Check if version upgrade is required

Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
@netlify
Copy link

netlify bot commented Nov 6, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 0a84715
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/69973324337d170008243a73

Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
…ation

Signed-off-by: jorgee <jorge.ejarque@seqera.io>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
@jorgee
Copy link
Contributor Author

jorgee commented Nov 7, 2025

Updates:

Regarding increasing the version, I have tested reading WorkflowRun generated with this PR with 25.10.0 and olded versions and viceversa.

  • Records generated wih 25.04.x can be read with this PR metadata appear as null as expected.
  • Records generated with this PR can be read since 25.07.0-edge, but metadata field is not shown.
  • We can't read in 25.04.x because of the spec change. They could be read if we backport commit 6328613 where we added the spec management.

Apart form that, a minor comment is that there are some duplicated data such as run name, session id, repository, script files or revision. They are already Workflow or WorkflowRun properties and they are also inside metadata. Should these properties be removed form metadata ?

void setCommonApi( TowerCommonApi commonApi ){
this.commonApi = commonApi
}
/**
Copy link
Member

Choose a reason for hiding this comment

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

Would not make sense to pass both TowerCommonApi and HxClient via the constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 27e3124

jorgee and others added 5 commits February 13, 2026 17:03
Signed-off-by: Jorge Ejarque <jorgee@users.noreply.github.com>
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
…e platform object in worklfow Metadata

Signed-off-by: jorgee <jorge.ejarque@seqera.io>
@jorgee
Copy link
Contributor Author

jorgee commented Feb 19, 2026

I have updated the code master and make it also compatible with changes in #6818 (renaming the variable seqeraPlatform to platform and other minor changes).

Example of what is included in WorkflowRun

"platform": {
        "workflowId": "PgoP1b2Di3aBq",
        "user": {
          "id": "13898",
          "userName": "jorge-ejarque",
          "email": "jorge.ejarque@seqera.io",
          "firstName": "Jorge",
          "lastName": "Ejarque",
          "organization": "Seqera"
        },
        "workspace": {
          "id": "20121123931769",
          "name": "jorge-test-workspace",
          "fullName": "Jorge test workspace",
          "organization": "test-org-jorge"
        },
        "computeEnv": {
          "id": "4xKOsGp63s3SHeJ4MTThwT",
          "name": "test-ce-aws",
          "platform": "aws-batch"
        },
        "pipeline": {
          "id": "51175491284294",
          "name": "https://github.com/nextflow-io/hello",
          "revision": "master",
          "commitId": null
        },
        "labels": null
      }

@jorgee jorgee marked this pull request as ready for review February 19, 2026 16:05
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.

New introspection workflow.seqeraPlatform scope for data from Seqera Platform

2 participants