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: Add AWS_SNS notification_provider support for error notifications for Snowpipe. #777

Merged
merged 5 commits into from
Dec 6, 2021

Conversation

ghost
Copy link

@ghost ghost commented Dec 3, 2021

Context

I am adding AWS SNS notification_provider support for error notifications for Snowpipe. The current Snowflake provider version supports this feature; however, it supports an outdated version of it that was using SQS. My goal is to adapt the current provider to support SNS instead of SQS and thus stay up to date with the Snowflake feature. The documentation link for the new Snowflake feature could be found here

Please keep some things in mind:

  • This feature is currently in private preview and must be enabled on the account level
  • I am not very experienced in Go and I would appreciate some guidance

What I have tried to do (but does not seem to pass the tests)

I took reference of PR [595] which essentially does the same thing I want to do but using SQS instead of SNS.

However, I get the following errors when I try to run the test using make like:

  FAIL
  coverage: 55.0% of statements
  FAIL    github.com/chanzuckerberg/terraform-provider-snowflake/pkg/resources    11.599s
  ok      github.com/chanzuckerberg/terraform-provider-snowflake/pkg/snowflake    0.577s  coverage: 59.7% of statements
  ?       github.com/chanzuckerberg/terraform-provider-snowflake/pkg/testhelpers  [no test files]
  ok      github.com/chanzuckerberg/terraform-provider-snowflake/pkg/validation   0.273s  coverage: 93.1% of statements
  ?       github.com/chanzuckerberg/terraform-provider-snowflake/pkg/version      [no test files]
  FAIL
  make: *** [test] Error 1

What am I doing wrong that makes the tests fail? Am I on the right track?

Happy to include further information if needed : )

@ghost ghost changed the title fix/Add AWS_SNS notification_provider support for error notifications for Snowpipe. fix: Add AWS_SNS notification_provider support for error notifications for Snowpipe. Dec 3, 2021
@alldoami
Copy link
Contributor

alldoami commented Dec 3, 2021

Please run make docs.

@alldoami
Copy link
Contributor

alldoami commented Dec 3, 2021

@ghost
Copy link
Author

ghost commented Dec 5, 2021

Please add a test here as well: https://github.com/chanzuckerberg/terraform-provider-snowflake/blob/main/pkg/resources/notification_integration_acceptance_test.go

Error notifications feature is currently in private preview link reference here and Snowflake staff need to enable it for that particular account before setting error_integration parameter would work.

@ghost
Copy link
Author

ghost commented Dec 5, 2021

Please run make docs.

Docs re-generated

@ghost
Copy link
Author

ghost commented Dec 6, 2021

@alldoami, I believe I finally fixed all the issues. I was able to run make test successfully. Please approve the Github Actions

@alldoami
Copy link
Contributor

alldoami commented Dec 6, 2021

/ok-to-test sha=3a447b5

@github-actions
Copy link

github-actions bot commented Dec 6, 2021

Integration tests success for 3a447b5

@alldoami alldoami merged commit 02a97e0 into Snowflake-Labs:main Dec 6, 2021
daniepett pushed a commit to daniepett/terraform-provider-snowflake that referenced this pull request Feb 9, 2022
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.

None yet

2 participants