question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nested custom objects aren't supported for custom arguments

See original GitHub issue

To overcome the limits of built-in matrices (#297), I tried to use _customArguments as usual. Unfortunately it is also way too limited for that use-case currently. What I need to model is

strategy:
    fail-fast: false
    matrix:
        "environment":
            - "windows-2019"
            - "windows-2022"
            - "windows-latest"
        "distribution":
            - "wsl-id": "Debian"
              "user-id": "Debian"
              "match-pattern": "*Debian*"
              "default-absent-tool": "dos2unix"
            - "wsl-id": "Alpine"
              "user-id": "Alpine"
              "match-pattern": "*Alpine*"
              "default-absent-tool": "dos2unix"
            - "wsl-id": "kali-linux"
              "user-id": "kali-linux"
              "match-pattern": "*Kali*"
              "default-absent-tool": "dos2unix"
            - "wsl-id": "openSUSE-Leap-15.2"
              "user-id": "openSUSE-Leap-15.2"
              "match-pattern": "*openSUSE*Leap*15.2*"
              "default-absent-tool": "which"
            - "wsl-id": "Ubuntu"
              "user-id": "Ubuntu-20.04"
              "match-pattern": "*Ubuntu*20.04*"
              "default-absent-tool": "dos2unix"
            - "wsl-id": "Ubuntu-18.04"
              "user-id": "Ubuntu-18.04"
              "match-pattern": "*Ubuntu*18.04*"
              "default-absent-tool": "dos2unix"
            - "wsl-id": "Ubuntu-16.04"
              "user-id": "Ubuntu-16.04"
              "match-pattern": "*Ubuntu*16.04*"
              "default-absent-tool": "dos2unix"
        "distribution2":
            - "wsl-id": "Debian"
              "user-id": "Debian"
              "match-pattern": "*Debian*"
              "default-absent-tool": "dos2unix"
        "exclude":
            - "environment": "windows-2019"
              "distribution":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
              "distribution2":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
            - "environment": "windows-2022"
              "distribution":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
              "distribution2":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
            - "environment": "windows-latest"
              "distribution":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
              "distribution2":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
        "include":
            - "environment": "windows-2019"
              "distribution":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
              "distribution2":
                  "wsl-id": "Ubuntu"
                  "user-id": "Ubuntu-20.04"
                  "match-pattern": "*Ubuntu*20.04*"
                  "default-absent-tool": "dos2unix"
            - "environment": "windows-2022"
              "distribution":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
              "distribution2":
                  "wsl-id": "Ubuntu"
                  "user-id": "Ubuntu-20.04"
                  "match-pattern": "*Ubuntu*20.04*"
                  "default-absent-tool": "dos2unix"
            - "environment": "windows-latest"
              "distribution":
                  "wsl-id": "Debian"
                  "user-id": "Debian"
                  "match-pattern": "*Debian*"
                  "default-absent-tool": "dos2unix"
              "distribution2":
                  "wsl-id": "Ubuntu"
                  "user-id": "Ubuntu-20.04"
                  "match-pattern": "*Ubuntu*20.04*"
                  "default-absent-tool": "dos2unix"

but with _customArguments I just achieved

strategy:
    fail-fast: false
    matrix: :-(

as it does not support deeper nested structures.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jmfayardcommented, Jul 23, 2022

For me as well

1reaction
Vampirecommented, Jul 22, 2022

Sounds good from a quick thought

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dapper can't ignore nested objects for parameter?
Dapper extensions has a way to create custom maps, which allows you to ignore properties: public class MyModelMapper : ClassMapper<MyModel> ...
Read more >
Flat target object, nested source objects, target = "." not working
I often come across situations where objects have fields on different levels (e.g. target has flat fields, source has multiple nested ...
Read more >
Passing nested custom objects as parameters in wcf - MSDN
Hi,. I have been trying to implement a wcf web service with a website application as the client. Have been able to do...
Read more >
Nesting Objects without Passing Arguments?
I have a couple of classes that I've nested together (not in the sense you may think so bare with me), to create...
Read more >
Pipeline Steps - Amazon SageMaker - AWS Documentation
Like inputs , these keys must be primitive types, and nested objects are not supported. Timeout and stopping behavior. The Lambda class has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found