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

Fix to use non-nested parameters for datadog_event operator #62

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NomadBlacky
Copy link
Owner

@NomadBlacky NomadBlacky commented Mar 7, 2020

Typical operators are using non-nested parameters.
But datadog_event operator is using nested parameters.

+simple_query_nonexpanded:
  td>:
  # non-nested
  query: "SELECT * FROM nasdaq"

+example:
  datadog_event>:
    # nested
    title: "[TEST] digdag-plugin-datadog"
    text: "Digdag meets Datadog!!"
    tags:
      - "env:test"
    alert_type: info # is default. success, warning or error
    priority: normal # is default. or low

I think should use non-nested parameters making no misleading.
However, I prefer nested parameters because logs are more clear.

Before

digdag run --no-save --param home=$HOME events.dig
2020-03-07 18:01:59 +0900: Digdag v0.9.41
2020-03-07 18:02:00 +0900 [WARN] (main): Using a new session time 2020-03-07T00:00:00+00:00.
2020-03-07 18:02:00 +0900 [INFO] (main): Starting a new session project id=1 workflow name=events session_time=2020-03-07T00:00:00+00:00
2020-03-07 18:02:01 +0900 [INFO] (0016@[0:default]+events+example): datadog_event>: {title=[TEST] digdag-plugin-datadog, text=Digdag meets Datadog!!, tags=[env:test], alert_type=info, priority=normal}
2020-03-07 18:02:05 +0900 [INFO] (0016@[0:default]+events+example): Start the datadog_event operation.
2020-03-07 18:02:06 +0900 [INFO] (0016@[0:default]+events+example): Succeeded to post the event to Datadog. https://app.datadoghq.com/event/event?id=5357113725809002349
Success.

After

$ digdag run --no-save --param home=$HOME events.dig
2020-03-07 18:03:50 +0900: Digdag v0.9.41
2020-03-07 18:03:54 +0900 [WARN] (main): Using a new session time 2020-03-07T00:00:00+00:00.
2020-03-07 18:03:54 +0900 [INFO] (main): Starting a new session project id=1 workflow name=events session_time=2020-03-07T00:00:00+00:00
2020-03-07 18:03:55 +0900 [INFO] (0016@[0:default]+events+example): datadog_event>:
2020-03-07 18:03:57 +0900 [INFO] (0016@[0:default]+events+example): Start the datadog_event operation.
2020-03-07 18:04:00 +0900 [INFO] (0016@[0:default]+events+example): Succeeded to post the event to Datadog. https://app.datadoghq.com/event/event?id=5357115636173312813
Success.

@NomadBlacky NomadBlacky self-assigned this Mar 7, 2020
@NomadBlacky NomadBlacky changed the title Fix to use no nesting parameters for datadog_event operator Fix to use non-nested parameters for datadog_event operator Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant