Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Adding multiple actions in a condition won't save both actions #2911

Open
maxlevinps opened this issue Dec 26, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@maxlevinps
Copy link

maxlevinps commented Dec 26, 2024

Describe the bug
As a user I want to define a workflow with a condition based on alert label match so I can have two different flows based on it.

To Reproduce
Build a workflow like the one in this image:
image

Hitting "Get YAML" returns the following YAML:

id: 8a72b5b0-20e7-4ad6-90f1-1e1686366b42
name: conditionsssssss
triggers:
  - type: manual
description: test
disabled: false
owners: []
services: []
consts: {}
steps: []
actions:
  - name: slack-action
    provider:
      type: slack
      config: "{{ providers.test }}"
      with:
        message: message
        channel: keep-groundcover
    condition:
      - name: Assert
        type: assert
        value: ""
        compare_to: ""

Expected behavior
Expected to see multiple actions in the actions section.

Copy link

dosubot bot commented Dec 26, 2024

Hello, @maxlevinps! I'm here to help you with any bugs, questions, or contributions. Let me know how I can assist you!

The issue you're encountering seems to be related to the serialization of multiple actions in the YAML output of your workflow. The expected structure for defining multiple actions in a Keep workflow YAML should look like this:

actions:
  - name: <action-name-1>
    provider:
      type: <provider-type-1>
      config: <provider-config-1>
      with:
        <provider-specific-parameters-1>
  - name: <action-name-2>
    provider:
      type: <provider-type-2>
      config: <provider-config-2>
      with:
        <provider-specific-parameters-2>
  # Add more actions as needed

Each action should be listed under the actions key, with its own name, provider, config, and parameters under with [1][2].

In your case, it seems that only one action is being serialized in the YAML output. This might be due to a bug in the workflow editor or the YAML generation process. You might want to check if there are any specific conditions or constraints that could be affecting the saving of multiple actions, or if there are any known issues with the workflow editor that could be causing this behavior.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the Bug Something isn't working label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant