-
Notifications
You must be signed in to change notification settings - Fork 728
Remove hubspot, automations, and integration-sync-worker #2755
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
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis pull request represents a comprehensive removal of HubSpot integration and automation-related functionality across multiple services and modules. The changes span configuration files, API endpoints, repositories, services, and type definitions. The primary focus appears to be eliminating all HubSpot-specific code, including integration streams, synchronization processes, field mappers, and related configurations. Changes
Possibly related PRs
Suggested Reviewers
Poem
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 5
🔭 Outside diff range comments (3)
scripts/cli (1)
Line range hint
765-769: Fix typo in variable name and update commented services.The commented-out services list contains a typo in the variable name and includes services that should be removed.
Apply this diff to fix the issues:
- # INGORED_SERVICES=("python-worker" "job-generator" "discord-ws" "webhook-api" "profiles-worker" "organizations-enrichment-worker" "merge-suggestions-worker" "members-enrichment-worker" "exports-worker" "entity-merging-worker") + # IGNORED_SERVICES=("python-worker" "job-generator" "webhook-api" "profiles-worker" "organizations-enrichment-worker" "merge-suggestions-worker" "members-enrichment-worker" "exports-worker" "entity-merging-worker")backend/src/services/integrationService.ts (1)
Line range hint
938-974: Potential unintended overwriting of theintegrationvariableIn the
gerritConnectOrUpdatemethod (lines 938-974), theintegrationvariable is assigned twice. First, when creating or updating the Gerrit integration, and then potentially again whenenableGitistrue, creating or updating the Git integration. This could lead to the original Gerrit integration being overwritten by the Git integration, and the method may return the incorrect integration.To fix this, assign the results to separate variables and ensure you return the intended integration:
async gerritConnectOrUpdate(integrationData) { const transaction = await SequelizeRepository.createTransaction(this.options) - let integration: any + let gerritIntegration: any try { const res = await IntegrationService.getGerritServerRepos(integrationData.remote.orgURL) if (integrationData.remote.enableAllRepos) { integrationData.remote.repoNames = res.repoNames } - integration = await this.createOrUpdate( + gerritIntegration = await this.createOrUpdate( { platform: PlatformType.GERRIT, settings: { remote: integrationData.remote, }, status: 'done', }, transaction, ) if (integrationData.remote.enableGit) { const stripGit = (url: string) => { if (url.endsWith('.git')) { return url.slice(0, -4) } return url } - integration = await this.createOrUpdate( + const gitIntegration = await this.createOrUpdate( { platform: PlatformType.GIT, settings: { remotes: integrationData.remote.repoNames.map((repo) => stripGit(`${integrationData.remote.orgURL}${res.urlPartial}/${repo}`), ), }, status: 'done', }, transaction, ) } await SequelizeRepository.commitTransaction(transaction) - return integration + return gerritIntegration } catch (err) { await SequelizeRepository.rollbackTransaction(transaction) throw err } }services/apps/data_sink_worker/src/service/member.service.ts (1)
Temporal Client Dependencies Need to be Removed
The temporal client is still being used in the MemberService class even though the temporal workflow has been removed. This needs to be addressed to prevent potential runtime issues:
- Remove the temporal client from the constructor parameters
- Remove temporal client usage in
processMemberEnrichmethod where new MemberService instances are created (2 occurrences)🔗 Analysis chain
Line range hint
59-59: Ensure All References tothis.temporalAre Removed or Updated.Since the temporal workflow has been removed, verify that any usage of
this.temporalwithin the class is also removed or properly refactored to prevent runtime errors.Run the following script to search for references to
this.temporal:🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Find usages of `this.temporal` in `member.service.ts`. rg 'this\.temporal' services/apps/data_sink_worker/src/service/member.service.tsLength of output: 132
Script:
#!/bin/bash # Get more context around the temporal usages rg -B 3 -A 3 'this\.temporal' services/apps/data_sink_worker/src/service/member.service.ts # Look at the class structure ast-grep --pattern 'class MemberService { $$$ }'Length of output: 29523
Script:
#!/bin/bash # Find the actual MemberService class implementation ast-grep --pattern 'class MemberService { constructor($$$) { $$$ } $$$ }' services/apps/data_sink_worker/src/service/member.service.tsLength of output: 146
Script:
#!/bin/bash # Look at the entire file content cat services/apps/data_sink_worker/src/service/member.service.ts # Backup: search for any class definition rg "class.*{" services/apps/data_sink_worker/src/service/member.service.tsLength of output: 21458
🧹 Nitpick comments (5)
backend/src/api/auth/authMe.ts (1)
11-11: Add error handling if async operation is neededIf the Promise.all operation needs to stay for future async operations, proper error handling should be added to prevent unhandled promise rejections.
- payload.tenants = await Promise.all(payload.tenants.map(async (tenantUser) => tenantUser)) + try { + payload.tenants = await Promise.all(payload.tenants.map(async (tenantUser) => tenantUser)) + } catch (error) { + await req.responseHandler.error(req, res, error) + return + }services/apps/integration_run_worker/src/service/integrationRunService.ts (3)
Line range hint
35-124: Consider breaking down complex stream processing logic.The
handleStreamProcessedmethod has high cyclomatic complexity with nested conditionals and multiple responsibilities. Consider extracting the following into separate methods:
- Stream state counting logic
- Error handling for failed streams
- Post-processing logic for successful runs
Example refactor:
- public async handleStreamProcessed(runId: string): Promise<void> { + private async countStreamStates(runId: string): Promise<{count: number, finishedCount: number, error: boolean}> { + const counts = await this.repo.getStreamCountsByState(runId) + let count = 0 + let finishedCount = 0 + let error = false + for (const [state, stateCount] of counts.entries()) { + // ... existing counting logic + } + return { count, finishedCount, error } + } + private async handleFailedStreams(runId: string, runInfo: any): Promise<void> { + // ... existing error handling logic + } + private async handleSuccessfulRun(runId: string, runInfo: any): Promise<void> { + // ... existing success handling logic + } + public async handleStreamProcessed(runId: string): Promise<void> { + const { count, finishedCount, error } = await this.countStreamStates(runId) + if (count === finishedCount) { + const runInfo = await this.repo.getGenerateStreamData(runId) + if (error) { + await this.handleFailedStreams(runId, runInfo) + } else { + await this.handleSuccessfulRun(runId, runInfo) + } + } + }
Line range hint
206-334: Consider separating concerns in stream generation.The
generateStreamsmethod handles multiple responsibilities including:
- Run validation
- Member attribute settings management
- Cache management
- Stream generation context setup
Consider extracting these into separate methods or even a dedicated StreamGenerationService class to improve maintainability and testability.
Line range hint
336-428: Consider implementing typed error handling.The error handling pattern is consistent but could benefit from typed errors to improve error handling predictability and maintainability.
Example implementation:
class IntegrationRunError extends Error { constructor( public readonly location: string, message: string, public readonly metadata?: unknown, public readonly cause?: Error ) { super(message) } } private async triggerRunError( runId: string, location: string, message: string, metadata?: unknown, error?: Error, ): Promise<void> { const runError = new IntegrationRunError(location, message, metadata, error) await this.repo.markRunError(runId, { location: runError.location, message: runError.message, metadata: runError.metadata, errorMessage: runError.cause?.message, errorStack: runError.cause?.stack, errorString: runError.cause ? JSON.stringify(runError.cause) : undefined, }) }services/apps/data_sink_worker/config/default.json (1)
5-5: Document the purpose of the unleash configuration.The empty unleash configuration object has been added but lacks documentation about its purpose and expected configuration properties.
Consider adding a comment above the unleash configuration to explain its purpose:
+ // Configuration for Unleash feature flag system "unleash": {},
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (145)
backend/.env.dist.local(1 hunks)backend/config/custom-environment-variables.json(0 hunks)backend/config/default.json(1 hunks)backend/id-openapi.yaml(2 hunks)backend/src/api/auth/authMe.ts(1 hunks)backend/src/api/automation/automationCreate.ts(0 hunks)backend/src/api/automation/automationDestroy.ts(0 hunks)backend/src/api/automation/automationExecutionFind.ts(0 hunks)backend/src/api/automation/automationFind.ts(0 hunks)backend/src/api/automation/automationList.ts(0 hunks)backend/src/api/automation/automationSlackCallback.ts(0 hunks)backend/src/api/automation/automationSlackConnect.ts(0 hunks)backend/src/api/automation/automationUpdate.ts(0 hunks)backend/src/api/automation/index.ts(0 hunks)backend/src/api/index.ts(0 hunks)backend/src/api/integration/helpers/discordAuthenticate.ts(0 hunks)backend/src/api/integration/helpers/hubspotConnect.ts(0 hunks)backend/src/api/integration/helpers/hubspotGetLists.ts(0 hunks)backend/src/api/integration/helpers/hubspotGetMappableFields.ts(0 hunks)backend/src/api/integration/helpers/hubspotOnboard.ts(0 hunks)backend/src/api/integration/helpers/hubspotStopSyncMember.ts(0 hunks)backend/src/api/integration/helpers/hubspotStopSyncOrganization.ts(0 hunks)backend/src/api/integration/helpers/hubspotSyncMember.ts(0 hunks)backend/src/api/integration/helpers/hubspotSyncOrganization.ts(0 hunks)backend/src/api/integration/helpers/hubspotUpdateProperties.ts(0 hunks)backend/src/api/integration/index.ts(0 hunks)backend/src/api/tenant/tenantFind.ts(0 hunks)backend/src/bin/discord-ws.ts(0 hunks)backend/src/conf/configTypes.ts(0 hunks)backend/src/conf/index.ts(2 hunks)backend/src/database/models/automation.ts(0 hunks)backend/src/database/models/automationExecution.ts(0 hunks)backend/src/database/models/index.ts(0 hunks)backend/src/database/repositories/automationExecutionRepository.ts(0 hunks)backend/src/database/repositories/automationRepository.ts(0 hunks)backend/src/database/repositories/integrationRepository.ts(0 hunks)backend/src/database/repositories/memberRepository.ts(0 hunks)backend/src/database/repositories/memberSyncRemoteRepository.ts(0 hunks)backend/src/database/repositories/organizationSyncRemoteRepository.ts(0 hunks)backend/src/database/repositories/types/automationTypes.ts(0 hunks)backend/src/security/permissions.ts(0 hunks)backend/src/serverless/utils/queueService.ts(0 hunks)backend/src/services/activityService.ts(1 hunks)backend/src/services/auth/passportStrategies/slackStrategy.ts(1 hunks)backend/src/services/automationExecutionService.ts(0 hunks)backend/src/services/automationService.ts(0 hunks)backend/src/services/integrationService.ts(1 hunks)backend/src/services/memberService.ts(0 hunks)backend/src/types/automationTypes.ts(0 hunks)backend/src/types/webhooks.ts(0 hunks)scripts/builders/automations-worker.env(0 hunks)scripts/builders/backend.env(1 hunks)scripts/builders/integration-sync-worker.env(0 hunks)scripts/cli(3 hunks)scripts/services/automations-worker.yaml(0 hunks)scripts/services/docker/Dockerfile.automations_worker(0 hunks)scripts/services/docker/Dockerfile.automations_worker.dockerignore(0 hunks)scripts/services/docker/Dockerfile.integration_sync_worker(0 hunks)scripts/services/docker/Dockerfile.integration_sync_worker.dockerignore(0 hunks)scripts/services/integration-sync-worker.yaml(0 hunks)services/apps/automations_worker/package.json(0 hunks)services/apps/automations_worker/src/activities.ts(0 hunks)services/apps/automations_worker/src/activities/newActivityAutomations.ts(0 hunks)services/apps/automations_worker/src/activities/newMemberAutomations.ts(0 hunks)services/apps/automations_worker/src/main.ts(0 hunks)services/apps/automations_worker/src/services/automation.service.ts(0 hunks)services/apps/automations_worker/src/services/slack/newActivityBlocks.ts(0 hunks)services/apps/automations_worker/src/services/slack/newMemberBlocks.ts(0 hunks)services/apps/automations_worker/src/workflows.ts(0 hunks)services/apps/automations_worker/src/workflows/newActivityAutomations.ts(0 hunks)services/apps/automations_worker/src/workflows/newMemberAutomations.ts(0 hunks)services/apps/automations_worker/tsconfig.json(0 hunks)services/apps/data_sink_worker/config/default.json(1 hunks)services/apps/data_sink_worker/src/conf/index.ts(1 hunks)services/apps/data_sink_worker/src/service/activity.service.ts(1 hunks)services/apps/data_sink_worker/src/service/member.service.ts(1 hunks)services/apps/integration_run_worker/src/main.ts(0 hunks)services/apps/integration_run_worker/src/queue/index.ts(0 hunks)services/apps/integration_run_worker/src/service/integrationRunService.ts(1 hunks)services/apps/integration_sync_worker/config/custom-environment-variables.json(0 hunks)services/apps/integration_sync_worker/config/default.json(0 hunks)services/apps/integration_sync_worker/config/docker.json(0 hunks)services/apps/integration_sync_worker/config/production.json(0 hunks)services/apps/integration_sync_worker/config/staging.json(0 hunks)services/apps/integration_sync_worker/package.json(0 hunks)services/apps/integration_sync_worker/src/conf/index.ts(0 hunks)services/apps/integration_sync_worker/src/errors.ts(0 hunks)services/apps/integration_sync_worker/src/main.ts(0 hunks)services/apps/integration_sync_worker/src/queue/index.ts(0 hunks)services/apps/integration_sync_worker/src/service/member.sync.service.ts(0 hunks)services/apps/integration_sync_worker/src/service/opensearch.data.ts(0 hunks)services/apps/integration_sync_worker/src/service/opensearch.service.ts(0 hunks)services/apps/integration_sync_worker/src/service/organization.sync.service.ts(0 hunks)services/apps/integration_sync_worker/tsconfig.json(0 hunks)services/libs/common/src/env.ts(0 hunks)services/libs/common/src/i18n/en.ts(0 hunks)services/libs/common_services/src/services/emitters/index.ts(0 hunks)services/libs/common_services/src/services/emitters/integrationSyncWorker.emitter.ts(0 hunks)services/libs/data-access-layer/src/old/apps/automations_worker/automation.repo.ts(0 hunks)services/libs/data-access-layer/src/old/apps/integration_run_worker/automation.repo.ts(0 hunks)services/libs/data-access-layer/src/old/apps/integration_sync_worker/automation.repo.ts(0 hunks)services/libs/data-access-layer/src/old/apps/integration_sync_worker/automationExecution.repo.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/addContactsToList.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/batchCreateMembers.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/batchCreateOrganizations.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/batchUpdateMembers.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/batchUpdateOrganizations.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/common.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/companies.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/companyById.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/contactAssociations.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/contactById.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/contacts.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/lists.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/properties.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/tokenInfo.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/types.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/api/utils/getOrganizationDomain.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/field-mapper/hubspotFieldMapper.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/field-mapper/mapperFactory.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/field-mapper/memberFieldMapper.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/field-mapper/organizationFieldMapper.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/field-mapper/utils/serialization.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/generateStreams.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/index.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/memberAttributes.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/processData.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/processStream.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/processSyncRemote.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/startSyncRemote.ts(0 hunks)services/libs/integrations/src/integrations/hubspot/types.ts(0 hunks)services/libs/integrations/src/integrations/index.ts(0 hunks)services/libs/integrations/src/types.ts(0 hunks)services/libs/queue/src/config.ts(0 hunks)services/libs/queue/src/types.ts(0 hunks)services/libs/queue/src/vendors/kafka/config.ts(0 hunks)services/libs/queue/src/vendors/sqs/config.ts(0 hunks)services/libs/types/src/automations.ts(0 hunks)services/libs/types/src/enums/organizations.ts(0 hunks)services/libs/types/src/enums/platforms.ts(0 hunks)services/libs/types/src/enums/temporal.ts(0 hunks)services/libs/types/src/index.ts(0 hunks)services/libs/types/src/queue/integration_sync_worker/index.ts(0 hunks)services/libs/types/src/temporal/automations.ts(0 hunks)services/libs/types/src/temporal/index.ts(0 hunks)
💤 Files with no reviewable changes (130)
- services/apps/integration_sync_worker/config/docker.json
- backend/src/api/index.ts
- services/apps/integration_sync_worker/config/staging.json
- services/libs/common_services/src/services/emitters/index.ts
- services/apps/integration_sync_worker/config/production.json
- services/libs/types/src/enums/organizations.ts
- services/apps/automations_worker/tsconfig.json
- backend/src/api/integration/helpers/hubspotOnboard.ts
- services/apps/integration_sync_worker/tsconfig.json
- services/libs/types/src/temporal/index.ts
- services/apps/integration_sync_worker/src/service/opensearch.data.ts
- services/apps/integration_sync_worker/src/errors.ts
- backend/src/api/integration/helpers/hubspotGetLists.ts
- services/apps/integration_sync_worker/package.json
- scripts/services/docker/Dockerfile.automations_worker.dockerignore
- backend/src/api/integration/helpers/hubspotSyncOrganization.ts
- backend/src/api/automation/automationSlackCallback.ts
- services/apps/integration_run_worker/src/queue/index.ts
- services/libs/queue/src/config.ts
- backend/src/database/models/index.ts
- backend/src/bin/discord-ws.ts
- services/libs/queue/src/types.ts
- services/libs/integrations/src/integrations/hubspot/memberAttributes.ts
- backend/src/database/repositories/organizationSyncRemoteRepository.ts
- backend/src/api/integration/helpers/hubspotStopSyncMember.ts
- scripts/builders/integration-sync-worker.env
- services/libs/queue/src/vendors/kafka/config.ts
- backend/src/types/webhooks.ts
- services/libs/common/src/env.ts
- backend/src/api/integration/helpers/hubspotSyncMember.ts
- backend/src/api/integration/helpers/hubspotUpdateProperties.ts
- backend/src/api/integration/helpers/hubspotGetMappableFields.ts
- backend/config/custom-environment-variables.json
- scripts/builders/automations-worker.env
- backend/src/api/integration/helpers/hubspotConnect.ts
- services/apps/integration_sync_worker/config/default.json
- services/libs/integrations/src/integrations/hubspot/startSyncRemote.ts
- backend/src/api/automation/automationFind.ts
- services/apps/integration_sync_worker/src/service/opensearch.service.ts
- backend/src/api/automation/automationSlackConnect.ts
- services/apps/automations_worker/src/activities.ts
- services/apps/integration_sync_worker/config/custom-environment-variables.json
- scripts/services/docker/Dockerfile.integration_sync_worker.dockerignore
- services/libs/types/src/index.ts
- backend/src/api/automation/automationCreate.ts
- backend/src/api/integration/helpers/discordAuthenticate.ts
- backend/src/database/repositories/integrationRepository.ts
- backend/src/conf/configTypes.ts
- backend/src/api/tenant/tenantFind.ts
- backend/src/services/automationExecutionService.ts
- services/libs/integrations/src/integrations/hubspot/api/utils/getOrganizationDomain.ts
- services/libs/integrations/src/integrations/hubspot/api/tokenInfo.ts
- services/libs/integrations/src/integrations/hubspot/api/common.ts
- scripts/services/integration-sync-worker.yaml
- services/apps/automations_worker/package.json
- services/apps/automations_worker/src/workflows.ts
- services/libs/integrations/src/integrations/hubspot/field-mapper/organizationFieldMapper.ts
- backend/src/serverless/utils/queueService.ts
- services/libs/queue/src/vendors/sqs/config.ts
- backend/src/security/permissions.ts
- services/apps/integration_run_worker/src/main.ts
- backend/src/api/automation/automationList.ts
- services/libs/data-access-layer/src/old/apps/integration_sync_worker/automation.repo.ts
- services/apps/automations_worker/src/main.ts
- backend/src/database/models/automationExecution.ts
- backend/src/api/automation/index.ts
- scripts/services/automations-worker.yaml
- services/apps/integration_sync_worker/src/main.ts
- services/libs/common_services/src/services/emitters/integrationSyncWorker.emitter.ts
- services/libs/data-access-layer/src/old/apps/integration_sync_worker/automationExecution.repo.ts
- services/libs/integrations/src/integrations/hubspot/processSyncRemote.ts
- services/libs/types/src/enums/temporal.ts
- services/libs/integrations/src/integrations/hubspot/api/contactAssociations.ts
- services/libs/integrations/src/integrations/hubspot/api/addContactsToList.ts
- services/libs/common/src/i18n/en.ts
- scripts/services/docker/Dockerfile.integration_sync_worker
- services/apps/integration_sync_worker/src/service/organization.sync.service.ts
- services/libs/integrations/src/integrations/hubspot/field-mapper/mapperFactory.ts
- services/libs/integrations/src/integrations/hubspot/api/contactById.ts
- services/libs/data-access-layer/src/old/apps/integration_run_worker/automation.repo.ts
- services/libs/integrations/src/integrations/hubspot/processStream.ts
- services/libs/integrations/src/integrations/hubspot/field-mapper/hubspotFieldMapper.ts
- services/apps/integration_sync_worker/src/conf/index.ts
- services/libs/integrations/src/integrations/index.ts
- services/libs/integrations/src/integrations/hubspot/api/batchCreateMembers.ts
- services/libs/integrations/src/integrations/hubspot/field-mapper/memberFieldMapper.ts
- backend/src/api/automation/automationExecutionFind.ts
- services/libs/integrations/src/integrations/hubspot/processData.ts
- backend/src/database/repositories/types/automationTypes.ts
- services/apps/automations_worker/src/workflows/newActivityAutomations.ts
- backend/src/database/repositories/memberRepository.ts
- backend/src/api/integration/helpers/hubspotStopSyncOrganization.ts
- services/libs/integrations/src/integrations/hubspot/api/companyById.ts
- backend/src/database/repositories/memberSyncRemoteRepository.ts
- backend/src/database/repositories/automationExecutionRepository.ts
- services/libs/types/src/enums/platforms.ts
- services/libs/integrations/src/integrations/hubspot/field-mapper/utils/serialization.ts
- services/apps/automations_worker/src/workflows/newMemberAutomations.ts
- services/apps/automations_worker/src/activities/newActivityAutomations.ts
- backend/src/services/automationService.ts
- services/libs/integrations/src/integrations/hubspot/api/properties.ts
- backend/src/database/models/automation.ts
- services/libs/integrations/src/integrations/hubspot/generateStreams.ts
- services/apps/automations_worker/src/services/slack/newActivityBlocks.ts
- backend/src/api/automation/automationUpdate.ts
- services/libs/data-access-layer/src/old/apps/automations_worker/automation.repo.ts
- backend/src/api/automation/automationDestroy.ts
- services/libs/integrations/src/integrations/hubspot/api/lists.ts
- services/libs/integrations/src/integrations/hubspot/api/batchUpdateMembers.ts
- backend/src/services/memberService.ts
- services/libs/types/src/temporal/automations.ts
- backend/src/api/integration/index.ts
- services/libs/integrations/src/types.ts
- services/libs/integrations/src/integrations/hubspot/api/contacts.ts
- services/libs/integrations/src/integrations/hubspot/index.ts
- services/apps/integration_sync_worker/src/service/member.sync.service.ts
- services/libs/integrations/src/integrations/hubspot/api/batchCreateOrganizations.ts
- services/libs/integrations/src/integrations/hubspot/api/companies.ts
- services/libs/integrations/src/integrations/hubspot/api/batchUpdateOrganizations.ts
- services/libs/types/src/queue/integration_sync_worker/index.ts
- services/apps/integration_sync_worker/src/queue/index.ts
- backend/src/database/repositories/automationRepository.ts
- services/libs/integrations/src/integrations/hubspot/api/types.ts
- scripts/services/docker/Dockerfile.automations_worker
- services/apps/automations_worker/src/services/slack/newMemberBlocks.ts
- services/apps/automations_worker/src/services/automation.service.ts
- services/libs/types/src/automations.ts
- services/apps/automations_worker/src/activities/newMemberAutomations.ts
- backend/src/types/automationTypes.ts
- services/libs/integrations/src/integrations/hubspot/types.ts
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: lint-format-services
🔇 Additional comments (18)
backend/src/services/auth/passportStrategies/slackStrategy.ts (1)
Line range hint
8-45: Verify impact of removing getSlackNotifierStrategyThe removal of
getSlackNotifierStrategyfunction might affect other parts of the codebase that were using the Slack notifier functionality. Let's verify there are no remaining references to this function.services/apps/integration_run_worker/src/service/integrationRunService.ts (3)
Line range hint
1-14: LGTM! Clean-up of imports aligns with PR objectives.The removal of automation and HubSpot-related imports streamlines the service to focus on core integration run functionality.
Line range hint
18-33: LGTM! Clean dependency injection pattern maintained.The constructor maintains a clean dependency injection pattern while removing unnecessary automation-related dependencies.
Line range hint
1-428: Overall changes align well with PR objectives.The removal of HubSpot and automation-related code has been executed cleanly while maintaining the core integration functionality and code quality. The service remains focused and well-structured.
scripts/cli (2)
744-746: LGTM! Removed integration-related services.The changes align with the PR objectives by removing integration-related services from the ignored list.
Line range hint
744-861: Verify the impact of service removals across the codebase.Let's verify that the removed services are not referenced elsewhere in the codebase.
scripts/builders/backend.env (1)
4-4: Ensure all references todiscord-wsare removedThe
SERVICESvariable has been updated to removediscord-ws. Please verify that any dependencies, scripts, or configurations that previously referenceddiscord-wshave been updated or removed to prevent potential errors.backend/.env.dist.local (1)
112-112: Confirm removal ofhubspotfrom integrationsThe
CROWD_NANGO_INTEGRATIONSvariable no longer includeshubspot. Ensure that all configurations, code dependencies, and documentation related to the HubSpot integration have been properly updated or removed to reflect this change.backend/id-openapi.yaml (2)
191-191: LGTM! Consistent with POST endpoint changes.The removal of 'hubspot' from the source enum maintains consistency with the changes in the POST endpoint.
106-106: Verify impact of removing 'hubspot' source.The removal of 'hubspot' from the source enum aligns with the PR objective. However, this is a breaking change that could affect existing API clients.
Let's verify if there are any existing API clients using the 'hubspot' source:
✅ Verification successful
Removal of 'hubspot' source is safe and aligned with integration removal.
The removal of 'hubspot' from the source enum is part of the broader cleanup of HubSpot integration. The codebase search confirms that all HubSpot-related functionality is being removed, making this a safe and necessary change.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to hubspot source in the codebase rg -i "source.*['\"]hubspot['\"]" --type ts --type jsLength of output: 59
Script:
#!/bin/bash # Search for any remaining hubspot-related code rg -i "hubspot" --type ts --type js --type yaml # Search for API client implementations and tests related to organization endpoints rg -i "member/.*/organization" --type ts --type js # Search for test files containing organization-related tests fd -e test.ts -e test.js -e spec.ts -e spec.js | xargs rg -i "organization.*source"Length of output: 27415
services/apps/data_sink_worker/src/service/member.service.ts (1)
Line range hint
92-95: Verify Member Creation Logic Without Temporal Workflows.With the removal of temporal workflows, ensure that the member creation process still functions as expected, and any dependent asynchronous processes are handled appropriately.
Please confirm that removing the temporal workflows does not affect member onboarding or other related processes.
services/apps/data_sink_worker/src/conf/index.ts (1)
59-63: 🛠️ Refactor suggestionUpdate Configuration Type Consistently Across the Codebase.
The type for
temporalConfigand the return type ofTEMPORAL_CONFIGhave been changed fromIDataSinkWorkerTemporalConfigtoITemporalConfig. Ensure that all usages and references toIDataSinkWorkerTemporalConfigare updated accordingly to prevent type errors.Run the following script to identify any remaining references to
IDataSinkWorkerTemporalConfig:✅ Verification successful
Type Change Verification Complete - All References Updated
The codebase consistently uses
ITemporalConfigfrom@crowd/temporal, and there are no remaining references toIDataSinkWorkerTemporalConfig. The type change has been properly implemented across all files.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Find references to `IDataSinkWorkerTemporalConfig` in the codebase. rg 'IDataSinkWorkerTemporalConfig'Length of output: 34
Script:
#!/bin/bash # Search for ITemporalConfig type definition and usage echo "=== Searching for ITemporalConfig ===" rg "ITemporalConfig" -A 2 echo -e "\n=== Checking imports in the configuration file ===" cat services/apps/data_sink_worker/src/conf/index.ts | grep -A 5 "import.*{.*}" echo -e "\n=== Searching for similar temporal config types ===" rg "I.*TemporalConfig"Length of output: 3357
backend/src/conf/index.ts (2)
147-147: Confirm Compatibility with UpdatedTEMPORAL_CONFIGType.The
TEMPORAL_CONFIGconstant now uses theITemporalConfigtype. Verify that all properties and methods previously accessed onTEMPORAL_CONFIGare compatible withITemporalConfigto prevent any runtime issues.Please review any usage of
TEMPORAL_CONFIGin the codebase to ensure compatibility with the new type.
7-7: 🛠️ Refactor suggestionImport
ITemporalConfigand RemoveIBackendTemporalConfig.The import statement now includes
ITemporalConfigfrom@crowd/temporal. Ensure thatIBackendTemporalConfigis no longer used and that all references are replaced withITemporalConfig.Run the following script to find any remaining uses of
IBackendTemporalConfig:✅ Verification successful
Successful Migration to
ITemporalConfigThe codebase shows no remaining uses of
IBackendTemporalConfigand demonstrates proper implementation ofITemporalConfigfrom@crowd/temporal.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Search for `IBackendTemporalConfig` usages in the codebase. rg 'IBackendTemporalConfig'Length of output: 27
Script:
#!/bin/bash # Search for ITemporalConfig usages and related patterns echo "=== Searching for ITemporalConfig ===" rg "ITemporalConfig" -A 2 echo -e "\n=== Checking for temporal config type definitions ===" ast-grep --pattern 'interface $_ extends ITemporalConfig' ast-grep --pattern 'type $_ = ITemporalConfig'Length of output: 65888
services/apps/data_sink_worker/config/default.json (1)
6-6: LGTM! Removal of automations queue configuration.The removal of the automationsTaskQueue from temporal configuration aligns with the PR objective of removing automation functionality.
backend/config/default.json (1)
49-49: LGTM! Consistent removal of automations configuration.The removal of automationsTaskQueue from temporal configuration is consistent with the changes in the data sink worker and aligns with the PR objective.
backend/src/services/activityService.ts (1)
22-22: LGTM! Clean removal of automation-related imports.The removal of WorkflowIdReusePolicy and TemporalWorkflowId imports is clean and aligns with the PR objective of removing automation functionality.
services/apps/data_sink_worker/src/service/activity.service.ts (1)
38-38: LGTM! Consistent removal of automation-related code.The removal of temporal workflow code and edition-specific logic is consistent with the changes in the backend service and aligns with the PR objective.
Changes proposed ✍️
What
copilot:summary
copilot:poem
Why
How
copilot:walkthrough
Summary by CodeRabbit
Based on the comprehensive summary, here are the release notes:
Removed Features
Configuration Changes
API and Service Modifications
These changes significantly reduce the complexity of the platform by removing specific integrations and automation capabilities.