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

New introspection workflow.seqeraPlatform scope for data from Seqera Platform #5077

Open
ewels opened this issue Jun 19, 2024 · 4 comments
Open

Comments

@ewels
Copy link
Member

ewels commented Jun 19, 2024

It'd be nice to have a new workflow introspection scope called workflow.seqeraPlatform to access metadata from Seqera Platform, when available.

For example:

workflow.seqeraPlatform.user.username
workflow.seqeraPlatform.user.name
workflow.seqeraPlatform.user.email
workflow.seqeraPlatform.user.roles
workflow.seqeraPlatform.workspace.id
workflow.seqeraPlatform.workspace.name
workflow.seqeraPlatform.computeEnvironment.id
workflow.seqeraPlatform.computeEnvironment.name
workflow.seqeraPlatform.pipeline.name
workflow.seqeraPlatform.pipeline.repository
workflow.seqeraPlatform.pipeline.revision
workflow.seqeraPlatform.run.id

..etc. Can think of many more, or compare to the Seqera Platform API for standard fields.

If available, these could be used to set variables within the workflow config. There are many examples, a simple one would be the work directory:

workDir = {"/path/to/a/work/directory/${workflow.seqeraPlatform.user.username}/${workflow.seqeraPlatform.pipeline.name}/${workflow.runName}"}

Another one would be for notification emails (maybe more relevant in case of custom notification emails, like nf-core, but still useful as a simple example):

notification.to = workflow.seqeraPlatform.user.email
@pditommaso
Copy link
Member

-1. it platform that needs to orchestrate nextflow, not the other way around

@bentsherman
Copy link
Member

I believe the main use case was to apply resource labels based on platform metadata such as the run ID and user. These settings would be defined in the platform (e.g. CE-level config) but you still need to expose this metadata to the config via an implicit variable or environment variable

@pditommaso
Copy link
Member

Then platform should provide the corresponding config

@ewels
Copy link
Member Author

ewels commented Jun 26, 2024

Then platform should provide the corresponding config

That's exactly what I'm suggesting. That platform provides the config to Nextflow, via workflow variables.

These should 100% be read-only, the same as the other workflow introspection variables.

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

No branches or pull requests

3 participants