-
Notifications
You must be signed in to change notification settings - Fork 740
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
Clean up: notes, plans, openapi, feature-flags, and sample data #2740
base: main
Are you sure you want to change the base?
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 involves a comprehensive removal of Stripe and Unleash-related configurations, feature flags, and associated functionality across multiple services and components in the backend. The changes span environment variables, configuration files, database models, services, repositories, and package dependencies. The primary focus appears to be simplifying the application's architecture by eliminating feature flagging, sample data generation, and subscription-related features. Changes
Possibly related PRs
Suggested labels
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: 1
🧹 Nitpick comments (8)
backend/src/database/utils/sequelizeTestUtils.ts (2)
105-106
: Avoid usingthis
in a static context.Static analysis flags the usage of
this
from within a static method, which can be confusing. Consider referencing the class name (SequelizeTestUtils
) instead.You could update the snippet as follows:
-? this.getTenant(tenantName, tenantUrl) -: this.getRandomTestTenant() +? SequelizeTestUtils.getTenant(tenantName, tenantUrl) +: SequelizeTestUtils.getRandomTestTenant()🧰 Tools
🪛 Biome (1.9.4)
[error] 105-105: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.(lint/complexity/noThisInStatic)
[error] 106-106: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.(lint/complexity/noThisInStatic)
235-236
: Likewise avoid usingthis
in static context here.
getRandomTestTenant
is also usingthis.getTenant(...)
. Referencing the class name more explicitly can improve clarity.🧰 Tools
🪛 Biome (1.9.4)
[error] 236-236: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.(lint/complexity/noThisInStatic)
[error] 236-236: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.(lint/complexity/noThisInStatic)
[error] 236-236: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.(lint/complexity/noThisInStatic)
scripts/cli (6)
754-754
: Typo in variable name"INGORED_SERVICES"
It should be"IGNORED_SERVICES"
to avoid confusion and maintain consistency.- declare -a INGORED_SERVICES=("job-generator" "data-sink-worker" "integration-run-worker" "integration-stream-worker") + declare -a IGNORED_SERVICES=("job-generator" "data-sink-worker" "integration-run-worker" "integration-stream-worker")
759-759
: Typo in variable name"INGORED_SERVICES"
Please rename it to"IGNORED_SERVICES"
to ensure readability.- declare -a INGORED_SERVICES=("frontend") + declare -a IGNORED_SERVICES=("frontend")
764-764
: Consistently rename the array
Maintain a single naming convention across code for this ignored-services array.- INGORED_SERVICES=("python-worker" ... + IGNORED_SERVICES=("python-worker" ...
775-775
: Remove commented-out code or clarify its necessity
The commented-outINGORED_SERVICES
line seems to be unused. Removing dead code reduces clutter.- # INGORED_SERVICES=("python-worker" "job-generator" ...
860-860
: Ensure consistency in the ignored-services variable naming
Here, it's spelled correctly asIGNORED_SERVICES
. Please ensure that the spelling is unified throughout the file.
867-867
: Sync variable name with other references
The array name here is"INGORED_SERVICES"
, while line 860 uses"IGNORED_SERVICES"
. For clean and unambiguous code, use a single correct name.- INGORED_SERVICES=("frontend" "python-worker" ... + IGNORED_SERVICES=("frontend" "python-worker" ...
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (157)
backend/.env.dist.local
(0 hunks)backend/.openapirc.js
(0 hunks)backend/base.yaml
(0 hunks)backend/config/custom-environment-variables.json
(0 hunks)backend/config/default.json
(0 hunks)backend/package.json
(0 hunks)backend/src/api/apiDocumentation.ts
(0 hunks)backend/src/api/components/activity/activityTypes/examples.yaml
(0 hunks)backend/src/api/components/activity/activityTypes/inputs.yaml
(0 hunks)backend/src/api/components/activity/activityTypes/models.yaml
(0 hunks)backend/src/api/components/activity/examples.yaml
(0 hunks)backend/src/api/components/activity/inputs.yaml
(0 hunks)backend/src/api/components/activity/models.yaml
(0 hunks)backend/src/api/components/activity/query.yaml
(0 hunks)backend/src/api/components/activity/responses.yaml
(0 hunks)backend/src/api/components/auth.yaml
(0 hunks)backend/src/api/components/automation/examples.yaml
(0 hunks)backend/src/api/components/automation/inputs.yaml
(0 hunks)backend/src/api/components/automation/models.yaml
(0 hunks)backend/src/api/components/conversation/examples.yaml
(0 hunks)backend/src/api/components/conversation/inputs.yaml
(0 hunks)backend/src/api/components/conversation/models.yaml
(0 hunks)backend/src/api/components/member/examples.yaml
(0 hunks)backend/src/api/components/member/inputs.yaml
(0 hunks)backend/src/api/components/member/memberAttributeSettings/examples.yaml
(0 hunks)backend/src/api/components/member/memberAttributeSettings/inputs.yaml
(0 hunks)backend/src/api/components/member/memberAttributeSettings/models.yaml
(0 hunks)backend/src/api/components/member/memberAttributeSettings/responses.yaml
(0 hunks)backend/src/api/components/member/models.yaml
(0 hunks)backend/src/api/components/member/query.yaml
(0 hunks)backend/src/api/components/member/responses.yaml
(0 hunks)backend/src/api/components/note/examples.yaml
(0 hunks)backend/src/api/components/note/inputs.yaml
(0 hunks)backend/src/api/components/note/models.yaml
(0 hunks)backend/src/api/components/note/query.yaml
(0 hunks)backend/src/api/components/note/responses.yaml
(0 hunks)backend/src/api/components/organization/examples.yaml
(0 hunks)backend/src/api/components/organization/inputs.yaml
(0 hunks)backend/src/api/components/organization/models.yaml
(0 hunks)backend/src/api/components/organization/query.yaml
(0 hunks)backend/src/api/components/organization/responses.yaml
(0 hunks)backend/src/api/components/parameters.yaml
(0 hunks)backend/src/api/components/tag/examples.yaml
(0 hunks)backend/src/api/components/tag/models.yaml
(0 hunks)backend/src/api/components/task/examples.yaml
(0 hunks)backend/src/api/components/task/inputs.yaml
(0 hunks)backend/src/api/components/task/models.yaml
(0 hunks)backend/src/api/components/task/query.yaml
(0 hunks)backend/src/api/components/task/responses.yaml
(0 hunks)backend/src/api/index.ts
(1 hunks)backend/src/api/note/index.ts
(0 hunks)backend/src/api/note/noteAutocomplete.ts
(0 hunks)backend/src/api/note/noteCreate.ts
(0 hunks)backend/src/api/note/noteDestroy.ts
(0 hunks)backend/src/api/note/noteFind.ts
(0 hunks)backend/src/api/note/noteImport.ts
(0 hunks)backend/src/api/note/noteList.ts
(0 hunks)backend/src/api/note/noteQuery.ts
(0 hunks)backend/src/api/note/noteUpdate.ts
(0 hunks)backend/src/api/plan/index.ts
(0 hunks)backend/src/api/plan/stripe/checkout.ts
(0 hunks)backend/src/api/plan/stripe/portal.ts
(0 hunks)backend/src/api/plan/stripe/webhook.ts
(0 hunks)backend/src/api/tenant/index.ts
(0 hunks)backend/src/api/tenant/tenantDeleteSampleData.ts
(0 hunks)backend/src/api/tenant/tenantGenerateSampleData.ts
(0 hunks)backend/src/api/webhooks/discourse.ts
(0 hunks)backend/src/api/webhooks/github.ts
(0 hunks)backend/src/api/webhooks/index.ts
(0 hunks)backend/src/api/webhooks/sendgrid.ts
(0 hunks)backend/src/api/webhooks/stripe.ts
(0 hunks)backend/src/bin/discord-ws.ts
(0 hunks)backend/src/bin/scripts/unleash-init.ts
(0 hunks)backend/src/conf/configTypes.ts
(0 hunks)backend/src/conf/index.ts
(0 hunks)backend/src/database/initializers/suggested-tasks.json
(0 hunks)backend/src/database/models/member.ts
(1 hunks)backend/src/database/models/note.ts
(0 hunks)backend/src/database/models/tenant.ts
(0 hunks)backend/src/database/repositories/IRepositoryOptions.ts
(0 hunks)backend/src/database/repositories/__tests__/noteRepository.test.ts
(0 hunks)backend/src/database/repositories/__tests__/tenantRepository.test.ts
(0 hunks)backend/src/database/repositories/memberRepository.ts
(0 hunks)backend/src/database/repositories/noteRepository.ts
(0 hunks)backend/src/database/repositories/sequelizeRepository.ts
(1 hunks)backend/src/database/repositories/tenantRepository.ts
(0 hunks)backend/src/database/utils/sequelizeTestUtils.ts
(3 hunks)backend/src/feature-flags/getFeatureFlagTenantContext.ts
(0 hunks)backend/src/feature-flags/isFeatureEnabled.ts
(0 hunks)backend/src/security/permissions.ts
(0 hunks)backend/src/security/plans.ts
(0 hunks)backend/src/serverless/integrations/workers/sendgridWebhookWorker.ts
(0 hunks)backend/src/serverless/integrations/workers/stripeWebhookWorker.ts
(0 hunks)backend/src/services/IServiceOptions.ts
(0 hunks)backend/src/services/__tests__/tenantService.test.ts
(1 hunks)backend/src/services/memberService.ts
(4 hunks)backend/src/services/noteService.ts
(0 hunks)backend/src/services/sampleDataService.ts
(0 hunks)backend/src/services/slackCommandService.ts
(0 hunks)backend/src/services/tenantService.ts
(1 hunks)backend/src/services/user/__tests__/permissionChecker.test.ts
(0 hunks)backend/src/services/user/permissionChecker.ts
(0 hunks)backend/src/services/user/userDestroyer.ts
(0 hunks)backend/src/services/user/userEditor.ts
(0 hunks)backend/src/types/unleashContext.ts
(0 hunks)backend/src/types/webhooks.ts
(0 hunks)backend/tsconfig.json
(1 hunks)backend/util/openapi.json
(0 hunks)backend/util/publish-docs.sh
(0 hunks)scripts/builders/backend.env
(1 hunks)scripts/cli
(3 hunks)scripts/deploy/kubernetes/.backend.env
(0 hunks)scripts/deploy/kubernetes/unleash-db.yaml
(0 hunks)scripts/deploy/kubernetes/unleash.yaml
(0 hunks)scripts/deploy/pre-built/scaffold-services.yaml
(0 hunks)scripts/premium-scaffold.yaml
(0 hunks)scripts/services/discord-ws.yaml
(0 hunks)services/apps/cache_worker/package.json
(0 hunks)services/apps/cache_worker/src/activities/getTenantSegmentInfo.ts
(0 hunks)services/apps/data_sink_worker/config/custom-environment-variables.json
(0 hunks)services/apps/data_sink_worker/config/default.json
(0 hunks)services/apps/data_sink_worker/package.json
(0 hunks)services/apps/data_sink_worker/src/bin/erase-member.ts
(0 hunks)services/apps/data_sink_worker/src/conf/index.ts
(0 hunks)services/apps/exports_worker/src/activities/members.ts
(0 hunks)services/apps/integration_run_worker/config/custom-environment-variables.json
(0 hunks)services/apps/integration_run_worker/config/default.json
(0 hunks)services/apps/integration_run_worker/package.json
(0 hunks)services/apps/integration_run_worker/src/conf/index.ts
(0 hunks)services/apps/integration_stream_worker/config/custom-environment-variables.json
(0 hunks)services/apps/integration_stream_worker/config/default.json
(0 hunks)services/apps/integration_stream_worker/package.json
(0 hunks)services/apps/integration_stream_worker/src/conf/index.ts
(0 hunks)services/apps/members_enrichment_worker/package.json
(0 hunks)services/apps/merge_suggestions_worker/package.json
(0 hunks)services/apps/merge_suggestions_worker/src/activities/common.ts
(1 hunks)services/apps/organizations_enrichment_worker/package.json
(0 hunks)services/apps/script_executor_worker/package.json
(0 hunks)services/apps/webhook_api/config/custom-environment-variables.json
(0 hunks)services/apps/webhook_api/config/default.json
(0 hunks)services/apps/webhook_api/package.json
(0 hunks)services/apps/webhook_api/src/conf/index.ts
(0 hunks)services/archetypes/standard/package.json
(0 hunks)services/archetypes/standard/src/index.ts
(0 hunks)services/libs/common/src/i18n/en.ts
(0 hunks)services/libs/common/src/i18n/es.ts
(0 hunks)services/libs/common_services/package.json
(0 hunks)services/libs/data-access-layer/src/members/others.ts
(0 hunks)services/libs/data-access-layer/src/old/apps/automations_worker/data.repo.ts
(0 hunks)services/libs/data-access-layer/src/others/index.ts
(1 hunks)services/libs/feature-flags/package.json
(0 hunks)services/libs/feature-flags/src/index.ts
(0 hunks)services/libs/feature-flags/tsconfig.json
(0 hunks)services/libs/opensearch/package.json
(0 hunks)services/libs/opensearch/src/models/members.ts
(0 hunks)services/libs/opensearch/src/repo/member.data.ts
(0 hunks)services/libs/opensearch/src/repo/member.repo.ts
(0 hunks)
⛔ Files not processed due to max files limit (6)
- services/libs/opensearch/src/service/member.search.service.ts
- services/libs/opensearch/src/service/organization.search.service.ts
- services/libs/types/src/enums/priorities.ts
- services/libs/types/src/enums/tenants.ts
- services/libs/types/src/index.ts
- services/libs/types/src/merging.ts
💤 Files with no reviewable changes (145)
- services/libs/opensearch/package.json
- services/libs/feature-flags/tsconfig.json
- services/apps/webhook_api/config/default.json
- services/apps/cache_worker/package.json
- services/apps/members_enrichment_worker/package.json
- services/apps/integration_stream_worker/package.json
- services/apps/data_sink_worker/src/bin/erase-member.ts
- services/apps/integration_run_worker/config/default.json
- backend/src/api/components/member/memberAttributeSettings/responses.yaml
- services/apps/webhook_api/config/custom-environment-variables.json
- services/apps/script_executor_worker/package.json
- backend/src/api/note/noteAutocomplete.ts
- services/apps/data_sink_worker/config/custom-environment-variables.json
- services/archetypes/standard/package.json
- backend/src/api/tenant/tenantGenerateSampleData.ts
- services/apps/integration_stream_worker/config/custom-environment-variables.json
- backend/src/database/initializers/suggested-tasks.json
- backend/src/api/components/member/memberAttributeSettings/inputs.yaml
- backend/base.yaml
- backend/src/api/components/note/inputs.yaml
- backend/src/api/note/noteFind.ts
- backend/src/api/tenant/tenantDeleteSampleData.ts
- services/apps/integration_stream_worker/src/conf/index.ts
- backend/src/database/repositories/IRepositoryOptions.ts
- backend/util/openapi.json
- services/apps/webhook_api/package.json
- backend/.openapirc.js
- backend/src/api/components/conversation/inputs.yaml
- backend/src/api/components/activity/activityTypes/examples.yaml
- backend/src/api/components/activity/activityTypes/inputs.yaml
- backend/src/api/note/noteQuery.ts
- backend/src/api/components/organization/models.yaml
- backend/src/api/components/tag/examples.yaml
- backend/src/api/components/note/models.yaml
- services/apps/data_sink_worker/package.json
- backend/util/publish-docs.sh
- scripts/services/discord-ws.yaml
- backend/src/api/components/member/memberAttributeSettings/examples.yaml
- services/libs/feature-flags/package.json
- backend/src/types/unleashContext.ts
- services/libs/opensearch/src/repo/member.repo.ts
- backend/src/feature-flags/isFeatureEnabled.ts
- backend/src/api/note/noteDestroy.ts
- backend/src/api/webhooks/sendgrid.ts
- backend/src/api/note/noteUpdate.ts
- services/apps/data_sink_worker/src/conf/index.ts
- backend/src/api/note/noteImport.ts
- backend/src/api/components/tag/models.yaml
- services/apps/integration_run_worker/config/custom-environment-variables.json
- backend/src/database/repositories/tests/tenantRepository.test.ts
- backend/src/api/note/index.ts
- backend/src/services/noteService.ts
- services/libs/opensearch/src/repo/member.data.ts
- backend/src/api/components/organization/examples.yaml
- backend/src/api/note/noteList.ts
- backend/src/api/tenant/index.ts
- backend/src/api/components/organization/inputs.yaml
- backend/src/api/components/automation/inputs.yaml
- backend/src/api/components/task/models.yaml
- services/libs/common/src/i18n/en.ts
- backend/src/api/components/task/responses.yaml
- backend/src/api/plan/index.ts
- scripts/deploy/kubernetes/.backend.env
- services/apps/webhook_api/src/conf/index.ts
- scripts/premium-scaffold.yaml
- backend/src/api/webhooks/stripe.ts
- backend/src/conf/index.ts
- backend/src/api/note/noteCreate.ts
- backend/config/custom-environment-variables.json
- scripts/deploy/kubernetes/unleash.yaml
- services/libs/data-access-layer/src/old/apps/automations_worker/data.repo.ts
- services/libs/opensearch/src/models/members.ts
- scripts/deploy/kubernetes/unleash-db.yaml
- backend/src/api/webhooks/github.ts
- backend/src/api/components/member/memberAttributeSettings/models.yaml
- backend/src/services/slackCommandService.ts
- backend/src/api/components/activity/activityTypes/models.yaml
- backend/src/api/apiDocumentation.ts
- services/libs/common_services/package.json
- backend/src/services/IServiceOptions.ts
- backend/src/services/user/userDestroyer.ts
- backend/src/serverless/integrations/workers/stripeWebhookWorker.ts
- backend/src/api/plan/stripe/webhook.ts
- backend/src/feature-flags/getFeatureFlagTenantContext.ts
- backend/src/api/plan/stripe/checkout.ts
- backend/src/bin/discord-ws.ts
- backend/src/api/components/auth.yaml
- backend/src/api/plan/stripe/portal.ts
- backend/src/api/components/note/responses.yaml
- backend/src/api/components/activity/responses.yaml
- backend/src/security/permissions.ts
- backend/src/api/components/activity/query.yaml
- scripts/deploy/pre-built/scaffold-services.yaml
- backend/src/conf/configTypes.ts
- backend/src/api/components/member/models.yaml
- services/apps/merge_suggestions_worker/package.json
- backend/src/api/webhooks/discourse.ts
- backend/src/api/components/activity/examples.yaml
- services/apps/integration_run_worker/package.json
- backend/src/api/components/task/inputs.yaml
- services/apps/organizations_enrichment_worker/package.json
- backend/src/api/components/note/examples.yaml
- backend/src/api/webhooks/index.ts
- backend/src/api/components/conversation/models.yaml
- services/apps/integration_stream_worker/config/default.json
- backend/config/default.json
- backend/src/services/sampleDataService.ts
- backend/src/api/components/automation/examples.yaml
- backend/src/api/components/note/query.yaml
- backend/src/api/components/member/query.yaml
- backend/src/api/components/task/examples.yaml
- services/apps/exports_worker/src/activities/members.ts
- backend/src/api/components/member/responses.yaml
- backend/src/api/components/organization/query.yaml
- backend/src/database/repositories/tenantRepository.ts
- backend/src/api/components/activity/models.yaml
- backend/src/services/user/tests/permissionChecker.test.ts
- backend/src/database/repositories/noteRepository.ts
- backend/src/api/components/organization/responses.yaml
- backend/.env.dist.local
- backend/src/services/user/userEditor.ts
- backend/src/api/components/automation/models.yaml
- backend/src/api/components/task/query.yaml
- services/apps/data_sink_worker/config/default.json
- services/archetypes/standard/src/index.ts
- backend/src/api/components/parameters.yaml
- backend/src/bin/scripts/unleash-init.ts
- backend/src/api/components/member/examples.yaml
- backend/src/api/components/member/inputs.yaml
- services/apps/cache_worker/src/activities/getTenantSegmentInfo.ts
- backend/src/serverless/integrations/workers/sendgridWebhookWorker.ts
- services/libs/feature-flags/src/index.ts
- backend/package.json
- backend/src/database/models/tenant.ts
- services/libs/common/src/i18n/es.ts
- backend/src/types/webhooks.ts
- backend/src/database/models/note.ts
- services/apps/integration_run_worker/src/conf/index.ts
- backend/src/services/user/permissionChecker.ts
- backend/src/api/components/conversation/examples.yaml
- services/libs/data-access-layer/src/members/others.ts
- backend/src/api/components/activity/inputs.yaml
- backend/src/database/repositories/tests/noteRepository.test.ts
- backend/src/security/plans.ts
- backend/src/database/repositories/memberRepository.ts
🧰 Additional context used
🪛 Biome (1.9.4)
backend/src/database/utils/sequelizeTestUtils.ts
[error] 105-105: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 106-106: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 236-236: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 236-236: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
[error] 236-236: Using this in a static context can be confusing.
this refers to the class.
Unsafe fix: Use the class name instead.
(lint/complexity/noThisInStatic)
🔇 Additional comments (17)
services/libs/data-access-layer/src/others/index.ts (1)
1-1
: No leftover references to notes.
RemovingINote
is aligned with the removal of any note-related functionality from this file. Ensure that no other modules still reference the discontinuedfindNotes
function.Run the following script to confirm there are no lingering references to
findNotes
in the codebase:✅ Verification successful
findNotes
and note-related references have been successfully removedThe verification process shows that there are no remaining references to
findNotes
function orINote
type in the codebase. The removal ofINote
from the imports is consistent with the complete removal of note-related functionality, and no lingering references were found that would require attention.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Searches the repository for any references to findNotes rg -A 5 'findNotes'Length of output: 19
Script:
#!/bin/bash # Let's try a case-insensitive search and also look for historical references rg -i 'findnotes|find_notes' # Also search for any remaining Note-related types or interfaces ast-grep --pattern 'interface INote' ast-grep --pattern 'type Note' # Let's also check for any imports of INote rg "import.*INote.*from"Length of output: 129
backend/tsconfig.json (1)
20-20
: LGTM! Clean and focused TypeScript configuration.The simplified
include
configuration focusing only on thesrc
directory follows TypeScript best practices and aligns with the cleanup objectives.scripts/builders/backend.env (1)
4-4
: Confirm complete removal of thediscord-ws
service references.By removing
discord-ws
fromSERVICES
, you have effectively dropped thediscord-ws
service from the environment configuration. Please verify that any remaining references todiscord-ws
have been fully removed or deprecated across the rest of the codebase to ensure consistency and prevent inactive, unmaintained service code.✅ Verification successful
No remaining references to
discord-ws
service found in the codebaseBased on the comprehensive search results, there are no remaining references to the
discord-ws
service across the codebase. While there are Discord-related dependencies and configurations present (mainly related to discord.js library and Discord API integration), none of them are specifically related to thediscord-ws
service that was removed from the environment configuration.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if there are any remaining references to "discord-ws" across the codebase. rg "discord-ws"Length of output: 15
Script:
#!/bin/bash # Let's try a more comprehensive search with different variations and patterns # Search for discord-ws with different case variations and separators rg -i "discord[_-]?ws" # Search for any discord-related service configurations rg -i "discord.*service" # Search specifically in configuration and environment files fd -e env -e yaml -e yml -e json -e config --exec rg -i "discord" # Search for any Discord-related imports or requires ast-grep --pattern 'import $_ from "$$$discord$$$"' ast-grep --pattern 'require("$$$discord$$$")'Length of output: 54164
backend/src/database/models/member.ts (1)
112-112
: Removal of thenotes
association (no issues detected).It appears that the many-to-many association with
notes
was removed. This is consistent with your refactoring plans. Ensure that any references to this relationship elsewhere in the codebase (e.g., repositories or services) are updated or removed as part of the cleanup.backend/src/database/utils/sequelizeTestUtils.ts (2)
11-11
: Import of SegmentStatus (no issues detected).The new import of
SegmentStatus
is clearly used when creating a default segment below, so this looks good.
239-239
: Tenant factory method (no issues detected).The refactored
getTenant
factory method is straightforward and consistent with your usage pattern.backend/src/services/__tests__/tenantService.test.ts (1)
2-2
: No issues found with the updated import.
The newly importedMemberAttributeName
is used appropriately in the test.backend/src/database/repositories/sequelizeRepository.ts (2)
4-4
: Import usage appears consistent.
The addition ofError400
from@crowd/common
is aligned with the repository’s error handling logic.
16-16
: Good approach for typed data.
The introduction ofSegmentData
from@crowd/types
ensures clarity in segment-related operations.backend/src/services/tenantService.ts (1)
4-4
: Import changes look good.
Replacing unused imports withSegmentData
andSegmentStatus
is consistent with the removal of plan-based logic.backend/src/services/memberService.ts (5)
690-690
: Concurrent retrieval is well-structured.
UsingPromise.all
for fetching tasks and tags improves efficiency by executing queries in parallel.
923-923
: Reminder: Make sure note references are fully removed.
The updatedrelationships
array correctly omits notes, aligning with the removal of note functionality.
938-938
: Clear logging practice.
This structured log message helps with debugging the unmerge process.
941-941
: Parallel data fetching continues to be efficient.
Eliminating note retrieval is consistent with the new data model.
1297-1297
: Consistent approach to concurrent data retrieval.
Removing note-related queries maintains clarity in the code.services/apps/merge_suggestions_worker/src/activities/common.ts (1)
22-22
: Confirm removal of feature-flag filtering logic.Previously, this function filtered tenants based on feature flags. Now it returns all tenants unconditionally. If this is intentional, ensure that any dependent code expecting a filtered tenant list is updated or removed.
Run the following script to verify that no references to the old
TEMPORAL_MEMBER_MERGE_SUGGESTIONS
feature flag remain in the codebase:✅ Verification successful
Feature flag removal appears safe to proceed
Based on the verification results:
- The feature flag
TEMPORAL_MEMBER_MERGE_SUGGESTIONS
only exists in the feature flags enum definition (services/libs/types/src/enums/featureFlags.ts
)- No active usage of this feature flag was found in the codebase
- No imports of the FeatureFlags enum were found that might be using this flag
The removal of the feature-flag filtering logic appears to be a safe cleanup of unused code, as there are no remaining dependencies on the filtered tenant list functionality.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Searching for references to the old feature flag rg TEMPORAL_MEMBER_MERGE_SUGGESTIONSLength of output: 159
Script:
#!/bin/bash # Let's check if there are any references to this feature flag in actual usage rg -A 3 "TEMPORAL_MEMBER_MERGE_SUGGESTIONS" --type ts # Also check for any imports of featureFlags enum that might be using this flag ast-grep --pattern 'import { $$$ FeatureFlags $$$ } from "@coderabbit/types"'Length of output: 526
Script:
#!/bin/bash # Let's check the git history of the specific file to understand the change context git log -p services/apps/merge_suggestions_worker/src/activities/common.ts # Also check for any feature flag related code in the same file rg -A 5 "feature" services/apps/merge_suggestions_worker/src/activities/common.tsLength of output: 81
backend/src/api/index.ts (1)
16-16
: No issues with the new import.Importing
ApiWebsocketMessage
clarifies the data structure for websocket messages. This aligns well with the usage below. No further concerns.
Removed following items in backend: