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

[Source] Snowflake - Add regex to getFailedTasksInDatabase #6736

Merged
merged 14 commits into from
Jun 6, 2023

Conversation

vellames
Copy link
Contributor

@vellames vellames commented Jun 1, 2023

WHAT

🤖 Generated by Copilot at f3c7be6

This pull request updates the snowflake package to version 0.9.1, which includes minor changes and bug fixes for several actions and sources related to snowflake. It also adds a new prop to the failed-task-in-schema source to filter failed tasks by name using regex, and refactors the common module of the snowflake sources to use helper methods for getting and setting the last max timestamp from the database. Additionally, it improves the performance and accuracy of the getFailedTasksInDatabase method of the snowflake app by using the INFORMATION_SCHEMA.TASK_HISTORY table function with some additional parameters.

🤖 Generated by Copilot at f3c7be6

We're the snowflake crew and we're here to say
We've fixed some bugs and added some features today
We've bumped up the versions of our actions and sources
So pull the latest code and join us in our courses

WHY

HOW

🤖 Generated by Copilot at f3c7be6

  • Incremented the version of the snowflake package and all the actions and sources related to snowflake to indicate minor changes or bug fixes (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Added the taskName prop to the failed-task-in-schema source to allow filtering the failed tasks by a regex pattern (link)
  • Modified the getFailedTasksInDatabase method of the snowflake.app.mjs file to accept the taskName parameter and use the INFORMATION_SCHEMA.TASK_HISTORY table function with additional parameters for performance and accuracy (link)
  • Added the _getLastMaxTimestamp and _setLastMaxTimestamp methods to the common.mjs module to abstract the logic of getting and setting the last max timestamp from the database (link)
  • Modified the watchObjectsAndEmitChanges and emitFailedTasks methods of the common.mjs module to use the _getLastMaxTimestamp and _setLastMaxTimestamp methods instead of directly accessing the database, and to pass the taskName parameter to the getFailedTasksInDatabase method (link, link, link)

@vercel
Copy link

vercel bot commented Jun 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pipedream-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2023 3:18pm
pipedream-docs-redirect-do-not-edit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2023 3:18pm

@vellames vellames self-assigned this Jun 1, 2023
@vellames vellames added this to Ready for PR review in Component (Source and Action) Backlog Jun 1, 2023
@dylburger dylburger added the triaged For maintainers: This issue has been triaged by a Pipedream employee label Jun 1, 2023
@vellames vellames changed the title Feature/regex snowflake 5867 [Source] Snowflake - Add regex to getFailedTasksInDatabase Jun 1, 2023
@michelle0927 michelle0927 moved this from Ready for PR review to In Review in Component (Source and Action) Backlog Jun 1, 2023
michelle0927
michelle0927 previously approved these changes Jun 1, 2023
Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Ready for QA!

@michelle0927 michelle0927 moved this from In Review to Ready for QA in Component (Source and Action) Backlog Jun 1, 2023
@vunguyenhung vunguyenhung moved this from Ready for QA to In QA in Component (Source and Action) Backlog Jun 2, 2023
@vunguyenhung
Copy link
Collaborator

Hello everyone, I have re-tested this PR and there's still a test cases failed.

Please check the test report below for more information
Snowflake_6736_1107.pdf

@vunguyenhung vunguyenhung moved this from In QA to Changes Required in Component (Source and Action) Backlog Jun 2, 2023
@vellames vellames removed this from Changes Required in Component (Source and Action) Backlog Jun 2, 2023
@vellames
Copy link
Contributor Author

vellames commented Jun 2, 2023

Closes #5867

@vellames vellames linked an issue Jun 2, 2023 that may be closed by this pull request
@vellames
Copy link
Contributor Author

vellames commented Jun 5, 2023

@vunguyenhung Fixed. Also, I used this PR to make schema be an array

@vunguyenhung
Copy link
Collaborator

Hi everyone, all test cases are passed! Ready for release!

Test report
Snowflake_6736_0922.pdf

@vellames vellames merged commit 85aa81d into master Jun 6, 2023
10 checks passed
@vellames vellames deleted the feature/regex-snowflake-5867 branch June 6, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged For maintainers: This issue has been triaged by a Pipedream employee
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TRIGGER] Snowflake Failed Tasks: filter on task name regex
5 participants