Project

General

Profile

Actions

User story #25970

open

Make compilation resolved loops over Blocks/Methods in techniques possible

Added by Félix DALLIDET about 2 months ago. Updated 23 days ago.

Status:
Pending release
Priority:
N/A
Category:
rudderc
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
To do
Fix check:
To do
Regression:
No

Description

Being able to loop/repeat a method|block call in a technique using parameterized local variables would be great.
The loops will be resolved at technique compilation, right before the starting from the leaf element when nested.

The proposed syntax is heavily inspired from the Ansible loops syntax https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#using-loops.

  - name: "Install a package" 
    method: package_present
    params:
      name: "${plouf.name}" 
      version: "${plouf.version}" 
    foreach:                 # field to force a loop
      - name: "vim" 
        version: "latest" 
      - name: "htop" 
        version: "2.3.4" 
      - name: "${technique_id.extra_package}" 
        version: "latest" 
    foreach_name: "plouf"    # loop iterator name, useful when loops are nested using blocks

Subtasks 2 (2 open0 closed)

User story #26116: Add Scala backend for technique loopsPending releaseFrançois ARMANDActions
User story #26120: Make sure that bundle arity is always strict when resolving loopsPending releaseAlexis MoussetActions
Actions #1

Updated by Félix DALLIDET about 2 months ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
Actions #3

Updated by Félix DALLIDET about 2 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder/pull/6049
Actions #4

Updated by Anonymous about 1 month ago

  • Status changed from Pending technical review to Pending release
Actions #5

Updated by Vincent MEMBRÉ 23 days ago

  • Subtask #26116 added
Actions #6

Updated by Félix DALLIDET 23 days ago

  • Subtask #26120 added
Actions

Also available in: Atom PDF