Skip to content

chore: remove Elasticsearch integration from the project#719

Open
ManAnRuck wants to merge 3 commits intomasterfrom
refactor/remove-elasticsearch
Open

chore: remove Elasticsearch integration from the project#719
ManAnRuck wants to merge 3 commits intomasterfrom
refactor/remove-elasticsearch

Conversation

@ManAnRuck
Copy link
Member

This pull request removes Elasticsearch integration from the project, specifically by eliminating the use of the mongoosastic package and related configuration. This simplifies the codebase and dependency management, focusing database operations solely on MongoDB. Several package and lock file updates are also included to clean up dependencies and update some package versions.

Removal of Elasticsearch Integration

  • Removed the mongoosastic package from dependencies in package.json, and deleted all related code from Procedure/schema.ts, including the plugin usage and import statements. [1] [2] [3]
  • Deleted Elasticsearch-related environment variables from .env.example.

Dependency and Lock File Cleanup

  • Removed all Elasticsearch-related packages (mongoosastic, @elastic/elasticsearch, elasticsearch, and related agent packages) from pnpm-lock.yaml and its snapshots. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated some package versions and dependency references in pnpm-lock.yaml for consistency and to remove unused transitive dependencies. [1] [2] [3]

Miscellaneous Lock File Updates

  • Adjusted references and peer dependencies for several packages, including debug, eslint-import-resolver-typescript, and others, to reflect the cleaned-up dependency tree. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Eliminated references to Elasticsearch in the configuration and codebase.
This change simplifies the setup and reduces dependencies, focusing on MongoDB
as the primary data store.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes Elasticsearch integration from the project by eliminating the mongoosastic package and all associated configuration. The changes simplify the codebase by focusing database operations solely on MongoDB.

  • Removed mongoosastic dependency from multiple package.json files
  • Deleted Elasticsearch plugin usage and import from the Procedure schema
  • Removed Elasticsearch-related environment variables from .env.example

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
services/cron-jobs/import-named-poll-deputies/package.json Removed mongoosastic dependency
common/bundestagio/package.json Removed mongoosastic dependency
common/bundestagio/src/models/Procedure/schema.ts Removed mongoosastic import and plugin usage
.env.example Removed Elasticsearch URL environment variable and updated comment
pnpm-lock.yaml Removed all Elasticsearch-related packages and updated dependency references
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

common/bundestagio/src/models/Procedure/schema.ts:54

  • Elasticsearch-specific schema properties (es_indexed, es_type) are still present in the schema definition but are now unused after removing the mongoosastic plugin. These properties should be removed to prevent confusion and maintain code cleanliness. This applies to all fields in the schema that have es_* properties (lines 52-53, 58-59, 64-65, 70-81, 91-93, 100-102, 108-110, 118-119, 126, 133, 141-142).
    procedureId: {
      type: String,
      index: { unique: true },
      es_indexed: true,
      es_type: 'text',
    },

.env.example:1

  • Corrected trailing comma in removed line.
AUTH_JWT_SECRET=CHANGE_ME

Eliminated Elasticsearch-specific properties from PartyVotes, ProcessFlow,
and Procedure schemas. Removed the mongoosastic type declaration file
to clean up the codebase as part of the ongoing refactor.
Docker builds were failing with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY
because pnpm requires the CI environment variable to be set when running
in non-interactive environments like Docker builds.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +1 to +3
import { Schema } from 'mongoose';

import ProcessDecision, { IProcessDecision } from "./ProcessDecision";
import ProcessDecision, { IProcessDecision } from './ProcessDecision';
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent quote style: This file now uses single quotes ('mongoose'), but other related schema files in the same directory like ProcessDecision.ts, Document.ts, and Plenum.ts use double quotes ("mongoose"). Consider maintaining consistency across all schema files in this directory.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +7
import { Schema } from 'mongoose';

export enum VoteDecision {
Yes = "YES",
Abstination = "ABSTINATION",
No = "NO",
Notvoted = "NOTVOTED",
Yes = 'YES',
Abstination = 'ABSTINATION',
No = 'NO',
Notvoted = 'NOTVOTED',
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

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

[nitpick] Inconsistent quote style: This file now uses single quotes ('mongoose', 'YES', etc.), but other related schema files in the same directory like ProcessDecision.ts, Document.ts, and Plenum.ts use double quotes. Consider maintaining consistency across all schema files in this directory.

Copilot uses AI. Check for mistakes.
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