Skip to content

test(flatkv): add EVM migration docker integration coverage#3400

Open
blindchaser wants to merge 4 commits intomainfrom
yiren/flatkv-docker-testings
Open

test(flatkv): add EVM migration docker integration coverage#3400
blindchaser wants to merge 4 commits intomainfrom
yiren/flatkv-docker-testings

Conversation

@blindchaser
Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Testing performed to validate your change

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 7, 2026, 12:29 AM

@blindchaser blindchaser force-pushed the yiren/flatkv-docker-testings branch from a9518ab to 1acc8aa Compare May 6, 2026 20:43
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a9518ab773

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if err != nil {
return fmt.Errorf("failed to create FlatKV importer at height %d: %w", height, err)
}
defer func() { _ = importer.Close() }()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid finalizing partial imports after errors

Because this deferred Close runs on every return path, any error after some nodes have been added but before the explicit successful close—such as an exporter error, context cancellation, or an invalid EVM key from migrateEVMNode—still calls KVImporter.Close, which finalizes the import, writes a snapshot, and leaves a committed partial FlatKV store even though the command reports failure. This can make a failed migration look retryable while leaving corrupted migrated state on disk; only finalize on the success path or add an abort/cleanup path for failures.

Useful? React with 👍 / 👎.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 48.33333% with 124 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.02%. Comparing base (ab54587) to head (77566a6).

Files with missing lines Patch % Lines
.../cmd/seidb/operations/migrate_memiavl_to_flatkv.go 46.00% 93 Missing and 22 partials ⚠️
sei-db/state_db/sc/flatkv/importer.go 64.70% 4 Missing and 2 partials ⚠️
sei-db/state_db/sc/memiavl/import.go 0.00% 2 Missing ⚠️
sei-db/tools/cmd/seidb/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3400      +/-   ##
==========================================
- Coverage   59.03%   59.02%   -0.02%     
==========================================
  Files        2105     2106       +1     
  Lines      173300   173529     +229     
==========================================
+ Hits       102312   102421     +109     
- Misses      62104    62202      +98     
- Partials     8884     8906      +22     
Flag Coverage Δ
sei-chain-pr 63.83% <48.33%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
sei-db/state_db/sc/composite/importer.go 94.11% <100.00%> (+1.52%) ⬆️
sei-db/tools/cmd/seidb/main.go 0.00% <0.00%> (ø)
sei-db/state_db/sc/memiavl/import.go 73.03% <0.00%> (-0.83%) ⬇️
sei-db/state_db/sc/flatkv/importer.go 83.05% <64.70%> (-0.88%) ⬇️
.../cmd/seidb/operations/migrate_memiavl_to_flatkv.go 46.00% <46.00%> (ø)
🚀 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.

@blindchaser blindchaser force-pushed the yiren/flatkv-docker-testings branch from 1acc8aa to 32871b0 Compare May 6, 2026 22:45
@blindchaser blindchaser force-pushed the yiren/flatkv-docker-testings branch from 32871b0 to cda2dc8 Compare May 6, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant