Comments (6)
the description has been updated with a new run ensuring consistency between all the parts
from argo-workflows.
did some testing
{{workflow.labels.workflows.argoproj.io/creator}}
: worked{{workflow.labels.workflows.argoproj.io/cron-workflow}}
: worked{{=workflow.labels.workflows.argoproj.io/creator}}
:MetricsError: unable to substitute parameters for metric 'exec_count': failed to evaluate expression: unknown name creator (1:39) | workflow.labels.workflows.argoproj.io/creator | ......................................^
{{=workflow.labels.workflows.argoproj.io/cron-workflow}}
:MetricsError: unable to substitute parameters for metric 'exec_count': failed to evaluate expression: unknown name cron (1:39) | workflow.labels.workflows.argoproj.io/cron-workflow | ......................................^
{{=workflow.labels['workflows.argoproj.io/creator']}}
:MetricsError: unable to substitute parameters for metric 'exec_count': failed to evaluate expression "workflow.labels['workflows.argoproj.io/creator']"
{{=workflow.labels['workflows.argoproj.io/cron-workflow']}}
:MetricsError: unable to substitute parameters for metric 'exec_count': failed to evaluate expression "workflow.labels['workflows.argoproj.io/cron-workflow']"
from argo-workflows.
Follow-up from this Slack thread.
I tried using
"{{workflow.labels.workflows.argoproj.io/cron-workflow}}"
received error
MetricsError: unable to substitute parameters for metric 'exec_count': failed to resolve {{=workflow.labels['workflows.argoproj.io/cron-workflow']}}, unable to substitute parameters for metric 'exec_duration': failed to resolve {{=workflow.labels['workflows.argoproj.io/cron-workflow']}}
value: "{{workflow.labels.workflows.argoproj.io/creator}}"
The description here seems to have copy+pasted a few different ones, so it's not exactly clear which variants you tried and which you didn't. All 3 of the above are different.
dot syntax works on plain Workflow
(not CronWorkflow
)
In the thread, @tico24 wrote that this works:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: wibblewobble-
spec:
metrics:
prometheus:
- name: exec_count
help: "Count of workflow execution by result status - workflow level"
labels:
- key: name
value: "{{workflow.labels.workflows.argoproj.io/creator}}"
- key: status
value: "{{workflow.status}}"
counter:
value: "1"
but not when using as a workflowSpec
of a CronWorkflow
. Tim's hypothesis there was: "My assumption is that the metrics parameters are unpacked before the cron label is applied to the running workflow, so it can't find the label - hence the error. I would agree that this is an issue."
expr
brackets syntax
I suggested using the expr
style brackets, i.e. {{=workflow.labels['workflows.argoproj.io/cron-workflow']}}
. Per the error it seems like that didn't work either, although not entirely clear due to copy+paste errors as per above
I'm also not sure if brackets are potentially affected by #11549
from argo-workflows.
ya im all over the place, working on cleaning it up... sorry
from argo-workflows.
the middle two shouldn't work, so those are correct.
the last two I would expect to work, so are buggy.
Regarding the first two -- those worked on a CronWorkflow
as well? Since Tim said it didn't work when he tried a Workflow
generated by a CronWorkflow
from argo-workflows.
all of my testing was done by setting the metrics in the controller config workflow defaults, creating a cronworkflow, and submitting it through the UI
from argo-workflows.
Related Issues (20)
- feat: support fish completion
- Use trusted distribution for Python SDK publishing
- 3.5.7 Server pods are crashing after upgrade HOT 10
- `make docs` reorders `.spelling` as case-insensitive on Mac HOT 1
- 3.5.7 No more result from API when `workflows.argoproj.io/phase=Running` HOT 7
- Terminated Workflow has label `workflows.argoproj.io/completed: false`, causing metrics issues HOT 3
- UI: Links from logs stopped being clickable after update HOT 3
- 3.5.6 Logs flooded with `Error updating workflow: Operation cannot be fulfilled on workflows.argoproj.io`
- UI: "Finished before" field only affects visible Workflows HOT 2
- Workflow stuck in `Running` when Karpenter `pod deleted` HOT 5
- 3.5.7 Server keeps restarting, panicking HOT 7
- ArtifactGC fails when workflows are retried HOT 4
- Metrics Error: failure metric for workflow status not reporting correctly if in WorkflowTemplate
- outbound node of itself HOT 1
- UI: Share URLs with search criteria set HOT 2
- UI: Filter workflows by archived/unarchived HOT 1
- Expr lang in argo: can't use `concat` function HOT 1
- v3.5.7: namespaced install causes the server to complain about list+watch on cluster scoped workflows HOT 3
- Suspended CronWorkflow still generates Workflows that remain in running state HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argo-workflows.