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

Allow when key for step configs #2703

Open
lukaszachy opened this issue Feb 22, 2024 · 1 comment · May be fixed by #3340
Open

Allow when key for step configs #2703

lukaszachy opened this issue Feb 22, 2024 · 1 comment · May be fixed by #3340
Assignees
Labels
area | context The context adjust implementation specification Metadata specification (core, tests, plans, stories)
Milestone

Comments

@lukaszachy
Copy link
Collaborator

lukaszachy commented Feb 22, 2024

For simple on/off of the config based on the context it will be much more readable than using 'adjust' and having to think about the final ordering of the configs.

No changes to the config will be allowed (no modification of values) just 'enable' config if when is evaluated true
Compare:

adjust:
-  when: distro == fedora
   prepare+:
      - name: Fedora specific stuff
        how: shell
        script: <some script>
--snip more adjust rules and discover/provision/...---
prepare:
 - name: run this each time
   how: shell

with

prepare:
  - name: run this each time
    how: shell
  - name: Fedora specific stuff
        how: shell
        script: <some script>
        when: distro == fedora
@lukaszachy lukaszachy added enhancement specification Metadata specification (core, tests, plans, stories) labels Feb 22, 2024
@psss psss added the area | context The context adjust implementation label Feb 26, 2024
@psss
Copy link
Collaborator

psss commented Feb 26, 2024

Interesting idea. Sounds quite useful. And concise. And should be easy to implement. From the top of my head I don't see anything this approach would break.

@lukaszachy lukaszachy self-assigned this Feb 27, 2024
@lukaszachy lukaszachy added this to the 1.33 milestone Feb 27, 2024
@lukaszachy lukaszachy modified the milestones: 1.33, 1.34 Apr 23, 2024
@lukaszachy lukaszachy modified the milestones: 1.34, 1.35 Jun 6, 2024
@martinhoyer martinhoyer modified the milestones: 1.35, 1.36 Jul 30, 2024
@lukaszachy lukaszachy modified the milestones: 1.36, 1.37 Aug 27, 2024
@psss psss removed the enhancement label Sep 17, 2024
@thrix thrix modified the milestones: 1.37, 1.38 Oct 1, 2024
@thrix thrix modified the milestones: 1.38, 1.39 Oct 25, 2024
@lukaszachy lukaszachy linked a pull request Nov 4, 2024 that will close this issue
8 tasks
@psss psss modified the milestones: 1.39, 1.40 Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area | context The context adjust implementation specification Metadata specification (core, tests, plans, stories)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants