Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MergeError if tag as list inherits tag as a string from the upper node #3198

Open
smyle10 opened this issue Sep 7, 2024 · 1 comment
Open

Comments

@smyle10
Copy link

smyle10 commented Sep 7, 2024

tmt version: 1.35.0

Given a main.fmf:

test: TEST_ITEMS=${TMT_TEST_NAME##*/} bash ./runtest.sh
tag: foobar
/test_keep_iproute_routes:
    tag+:
      - customer
      - unmanaged

Running tmt test ls got:

MergeError: Key 'tag' in /networking/nmstate/anyhost/route/test_keep_iproute_routes (can only concatenate str (not "list") to str).

Though tmt hints the reason and I can change string "foobar" as a list (but consider a new tmt user may not know the inheritance feature in tmt) , as https://tmt.readthedocs.io/en/stable/spec/core.html#tag indicates that a tag can be string or list, hope such merge can be improved.

@LecrisUT
Copy link
Contributor

This is an fmf issue. If you make the parent a list that would make it work. Maybe the parent could be converted to a list beforehand, but then it would make concatenation of strings impossible.

The full list of operators are here. Do you have an idea of an interface that could help here? Also related discussion here (the opposite case to yours)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants