<#4876 [Core feature] Filter by labels> Issue crea...
# flyte-github
c
#4876 [Core feature] Filter by labels Issue created by blaketastic2 ### Motivation: Why do you think this is important? We have added custom labels to our Workflows / LaunchPlans as described in the docs here, however these labels cannot be used when querying resources in the backend. ### Goal: What should the final outcome look like, ideally? Ideally, a user would be able to add a filter with a label like `--filter.fieldSelector "spec.labels.XYZ=ABC"`just as they do today with other fields (e.g.
--filter.fieldSelector "state=1"
) ### Describe alternatives you've considered Because the
spec
is technically queryable (e.g. a filter of
eq(spec,foo)
or
contains(spec,foo)
will search against the database with a
WHERE launch_plans.spec = 'foo'
or
WHERE workflows.spec LIKE '%foo%'
respectively), we've attempted to try and hack our way to a solution. ### Propose: Link/Inline OR Additional context The labels are stored in the database as protos. During the query phase, we could try using a postgres extension that allows for querying against protos. ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte