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

Regression: No longer possible to extend dictionary inside adjust block (+ sign is stripped) #276

Closed
lukaszachy opened this issue Jan 13, 2025 · 3 comments · Fixed by #279
Assignees
Labels
bug Something isn't working must
Milestone

Comments

@lukaszachy
Copy link
Collaborator

Expectation when running tmt -c dimension=value tests show for this test metadata is to have environment containing both 'FOO' and 'BAR' values.

However fmf-1.5.0+ makes tmt to get only the 'BAR' value.

Reproducer metadata:

test: echo
environment+:
  FOO: bar

adjust+:
  when: dimension == value
  environment+:
    BAR: baz

This seems to be caused by 'fmf' to report different 'raw' data:

fmf-1.4.0 shows environment+ inside adjust key

$ fmf_14 show
/repro
adjust: {'environment+': {'BAR': 'baz'}, 'when': 'dimension == value'}
environment: {'FOO': 'bar'}
test: echo

While recent (1.5.0 and 1.6.0) show environment: instead

$ fmf_16 show
/repro
adjust: {'environment': {'BAR': 'baz'}, 'when': 'dimension == value'}
environment: {'FOO': 'bar'}
test: echo
@lukaszachy lukaszachy added the bug Something isn't working label Jan 13, 2025
@lukaszachy
Copy link
Collaborator Author

bisect shows the regression happened in 759788f

@lukaszachy lukaszachy added this to the 1.6.1 milestone Jan 14, 2025
@lukaszachy lukaszachy self-assigned this Jan 14, 2025
@lukaszachy
Copy link
Collaborator Author

Decision: Revert #263, document that #190 is not possible in current fmf implementation.
To be released ASAP in 1.6.1

@lukaszachy
Copy link
Collaborator Author

Hm, if the reproducer is stored in 'main.fmf' and thus producing node named '/' then it contains 'adjust+' and 'environment+' keys. However if metadata cause named node (eg '/repro') by being in 'repro.fmf' file, or using '/repro:' in key, the node contains 'adjust' and 'environment'.

$ fmf show
/
adjust+: {'environment+': {'BAR': 'baz'}}
environment+: {'FOO': 'bar'}

$ mv main.fmf repro.fmf
$ fmf show
/repro
adjust: {'environment+': {'BAR': 'baz'}}
environment: {'FOO': 'bar'}

lukaszachy added a commit that referenced this issue Jan 14, 2025
This is necessary to make possible merging dictionaries
in adjust rules. Otherwise they would be always set (instead of update).

Fix: #276
Reopen: #190
lukaszachy added a commit that referenced this issue Jan 14, 2025
This is necessary to make possible merging dictionaries
in adjust rules. Otherwise they would be always set (instead of update).

Fix: #276
Reopen: #190
psss pushed a commit that referenced this issue Jan 16, 2025
This is necessary to make possible merging dictionaries
in adjust rules. Otherwise they would be always set (instead of update).

Fix: #276
Reopen: #190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working must
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant