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

Adding folder nodes mapping the Intercom hierarchy #9469

Merged
merged 12 commits into from
Dec 20, 2024

Conversation

overmode
Copy link
Contributor

@overmode overmode commented Dec 17, 2024

Description

Add folder nodes for TeamId, Teams, CollectionId and HelpCenter

Risk

Break Intercom connector

Test

Connect locally, do a few operations, delete then restore connector.

Deploy Plan

  • Stop intercom connectors
  • Deploy connectors
  • Restart intercom connectors
  • Run migration 20241219_backfill_intercom_data_source_folders.ts

@overmode overmode linked an issue Dec 17, 2024 that may be closed by this pull request
@overmode overmode changed the title Adding folder nodes mapping the Intercom hierrarchy Adding folder nodes mapping the Intercom hierarchy Dec 18, 2024
@overmode overmode force-pushed the 9158-kw-search-update-backfill-folders-for-intercom branch from 99917fb to be8e198 Compare December 18, 2024 20:48
@overmode overmode requested a review from PopDaph December 18, 2024 21:22
@overmode overmode marked this pull request as ready for review December 18, 2024 21:22
Copy link
Contributor

@aubin-tchoi aubin-tchoi left a comment

Choose a reason for hiding this comment

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

First batch of comments

Copy link
Contributor

@philipperolet philipperolet left a comment

Choose a reason for hiding this comment

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

On the right path 👍 Left some coms
Make sure to test
Also checking: did you carefully track all model calls (to not miss any crud point)?

@overmode overmode force-pushed the 9158-kw-search-update-backfill-folders-for-intercom branch from 19315b4 to 77eb440 Compare December 20, 2024 09:30
Comment on lines +58 to +62
// Add folder node for teams
await upsertIntercomTeamsFolderActivity({
connectorId,
});

Copy link
Contributor

Choose a reason for hiding this comment

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

we're in for a ride again @philipperolet :)

Copy link
Contributor

Choose a reason for hiding this comment

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

intercom is webhook-based for the conversations

Copy link
Contributor

Choose a reason for hiding this comment

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

oh wait actually we're good, I thiiink webhooks rely on non-temporal code

Copy link
Contributor

Choose a reason for hiding this comment

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

I would guess we can stop all the workflows, deploy and resume them, which will trigger full resyncs for all the Help Centers but should be ok

Copy link
Contributor Author

@overmode overmode Dec 20, 2024

Choose a reason for hiding this comment

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

As far as I can tell the only workflow triggered by webhooks is stopIntercomSyncWorkflow -> Seems fine if we miss some

Copy link
Contributor

Choose a reason for hiding this comment

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

this workflow is triggered by a webhook on /uninstall, it's clearly not fine at all if we miss some but this one is more easily reconstructible (we need the connectorId in the webhook and we're good to go)

connectors/src/connectors/intercom/temporal/activities.ts Outdated Show resolved Hide resolved
@@ -52,6 +55,11 @@ export async function intercomSyncWorkflow({
}) {
await saveIntercomConnectorStartSync({ connectorId });

// Add folder node for teams
await upsertIntercomTeamsFolderActivity({
Copy link
Contributor

Choose a reason for hiding this comment

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

exceptionally, just this once, we could discuss moving that into the syncTeamOnly activity
To be discussed with @overmode @philipperolet @aubin-tchoi vs the difficulty of stopping / restarting all intercom workflows for this change

Copy link
Contributor

Choose a reason for hiding this comment

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

cc #9469 (comment) I think we can get away with batch stop + batch resume

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aubin-tchoi says it shouldn't be a problem, I will check the code too, leaving it there until that

@aubin-tchoi aubin-tchoi merged commit 3037491 into main Dec 20, 2024
5 checks passed
@aubin-tchoi aubin-tchoi deleted the 9158-kw-search-update-backfill-folders-for-intercom branch December 20, 2024 13:35
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.

[KW-Search] Update & backfill folders for intercom
3 participants