Skip to content

Triggers with null values create invalid JSON #3719

@elventear

Description

@elventear

Describe the bug

If a trigger defines a payload with a source value that is null, the JSON that is passed as the trigger payload is an invalid JSON.

To Reproduce

  1. Define trigger with payload a follows:
payload:
- dest: nullable_key
   src:
     useRawData: true
     dataKey: body.nullable_key
  1. Receive event from source with JSON as { ... "nullable_key": null, ... }.
  2. The payload JSON object received by trigger is { ... "nullable_key": , ... }, which is invalid JSON.

Expected behavior

The payload should be { ... "nullable_key": null, ... }.

Environment (please complete the following information):

  • Argo Events: 1.9.7
  • Tested with Kafka Trigger and Custom Trigger.

Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions