-
Notifications
You must be signed in to change notification settings - Fork 638
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
feature: add support for label/tags #2853
Conversation
Didn't we agree to go with |
yes, but once started with the implementation I've found this syntax more powerful and wanted to propose it (I'm still working on the issue so I can include also our first idea about |
4dbad10
to
01e2d49
Compare
This PR allows the following syntax:
|
Ok, I'll check soon 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, nice job. The main comment is about naming, let's call these resourceLabels
modules/nextflow/src/main/groovy/nextflow/processor/TaskConfig.groovy
Outdated
Show resolved
Hide resolved
modules/nextflow/src/main/groovy/nextflow/k8s/K8sTaskHandler.groovy
Outdated
Show resolved
Hide resolved
closes #2845 Signed-off-by: Jorge Aguilera <[email protected]>
include key=value syntax as valid format for labels Signed-off-by: Jorge Aguilera <[email protected]>
rename sticker as resourceLabels Signed-off-by: Jorge Aguilera <[email protected]>
01e2d49
to
fdcec30
Compare
This might be a different feature, but there could be value in allowing users to specify labels at the top-level like on the executor. Then have those labels propagate down to the
|
1bc50ac
to
f274322
Compare
@dougnukem thanks a good point, however, think the current proposal still works, because when setting something like in the config, it would apply to all processes
|
eeac718
to
54871df
Compare
54871df
to
53aa472
Compare
53aa472
to
e108ce6
Compare
cb92a61
to
fef3801
Compare
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this looks good a few comments to address. It should also be address the support for Google Batch
@@ -1674,6 +1674,19 @@ in the configuration file to select and configure subset of processes having sim | |||
|
|||
See the :ref:`config-process-selectors` documentation for details. | |||
|
|||
The ``label`` directive can be also expressed as a `Map<key-value>` or a `key=value` sentence: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now has been implemented with a new resourceLabels
directive. Please update the docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bentsherman can you take a look to (not sure if it's well expressed) https://github.com/nextflow-io/nextflow/pull/2853/files#diff-8b2232009593fccf012f8206c47ff7514a2fb5e4f98d190bbfafebbf36078c8fR1677
modules/nextflow/src/main/groovy/nextflow/k8s/K8sTaskHandler.groovy
Outdated
Show resolved
Hide resolved
I was looking how to set labels with Google batch but cannot find it, but I'm quite sure it's possible. @bentsherman any clue about that? |
@jorgeaguileraseqera the google batch labels are set through the AllocationPolicy: https://cloud.google.com/java/docs/reference/google-cloud-batch/latest/com.google.cloud.batch.v1.AllocationPolicy.Builder#com_google_cloud_batch_v1_AllocationPolicy_Builder_putAllLabels_java_util_Map_java_lang_String_java_lang_String__ |
946edef
to
2004783
Compare
Signed-off-by: Paolo Di Tommaso <[email protected]>
2004783
to
6184178
Compare
Still could not figure out how to use Google Batch API to setup labels. I've open a separate issue for that |
Do you have an issue for this? |
Fixed in #3170 |
Actually, yes.
as mentioned in the discussion. And I used
I think I have a couple of questions:
Additional information: |
@beichen1024 it should be |
@bentsherman The GCP labeling being added appears to be done at the Google Lifesciences Pipeline level, for this to apply to the GCP VMs for cost monitoring this needs to be done at the VirtualMachine.labels level. I believe instead this should be applied instead or in addition at the Resource/VirtualMachine level.
|
Apply GCP resourceLabels to the VirtualMachine to propagate into the VM's so that the labels can be used for things like GCP billing tracking etc. Related to nextflow-io#2853 (comment) Signed-off-by: Doug Daniels <[email protected]>
Allow a new syntax in the
label
directive in key-value formatwhen this syntax is used we store them in a new Map variable so executors can access them and tag the process if present
closes #2845
Signed-off-by: Jorge Aguilera [email protected]