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

fix: docker build not working with sqlite #648

Merged
merged 10 commits into from
Jan 12, 2024

Conversation

darrenvechain
Copy link
Member

@darrenvechain darrenvechain commented Jan 9, 2024

Description

Docker build was failing on the latest golang:alpine image. This PR updates the problematic dependency and updates the event queries accordingly.

I updated github.com/mattn/go-sqlite3 to v1.14.19 as this was the problem. Unit test then started to fail because ORDER BY does not seem to work in sub-clauses anymore

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

package: logdb_test

  • created a new test test: TestNewestBlockID
  • added new test cases to TestEvents

Manually tested /log endpoints to ensure results were correctly ordered

Test Configuration:

  • Go Version: go1.21.3 darwin/arm64
  • Hardware: MacOS
  • Docker Version: 24.0.6

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • I have not added any vulnerable dependencies to my code
  • Tested /log endpoints to ensure tho ordering still works

@darrenvechain darrenvechain requested a review from a team as a code owner January 9, 2024 11:01
@darrenvechain darrenvechain marked this pull request as draft January 9, 2024 11:01
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dc35d71) 55.09% compared to head (8081406) 55.16%.
Report is 1 commits behind head on master.

❗ Current head 8081406 differs from pull request most recent head db18285. Consider uploading reports for the commit db18285 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #648      +/-   ##
==========================================
+ Coverage   55.09%   55.16%   +0.07%     
==========================================
  Files         179      179              
  Lines       20665    20680      +15     
==========================================
+ Hits        11386    11409      +23     
+ Misses       8442     8433       -9     
- Partials      837      838       +1     

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

@darrenvechain darrenvechain marked this pull request as ready for review January 11, 2024 09:52
@libotony
Copy link
Member

LGTM, @qianbin please take a look. Source mattn/go-sqlite3#1164 (comment), and we have identified the failed test is caused by the Order by clause inside a subquery being ignored. The feature is introduced by SQLite 3.37.0, ref https://www.sqlite.org/releaselog/3_37_0.html number 7.

@qianbin
Copy link
Member

qianbin commented Jan 12, 2024

This PR looks tough. Great job!

@qianbin qianbin merged commit 872ba93 into vechain:master Jan 12, 2024
7 checks passed
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.

4 participants