Commit 5e8276c
authored
Add workspaceId/computeEnvId to nf-seqera auto labels (#7059)
* Add workspaceId and computeEnvId auto labels for Seqera executor
Register `workspaceId` and `computeEnvId` as new `autoLabels` short names
in the Seqera executor so Scheduler-backed runs can be aggregated by
Platform workspace and compute environment for cost reporting.
When included in `seqera.executor.autoLabels` (either via `true` or via
an explicit list), `createRun` emits:
- `seqera.io/platform/workspaceId`
- `seqera.io/platform/computeEnvId`
Values are sourced from the tower config / environment via PlatformHelper
(same resolution as the existing CreateRunRequest fields) with a fallback
to `seqera.executor.computeEnvId` for the compute environment ID.
Signed-off-by: Jonathan Marti <jonathan.marti@seqera.io>
Signed-off-by: Jon Marti <jonathan.marti@seqera.io>
* Address review: fold platform IDs into withWorkflowMetadata
- Drop the separate Labels.withPlatformContext method; handle
workspaceId / computeEnvId inside withWorkflowMetadata alongside
the existing workflowId, reading from workflow.platform.workspace.id
and workflow.platform.computeEnv.id (populated by TowerClient).
- Revert the extra call site in SeqeraExecutor.createRun.
- Simplify the unit tests down to one focused case each.
- Revert the VERSION bump and changelog entry (those belong to the
release commit).
Signed-off-by: Jonathan Marti <jonathan.marti@seqera.io>
Signed-off-by: Jon Marti <jonathan.marti@seqera.io>
---------
Signed-off-by: Jonathan Marti <jonathan.marti@seqera.io>
Signed-off-by: Jon Marti <jonathan.marti@seqera.io>1 parent e2c77c6 commit 5e8276c
5 files changed
Lines changed: 48 additions & 4 deletions
File tree
- plugins/nf-seqera/src
- main/io/seqera
- config
- executor
- test/io/seqera
- config
- executor
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
164 | 175 | | |
165 | 176 | | |
166 | 177 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
127 | 150 | | |
128 | 151 | | |
129 | 152 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| |||
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
198 | | - | |
| 201 | + | |
199 | 202 | | |
200 | 203 | | |
201 | 204 | | |
| |||
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
230 | 235 | | |
| 236 | + | |
231 | 237 | | |
232 | 238 | | |
233 | 239 | | |
| |||
0 commit comments