Skip to content
Snippets Groups Projects

Refactor mongo store handling

Merged André Sterba requested to merge refactor-mongo-store-handling into master
All threads resolved!

Description

This MR removes the connection handling from the database store implementions. Instead we connect a single time in the controller.go to the mongo database and reuse that connection in all stores.

It also adds context handling to the store layer. Currently the context is created in the service layer, but this should be moved to northbound to use the same context through the whole call stack. (will be done in another MR soon)

Motivation and Context

This change removes code duplication in all mongo store implementations.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Edited by André Sterba

Merge request reports

Pipeline #176524 passed

Pipeline passed for 2b417418 on refactor-mongo-store-handling

Test coverage 33.90% (3.50%) from 1 job

Merged by Fabian SeidlFabian Seidl 1 year ago (Dec 18, 2023 1:54pm UTC)

Merge details

  • Changes merged into with db489f19.
  • Deleted the source branch.

Pipeline #176648 passed

Pipeline passed for db489f19 on master

Test coverage 33.90% (3.50%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • André Sterba added 1 commit

    added 1 commit

    Compare with previous version

  • assigned to @hda1

  • André Sterba added 1 commit

    added 1 commit

    Compare with previous version

  • André Sterba added 1 commit

    added 1 commit

    Compare with previous version

  • André Sterba added 1 commit

    added 1 commit

    Compare with previous version

  • André Sterba added 4 commits

    added 4 commits

    Compare with previous version

  • Fabian Seidl resolved all threads

    resolved all threads

  • Fabian Seidl added 22 commits

    added 22 commits

    Compare with previous version

  • Fabian Seidl approved this merge request

    approved this merge request

  • Fabian Seidl enabled an automatic merge when the pipeline for 2b417418 succeeds

    enabled an automatic merge when the pipeline for 2b417418 succeeds

  • merged

  • André Sterba mentioned in commit db489f19

    mentioned in commit db489f19

  • Please register or sign in to reply
    Loading