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

Improve load func error handling to expose more information #647

Merged

Conversation

dinhxuanvu
Copy link
Member

Many of sqlite query returns errors due to constrain issues. Those
errors are often vague and not helpful for debugging reason.

Those sqlite errors should be wrapped around with other information
to expose the root cause and provide further data for debugging.

Signed-off-by: Vu Dinh vudinh@outlook.com

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dinhxuanvu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 30, 2021
@codecov
Copy link

codecov bot commented Apr 30, 2021

Codecov Report

Merging #647 (efa3907) into master (0f5a9cf) will decrease coverage by 0.03%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #647      +/-   ##
==========================================
- Coverage   48.44%   48.40%   -0.04%     
==========================================
  Files          87       87              
  Lines        7592     7598       +6     
==========================================
  Hits         3678     3678              
- Misses       3188     3194       +6     
  Partials      726      726              
Impacted Files Coverage Δ
pkg/sqlite/load.go 33.37% <50.00%> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f5a9cf...efa3907. Read the comment docs.

pkg/sqlite/load.go Outdated Show resolved Hide resolved
@timflannagan
Copy link
Contributor

This looks reasonable to me besides the error capitalization issue I linked to and the codecov lines outlined by the bot that don't have any coverage.

pkg/sqlite/load.go Outdated Show resolved Hide resolved
Many of sqlite query returns errors due to constrain issues. Those
errors are often vague and not helpful for debugging reason.

Those sqlite errors should be wrapped around with other information
to expose the root cause and provide further data for debugging.

Signed-off-by: Vu Dinh <vudinh@outlook.com>
@timflannagan
Copy link
Contributor

/rerun-all

@timflannagan
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 6, 2021
@openshift-merge-robot openshift-merge-robot merged commit c572d0d into operator-framework:master May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error loading bundle into db: FOREIGN KEY constraint failed
4 participants