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

[Production checks] Gdrive GC #2505

Merged
merged 10 commits into from
Nov 13, 2023
Merged

[Production checks] Gdrive GC #2505

merged 10 commits into from
Nov 13, 2023

Conversation

lasryaric
Copy link
Contributor

@lasryaric lasryaric commented Nov 13, 2023

Adding production checks for Gdrive.

Deployment steps:

Add the following 3 env vars to front:

CORE_DATABASE_URI_RO
FRONT_DATABASE_URI_RO
CONNECTORS_DATABASE_URI_RO 
  • Deploy front
  • Start the cron based workflow:
./front/production_check> npx tsx ./admin/cli.ts start

Check if the workflow is properly running on Temporal Cloud.

Setup Datadog Alerts

  • One alerts that triggers if the log Production check failed is emitted
  • One alerts that trigger if the log Done running all checks is not trigger within a 90 minutes time frame.

@lasryaric lasryaric requested a review from spolu November 13, 2023 13:47
@spolu
Copy link
Contributor

spolu commented Nov 13, 2023

We also need CORE_DATABASE_URI and CONNECTORS_DATABASE_URI to be added to front so that we have access to all SQL moving forward

@lasryaric
Copy link
Contributor Author

We also need CORE_DATABASE_URI and CONNECTORS_DATABASE_URI to be added to front so that we have access to all SQL moving forward

You mean on top of the RO version?

CORE_DATABASE_URI_RO
FRONT_DATABASE_URI_RO
CONNECTORS_DATABASE_URI_RO 

Copy link
Contributor

@spolu spolu left a comment

Choose a reason for hiding this comment

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

The code is hard to read TBH

Let's make things simple. Separate in two checks one for Slack one for Gdrive

For GDrive let's stick with the migration flow that is easy to understand.

Take all connector file ids and create a hash (that's fine that holds in memory)

Then take all core document_id and check them.

No chunking, it's easier to understand and can be read more easily

The fact that you try to do both at the same time makes it hard to understand and read. We need DEAD simple here otherwise we'll not maintain it.

front/production_checks/checks/managed_data_sources_gc.ts Outdated Show resolved Hide resolved
front/production_checks/checks/managed_data_sources_gc.ts Outdated Show resolved Hide resolved
front/production_checks/checks/managed_data_sources_gc.ts Outdated Show resolved Hide resolved
front/production_checks/checks/managed_data_sources_gc.ts Outdated Show resolved Hide resolved
@lasryaric lasryaric requested a review from spolu November 13, 2023 15:36
@lasryaric lasryaric merged commit 1389379 into main Nov 13, 2023
1 check passed
@lasryaric lasryaric deleted the aric-production_checks_gdrive branch November 13, 2023 15:36
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