Just a PSA: Don't use `--tags` as a parameter for ...
# ask-metaflow
f
Just a PSA: Don't use
--tags
as a parameter for the flow. We ran into an issue when we wanted to set tags inside the flow when it gets triggered using
Copy code
from metaflow import current
current.run.add_tags(['tag1', 'tag2'])
So we decided to use
--tags
as a parameter which we will pass during trigger
Copy code
python <flow> argo-workflows trigger --tags="my_tag"
It lead to complete breakdown of flow run where it won't even show the underlying DAG on UI since we were passing
--tags="our_custom_tags"
Check the 🧵 for error stack
✅ 1
Copy code
etting up task environment.
Downloading code package...
Code package downloaded.
Task is starting.
    Internal error
Traceback (most recent call last):
  File "/metaflow/metaflow/cli.py", line 1175, in main
    start(auto_envvar_prefix="METAFLOW", obj=state)
  File "/metaflow/metaflow/tracing/__init__.py", line 27, in wrapper_func
    return func(args, kwargs)
  File "/metaflow/metaflow/_vendor/click/core.py", line 829, in __call__
    return self.main(args, kwargs)
  File "/metaflow/metaflow/_vendor/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/metaflow/metaflow/_vendor/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/metaflow/metaflow/_vendor/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, ctx.params)
  File "/metaflow/metaflow/_vendor/click/core.py", line 610, in invoke
    return callback(args, kwargs)
  File "/metaflow/metaflow/_vendor/click/decorators.py", line 33, in new_func
    return f(get_current_context().obj, args, kwargs)
  File "/metaflow/metaflow/cli.py", line 639, in init
    obj.flow._set_constants(obj.graph, kwargs)
  File "/metaflow/metaflow/flowspec.py", line 151, in _set_constants
    val = kwargs[param.name.replace("-", "_").lower()]
KeyError: 'tags'
This is how UI looks like
UI isn't even updating the running status of the flow even after I deleted the underlying pods on EKS. All such runs are still showing green on UI
a
good catch - we can add
tags
to the list of disallowed parameter names
b
some other parameter names are also affected by this. I opened an issue at: https://github.com/Netflix/metaflow/issues/1735 and will have a PR out soon
among us party 1
thankyou 1