Project

General

Profile

Actions

action #55829

closed

defaults section in YAML group settings does not support settings sub-section

Added by asmorodskyi over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2019-08-22
Due date:
% Done:

0%

Estimated time:

Description

There are a lot of cases when you have some set of test suite settings which applicable for whole job group . so it would be nice if I can write :

defaults:
settings:
VAR1: VAL1

and then all test suites added to this job group will have VAR1

Actions #1

Updated by livdywan over 4 years ago

You can currently achieve shared settings via aliasing eg.

- foo: &mysettings
    settings:
      SPAM: eggs
- foo: 
    *mysettings

That said, it would make sense to allow settings in defaults and merge them into scenarios the same way it's already allowed for machine and priority vaues.

Actions #2

Updated by coolo over 4 years ago

  • Category set to Feature requests
  • Target version set to Ready

I agree - it's a natural expectation that this works.

Actions #3

Updated by livdywan over 4 years ago

  • Status changed from New to In Progress
  • Assignee set to livdywan
  • Target version changed from Ready to Current Sprint
Actions #4

Updated by livdywan over 4 years ago

  • Status changed from In Progress to Resolved
Actions #5

Updated by asmorodskyi over 4 years ago

it for sure became better , thanks ! but I didn't get why after all settings end up under arch ? and not one level above ?
initially I was thinking about something like :

defaults:
  aarch64:
    machine: aarch64
    priority: 50
  settings:
    DESKTOP: textmode
    EXTRATEST: wicked
    KEEP_GRUB_TIMEOUT: '1'
    VIDEOMODE: text
    WICKED_TCPDUMP: '1'
    VIRTIO_CONSOLE_NUM: '2'
  x86_64:
    machine: 64bit
    priority: 50    

but I need to duplicate variables under each arch ( I know that I can use variables but it was not the point of this ticket ). I see use case which you was trying to cover with having arch specific variables . But is it possible to have settings in two layers ? with the flow that more specific override more generic

Actions #6

Updated by asmorodskyi over 4 years ago

sorry looks like identation not working even under code block , but I hope you get idea ?

Actions #7

Updated by livdywan over 4 years ago

Remember to make a space before blocks and lists in markdown ;-)

The default settings map to architectures the same way machine and priority do... so what you're suggesting is inconsistent with how the rest of the definition works, since you place a defaults key in place of an architecture. At least I'd be careful to introduce special-cases like that, if for example using aliases you just need two extra lines to do the same.

Actions #8

Updated by okurz over 4 years ago

What one could do though is define a special key that acts as the default, e.g.:

defaults:
  .default: &default
    settings:
      DESKTOP: textmode

  aarch64: *default
Actions

Also available in: Atom PDF