Skip to content

Querying members with opensearch#1001

Merged
epipav merged 10 commits intoenhancement/opensearch-C-1317from
enhancement/opensearch-querying-members-C-1317
Jun 20, 2023
Merged

Querying members with opensearch#1001
epipav merged 10 commits intoenhancement/opensearch-C-1317from
enhancement/opensearch-querying-members-C-1317

Conversation

@epipav
Copy link
Copy Markdown
Collaborator

@epipav epipav commented Jun 19, 2023

Changes proposed ✍️

What

🤖 Generated by Copilot at fff2e58

This pull request integrates OpenSearch with the backend services and the API of the crowd.dev platform. It adds the necessary dependencies, configuration, and middleware to connect to an OpenSearch node and use it for search operations. It also removes some unused and outdated files and variables related to the database attributes and the SQS queue. Additionally, it updates the test environment setup and the README file to reflect the changes.

🤖 Generated by Copilot at fff2e58

We search for the truth in the OpenSearch node
We connect to the cluster with the config code
We compose the services with the docker mode
We rock the crowd.dev platform with the API load

Why

How

🤖 Generated by Copilot at fff2e58

  • Integrate OpenSearch with the backend services and the API (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Add the @crowd/opensearch package as a local dependency of the backend services, and the @opensearch-project/opensearch package as a dependency of the @crowd/opensearch package (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Add the CROWD_OPENSEARCH_NODE environment variable to the backend/.env.dist.composed and backend/.env.dist.local files to specify the URL of the OpenSearch node (link, link)
  • Add the CROWD_SQS_PORT environment variable to the backend/.env.test file to specify the port of the SQS service (link)
  • Add the opensearch configuration to the backend/config/custom-environment-variables.json file to map the environment variables to the properties of the OpenSearch client (link)
  • Add the sqs and open-search-test services to the backend/docker-compose.test.yaml file to create the SQS and OpenSearch containers for the test environment (link)
  • Add the IOpenSearchConfig interface to the backend/src/conf/configTypes.ts file to define the type of the opensearch configuration (link)
  • Export the IOpenSearchConfig interface and the OPENSEARCH_CONFIG constant from the backend/src/conf/index.ts file to make them available for other modules (link, link)
  • Import the getOpensearchClient function from the @crowd/opensearch package and the OPENSEARCH_CONFIG constant from the ../conf module to the backend/src/api/index.ts file, and use them to create an instance of the OpenSearch client (link, link)
  • Import the opensearchMiddleware function from the ../middlewares/opensearchMiddleware module to the backend/src/api/index.ts file, and use it to bind the OpenSearch client to the request object of the API service (link, link)
  • Remove the CROWD_SQS_INTEGRATION_RUN_WORKER_QUEUE environment variable from the backend/.env.dist.composed and backend/.env.dist.local files to avoid confusion and duplication (link, link)
  • Add the logging property to the database configuration in the backend/config/custom-environment-variables.json file to enable or disable the logging of the database queries (link)
  • Modify the declaration of the AttributeData interface to extend the IMemberAttribute interface from the @crowd/types package in the backend/src/database/attributes/attribute.ts file to reuse the common properties of the member attribute type (link)
  • Delete the files backend/src/database/attributes/member/crowd.ts, backend/src/database/attributes/member/devto.ts, backend/src/database/attributes/member/enums.ts, backend/src/database/attributes/member/github.ts, backend/src/database/attributes/member/hackerNews.ts, backend/src/database/attributes/member/linkedin.ts, backend/src/database/attributes/member/reddit.ts, and backend/src/database/attributes/member/stackOverflow.ts as they are no longer needed (link, link, link, link, link, link, link, link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@epipav epipav changed the base branch from main to enhancement/opensearch-C-1317 June 19, 2023 16:51
Comment thread services/libs/opensearch/src/client.ts Outdated
Comment thread services/scripts/build_libs.sh
@epipav epipav marked this pull request as ready for review June 20, 2023 08:45
@epipav epipav merged commit 33d3655 into enhancement/opensearch-C-1317 Jun 20, 2023
@epipav epipav deleted the enhancement/opensearch-querying-members-C-1317 branch June 20, 2023 10:08
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