Project

General

Profile

Actions

action #62603

closed

Anchor/alias for hash map in job template settings in Job Groups YAML produces error

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

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
-
Start date:
2020-01-23
Due date:
% Done:

0%

Estimated time:

Description

YAML attached to a bug is producing error :

There was a problem applying the changes:
    YAML::XS::Load Error: The problem: did not find expected key was found at document: 1, line: 42, column: 11 while parsing a block mapping at line: 40, column: 9

You may try to reproduce a problem by replacing content of http://autobot/admin/job_templates/3


Files

faulty_yaml.yaml (2.21 KB) faulty_yaml.yaml asmorodskyi, 2020-01-23 15:29

Related issues 1 (0 open1 closed)

Related to openQA Project - action #59148: Support YAML merge keys in Job Group EditorResolvedtinita2019-11-06

Actions
Actions #1

Updated by okurz about 4 years ago

  • Subject changed from Anchor/alias for hash map in job template settings in Job Groups YAML produces error to Anchor/alias for hash map in job template settings in Job Groups YAML produces error
  • Category set to Regressions/Crashes

I asked asmorodskyi to create the ticket after coming up with the YAML part together. The important section from the YAML document (simplified correctly I hope):

scenarios:
  x86_64:
    sle-15-SP2-Online-x86_64:
      - sut:
          settings: &general_settings
            DESKTOP: textmode
            EXTRATEST: wicked
      - ref:
          settings:
          <<: *general_settings
          REF: '1'
          WICKED: 'advanced'
          testsuite: empty
Actions #2

Updated by tinita about 4 years ago

  • Related to action #59148: Support YAML merge keys in Job Group Editor added
Actions #3

Updated by tinita about 4 years ago

This << is called a merge key, and so far we don't support it in the Job Group templates.

The YAML module we use doesn't support it. We would have to switch to a newer YAML module, and we have a ticket for that:
#59148

Actions #4

Updated by okurz about 4 years ago

  • Status changed from New to Rejected
  • Assignee set to okurz

argh, if it's again the same issue we can close this one as duplicate. The next time we hit this I will start to rewrite openQA in python ;P

Actions #5

Updated by tinita about 4 years ago

Additionally, there are several formatting errors in the attached YAML file:

  - wicked_advanced_ref:
      settings:
      <<: *general_settings  # this and the following 3 lines need 2 more indentation spaces
      IS_WICKED_REF: '1'
      WICKED: 'advanced'
      testsuite: empty
  - wicked_advanced_sut:
      settings:
      <<: *general_settings   # same here
      IS_WICKED_REF: '1'
      WICKED: 'advanced'
      testsuite: empty

and so on.
Currently it is equal to:

  - wicked_advanced_ref:
      settings: null
      <<: *general_settings
      IS_WICKED_REF: '1'
      WICKED: 'advanced'
      testsuite: empty
  - wicked_advanced_sut:
      settings: null
      <<: *general_settings
      IS_WICKED_REF: '1'
      WICKED: 'advanced'
      testsuite: empty

Hope that helps.

Actions

Also available in: Atom PDF