Enhancement/organizations in opensearch c 1978#1328
Merged
Conversation
…ub.com:CrowdDotDev/crowd.dev into enhancement/organizations-in-opensearch-C-1978
…ub.com:CrowdDotDev/crowd.dev into enhancement/organizations-in-opensearch-C-1978
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
🤖 Generated by Copilot at 64ea737
This pull request adds the functionality to sync and index the organization data from the database to the opensearch service, using the search sync worker and the nodejs worker services. It also fixes a bug in the frontend filter for the organization data, and adds some scripts and tests for the sync and cleanup operations. It modifies several files in the backend, frontend, and services modules, such as
organizationRepository.ts,organizationService.ts,member.service.ts,organization.sync.service.ts,organization.data.ts,main.ts, andpackage.json. It also adds some new files, such asorganization.repo.ts,segment.repo.ts,segment.data.ts, andU1691485202__organization-sync-timestamp.sql. It refactors some existing files, such asmember.repo.ts,member.sync.service.ts,member.data.ts, andfieldTranslator.ts.
🤖 Generated by Copilot at 64ea737
Why
How
🤖 Generated by Copilot at 64ea737
OrganizationSyncServiceclass to provide methods for syncing, cleaning, and removing organization data from opensearch service (link, link, link)WorkerQueueReceiverclass to handle organization sync events from SQS queue (link, link, link)OrganizationRepositoryclass to query and manipulate organization data from database (link, link)searchSyncedAtcolumn toorganizationstable and corresponding migration scripts (link, link)package.jsonfile of search sync worker service to run sync and cleanup operations for organization data (link)OpenSearchIndex.ORGANIZATIONSenum value and corresponding mapping to opensearch service types and classes (link, link, link)OrganizationServiceclass to trigger organization sync events usingSearchSyncWorkerEmitterclass after creating, updating, or deleting organization records (link, link, link, link, link)MemberServiceclass to trigger organization sync events usingSearchSyncWorkerEmitterclass after updating member organizations (link, link, link)OrganizationServiceclass to useOrganizationRepository.findAndCountAllOpensearchmethod to query and paginate organization data from opensearch service instead of database (link)InitServiceclass to create and index a fake organization record for testing purposes (link, link)MemberRepositoryandMemberSyncServiceclasses to separateSegmentRepositoryandSegmentDataclasses (link, link, link, link, link, link, link, link, link, link)SegmentRepositoryclass to query and manipulate segment data from database (link)IDbSegmentInfointerface to define data type for segment data in database and opensearch service (link)getParentSegmentIdsmethod fromMemberRepositoryclass toSegmentRepositoryclass (link, link)MemberSyncServiceclass to useSegmentRepositoryclass instead ofMemberRepositoryclass to get parent segment ids (link, link, link)IDbSegmentInfointerface import frommember.data.tsandmember.repo.tsfiles (link, link)IDbSegmentInfointerface import tomember.sync.service.tsfile (link)namefield withdisplayNamefield inorganizationSearchFilterfunction (link)FieldTranslatorFactoryandOpensearchQueryParserclasses toorganizationRepository.tsfile to translate and parse queries for opensearch service (link)isFeatureEnabledandFeatureFlagfunctions toorganizationRepository.tsfile to check if segments feature is enabled (link)getSearchSyncWorkerEmitterfunction toorganizationService.tsfile to get instance ofSearchSyncWorkerEmitterclass (link)IMemberAttributeinterface tomember.repo.tsfile to define data type for member attributes (link)preventNestedFieldTranslationproperty tomodelFieldinterface infieldTranslator.tsfile to prevent translation of some fields that are already in crowd format (link)Checklist ✅
Feature,Improvement, orBug.