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: Handling of task error_integration nulls #834

Merged
merged 3 commits into from
Jan 28, 2022
Merged

fix: Handling of task error_integration nulls #834

merged 3 commits into from
Jan 28, 2022

Conversation

gouline
Copy link
Contributor

@gouline gouline commented Jan 27, 2022

Fixes problem introduced in #830.

Tested the latest release v0.25.35 and discovered that DESCRIBE TASK returns a string "null", rather than an actual NULL. Frustrating, but there seems to be a similar issue with DESCRIBE USER handled in a similar way.

Those with task error notifications preview enabled and any tasks without error_notification set will see this:

# snowflake_task.task will be updated in-place
  ~ resource "snowflake_task" "task" {
      - error_integration  = "null" -> null
        id                 = "DB|SCHEMA|TASK"
        name               = "TASK"
        # (8 unchanged attributes hidden)
    }

Worse still, when it tries to update the error_notification to empty, it produced the following invalid SQL:

ALTER TASK "DB"."SCHEMA"."TASK" SET ERROR_INTEGRATION = 

To fix this, I implemented proper unsetting of that parameter.

Both problems have been around in the pipe implementation of error integration (also me last year #595), which task was largely copied from, so I propagated both fixes there too. Apologies for these oversights!

Test Plan

  • unit tests

References

@alldoami
Copy link
Contributor

/ok-to-test sha=438981e

@github-actions
Copy link

Integration tests success for 438981e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants