Skip to content

Can not manipulate select statement in macros #8419

@Globegitter

Description

@Globegitter

Description of the feature request:

The rules_k8s have a rule k8s_objects which takes a list of labels (k8s_object targets) and creates multiple targets with these labels, with custom endings, that it knows have been created from the underlying k8s_object. So there is code like [x + ".create" for x in objects] If objects is now a select statement that fails with something like: select is not iterable. IT would be nice if I could still iterate over a select statement similar to a dict, so I could manipulate the labels in the macro.

Feature requests: what underlying problem are you trying to solve with this feature?

Now I have to use a normal dict as a workaround which the macro then converts into a select statement. I think this ends up being confusing for the end-user as that is not usual

What's the output of bazel info release?

0.25.2

Have you found anything relevant by searching the web?

#8171 but seems not directly related

Any other information, logs, or outputs that you want to share?

For the exact use of this see PR: bazelbuild/rules_k8s#342

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)not staleIssues or PRs that are inactive but not considered staleteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionstype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions