-
-
Notifications
You must be signed in to change notification settings - Fork 394
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
Move Notification Logic from Discussion Store to Firebase Functions #3620
Move Notification Logic from Discussion Store to Firebase Functions #3620
Conversation
Tested manually and it's working. |
Visit the preview URL for this PR (updated for commit 2997735): https://onearmy-next--pr3620-3563-move-discussion-0q62o5e1.web.app (expires Wed, 31 Jul 2024 10:24:30 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 6d65e4f8fee2f6ab2da0c1c3b85b8797d66afa59 |
3 failed tests on run #5734 ↗︎
Details:
src/integration/questions/discussions.spec.ts • 1 failed test • ci-chrome
src/integration/howto/discussions.spec.ts • 1 failed test • ci-chrome
src/integration/research/discussions.spec.ts • 1 failed test • ci-chrome
Review all test suite changes for PR #3620 ↗︎ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one. Just leaving some code level comments initially. Especially as the cypress tests are failing (which I think we should expect as the functions the ci env are running won't include these changes) I'll checkout the branch and test myself.
) | ||
}) | ||
|
||
it('create nested comment and notify parent comment creator - research', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you have multiple tests that relate to research, then questions, etc. these are the right use case for a nested describle block, literally just with the name 'Research'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I change the title from 'create nested comment and notify parent comment creator - research' to 'create nested comment and notify parent comment creator'? without the ' - research'
1 failed and 1 flaky tests on run #5904 ↗︎
Details:
src/integration/howto/write.spec.ts • 1 failed test • ci-chrome
src/integration/settings.spec.ts • 1 flaky test • ci-chrome
Review all test suite changes for PR #3620 ↗︎ |
I've deployed these functions to the ci env. Will rerun the tests now and hopefully all will pass... |
@goratt12. Tests still failing unfortunately. Can I leave it to you please to confirm the functions deployed as expected, etc. and make changes accordingly? |
Could you please give me permissions to the onearmy-test-ci Firebase project? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3620 +/- ##
==========================================
+ Coverage 73.68% 74.96% +1.27%
==========================================
Files 41 42 +1
Lines 1254 1322 +68
Branches 253 279 +26
==========================================
+ Hits 924 991 +67
- Misses 308 309 +1
Partials 22 22 ☔ View full report in Codecov by Sentry. |
@goratt12 The test comment issue, can you give more of the detail we talked about yesterday please. Looks like you've still got a merge conflict? Happy to jump on a final manual test once that's sorted. |
For the tests, if they are now invoking cloud functions, maybe we could mock the request? |
That's a good idea, but the functions are internally triggered by Firestore changes, so we cannot intercept them there. The problem is that the function handleDiscussionUpdate listens for changes at this path: discussions_rev20231022/{id}. In our E2E tests, the Firestore collection is {run_id}_discussions_rev20231022. We considered changing the function to listen for changes with a wildcard path, but we decided that altering the environment for the tests is not the correct approach. |
@goratt12 We decided what to do about this didn't we? If we can't test it without big setup changes, we can't test it without big setup changes. |
Agreed, so currently I'm leaving the relevant tests commented with the explanation |
…ebase functions
PR Checklist
PR Type
Description
Move Notification Logic from Discussion Store to Firebase Functions
Added tests
Git Issues
Closes #3563
Screenshots/Videos
If useful, provide screenshot or capture to highlight main changes
What happens next?
Thanks for the contribution! We try to make sure all PRs are reviewed ahead of our monthly maintainers call (first Monday of the month)
If the PR is working as intended it'll be merged and included in the next platform release, if not changes will be requested and re-reviewed once updated.
If you need more immediate feedback you can try reaching out on Discord in the Community Platform
development
channel.