labgrid icon indicating copy to clipboard operation
labgrid copied to clipboard

remote/config: support drop-in files

Open steelman opened this issue 2 weeks ago • 5 comments

Pass "dropins" variable to a template being rendered containing a list of *.yaml files in a directory named after the template being rendered with ".d" appended. For example when rendering /etc/labgrid/configuration.yaml a list of files matching /etc/labgrid/configuration.yaml.d/*.yaml will be available. Then configuration.yaml may be as simple as

{% for f in dropins %} {% include f %} {% endfor %}

And adding a target is possible by simply creating a file in /etc/labgrid/configuration.yaml.d directory.

steelman avatar Dec 08 '25 13:12 steelman

Force-pushed to fix a ruff error.

jluebbe avatar Dec 09 '25 08:12 jluebbe

Codecov Report

:x: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 45.1%. Comparing base (0c01c19) to head (ae26c5d). :warning: Report is 2 commits behind head on master. :white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
labgrid/remote/config.py 0.0% 4 Missing :warning:
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #1785     +/-   ##
========================================
- Coverage    45.1%   45.1%   -0.1%     
========================================
  Files         172     172             
  Lines       13608   13612      +4     
========================================
  Hits         6144    6144             
- Misses       7464    7468      +4     
Flag Coverage Δ
3.10 45.1% <0.0%> (-0.1%) :arrow_down:
3.11 45.1% <0.0%> (-0.1%) :arrow_down:
3.12 45.1% <0.0%> (-0.1%) :arrow_down:
3.13 45.1% <0.0%> (-0.1%) :arrow_down:
3.14 45.1% <0.0%> (-0.1%) :arrow_down:
3.9 45.1% <0.0%> (-0.1%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 09 '25 08:12 codecov[bot]

Force-pushed to fix sphinx syntax.

jluebbe avatar Dec 09 '25 09:12 jluebbe

@steelman Do you still consider this RFC? Otherwise, please remove the marker from the title, so that we can get it merged.

jluebbe avatar Dec 09 '25 09:12 jluebbe

If you're fine, I am fine. Do you think this could/should be tested somehow?

steelman avatar Dec 09 '25 09:12 steelman