Closed stasjok closed 2 years ago
Hello.
I'm validating your changes against all the platforms with the following patch to trigger the errors:
There is no need to create the parameters/groups_ids/*
and parameters/efi/*
files as the errors occur before reading their content.
@myii, should we ask to include my patch in the PR to test or could we reserve such changes to a dedicated, to be created someday, test-mapstack-formula
repository?
Including it will add some more stuff to be managed by users when converting the formula for their use.
@myii, should we ask to include my patch in the PR to test or could we reserve such changes to a dedicated, to be created someday,
test-mapstack-formula
repository?Including it will add some more stuff to be managed by users when converting the formula for their use.
@baby-gnu Does that mean we would also need to update the bin/convert-formula.sh
script? If so, it's probably best if we add this in a separate PR once this is merged.
:tada: This PR is included in version 5.0.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Pushed out across relevant formulas using https://github.com/myii/ssf-formula/pull/418 (with author set as Stanislav Asunkin
).
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
Describe the changes you're proposing
If result of the lookup is a number, then map.jinja fails with
TypeError: object of type 'int' has no len()
here https://github.com/saltstack-formulas/template-formula/blob/080fdcd9f136f19d2a7dd15b17bf4de5c1c4a3c8/TEMPLATE/libmapstack.jinja#L184 If result of the lookup is a list of numbers, then map.jinja fails withJinja variable 'int object' has no attribute 'rpartition'
here https://github.com/saltstack-formulas/template-formula/blob/080fdcd9f136f19d2a7dd15b17bf4de5c1c4a3c8/TEMPLATE/libmapstack.jinja#L202 In this PR I tried to allow it to be numbers, booleans, list of numbers.Usecases are:
group_ids
which is a list of integers: https://www.uyuni-project.org/uyuni-docs/en/uyuni/specialized-guides/salt/salt-custom-states.html#_apply_a_custom_state_at_highstateY:G@efi
(returns boolean) or similarPillar / config required to test the proposed changes
parameters/map_jinja.yaml
:and add some values to files
state.apply btrfsmaintenance._mapdata
should not fail, values should be present.Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context