Skip to content
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

Change to use pure golang sqlite driver for better portability #564

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

nothing0012
Copy link
Contributor

@nothing0012 nothing0012 commented Jan 1, 2024

Description

Update the sqlite dep to be golang only, this helps the portability and reduce the dependency on cgo

Tests and Benchmark of the new sqlite3 driver:

image

Motivation and Context

How Has This Been Tested?

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 added tests to cover my changes.
  • All new and existing tests passed.

@ghost
Copy link

ghost commented Jan 1, 2024

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@@ -3,7 +3,6 @@ package entity
import (
"github.com/openflagr/flagr/swagger_gen/models"

_ "gorm.io/driver/sqlite" // sqlite driver
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was already imported and used in db.go

@@ -56,13 +55,12 @@ require (

require (
cloud.google.com/go/pubsub v1.30.0
github.com/goccy/go-json v0.10.2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

go-json was not used.

running make vendor to tidy this

@codecov-commenter
Copy link

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (3f9f613) 81.18% compared to head (75468a2) 81.18%.

Files Patch % Lines
pkg/entity/db.go 66.66% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #564   +/-   ##
=======================================
  Coverage   81.18%   81.18%           
=======================================
  Files          28       28           
  Lines        2270     2270           
=======================================
  Hits         1843     1843           
  Misses        337      337           
  Partials       90       90           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nothing0012 nothing0012 merged commit a2c5f9b into main Jan 1, 2024
9 checks passed
@nothing0012 nothing0012 deleted the zz/upgrade-deps branch January 1, 2024 03:30
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.

None yet

2 participants