Skip to content

feat: skip errors during import#106

Merged
skynet2 merged 3 commits intomasterfrom
skip-errors-import
Feb 21, 2026
Merged

feat: skip errors during import#106
skynet2 merged 3 commits intomasterfrom
skip-errors-import

Conversation

@skynet2
Copy link
Member

@skynet2 skynet2 commented Feb 21, 2026

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @skynet2, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant improvement to the transaction import functionality by allowing users to selectively skip transactions that fail validation. Previously, any validation error would halt the entire import. With this change, a new UI option enables a more resilient import process, where problematic transactions are logged and bypassed, while valid ones are still processed. The backend was updated to support this new flag, and the import summary now provides a clear count of skipped items, enhancing user experience and data handling flexibility.

Highlights

  • Frontend UI Enhancement: Added a 'Skip Validation Errors' checkbox to the transaction import form, allowing users to bypass individual transaction validation failures during import.
  • Backend Import Logic Update: Implemented logic in the backend to respect the 'Skip Validation Errors' flag, enabling the system to skip malformed transactions instead of failing the entire import process.
  • Import Summary Improvement: Enhanced the import result message to include a count of transactions that were skipped due to validation errors, providing clearer feedback to the user.
  • Dependency Updates: Updated protobuf-related dependencies in both the frontend (package-lock.json, package.json) and backend (go.mod, go.sum) to their latest versions.
Changelog
  • frontend/package-lock.json
    • Updated @buf/xskydev_go-money-pb.bufbuild_es dependency version.
    • Added "dev": true flag to numerous node_modules entries.
  • frontend/package.json
    • Updated @buf/xskydev_go-money-pb.bufbuild_es dependency to ^2.11.0-20260221154942-deaf287f58ff.1.
  • frontend/src/app/pages/transactions/transactions-import.component.html
    • Added a new p-checkbox for skipValidationErrors, displayed conditionally when not in staging mode.
  • frontend/src/app/pages/transactions/transactions-import.component.ts
    • Introduced public skipValidationErrors: boolean = false; property.
    • Included skipValidationErrors in the ImportTransactionsRequest sent to the backend.
    • Modified the log message to display Skipped (validation errors) count if greater than zero.
  • go.mod
    • Updated buf.build/gen/go/xskydev/go-money-pb/protocolbuffers/go dependency version.
  • go.sum
    • Updated checksum for buf.build/gen/go/xskydev/go-money-pb/protocolbuffers/go.
  • pkg/importers/importer.go
    • Passed req.SkipValidationErrors to transactions.UpsertOptions.
    • Added SkippedCount to the ImportTransactionsResponse.
  • pkg/transactions/service.go
    • Implemented logic to skip transaction conversion if opts.SkipValidationErrors is true and an error occurs, logging a warning instead.
  • pkg/transactions/types.go
    • Added SkipValidationErrors bool field to the UpsertOptions struct.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces a feature to skip transactions with validation errors during the import process, which is a valuable addition for handling large datasets. However, the current implementation is incomplete as it only skips errors during the initial conversion phase and does not extend this logic to the business validation phase in FinalizeTransactions. Additionally, there is a logic issue in the bulk processing loop where original transactions are tracked for statistics even if the update is skipped due to an error, which could lead to inconsistent data in the statistics service.

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.45%. Comparing base (559ccd1) to head (db58f3c).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/transactions/service.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #106      +/-   ##
==========================================
- Coverage   87.51%   87.45%   -0.07%     
==========================================
  Files          83       83              
  Lines        6847     6854       +7     
==========================================
+ Hits         5992     5994       +2     
- Misses        611      616       +5     
  Partials      244      244              
Flag Coverage Δ
unittests 87.45% <25.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@skynet2 skynet2 merged commit 61bac17 into master Feb 21, 2026
4 of 6 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.

1 participant