Skip to content

Load playground data from binary dump#1100

Merged
zhenghaoz merged 5 commits intomasterfrom
dump
Nov 15, 2025
Merged

Load playground data from binary dump#1100
zhenghaoz merged 5 commits intomasterfrom
dump

Conversation

@zhenghaoz
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

❌ Patch coverage is 6.97674% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.11%. Comparing base (e0ef48f) to head (50e7349).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
cmd/gorse-in-one/main.go 0.00% 58 Missing ⚠️
master/rest.go 21.42% 7 Missing and 15 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1100      +/-   ##
==========================================
+ Coverage   70.90%   71.11%   +0.20%     
==========================================
  Files          86       86              
  Lines       15108    15062      -46     
==========================================
- Hits        10713    10712       -1     
+ Misses       3341     3295      -46     
- Partials     1054     1055       +1     

☔ 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the playground data loading mechanism by replacing MySQL dump file processing with binary dump format. The key change extracts the restore logic into a public Restore() method and switches from parsing MySQL dumps to directly importing binary dumps.

  • Extracted restoration logic from the HTTP handler into a reusable public Restore() method
  • Removed MySQL-to-SQLite conversion using AWK script and related dependencies
  • Updated playground mode to download binary dump files instead of MySQL dumps

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
master/rest.go Refactored restore function by extracting core logic into public Restore() method that accepts io.ReadCloser
go.mod Removed github.com/benhoyt/goawk dependency (no longer needed for MySQL conversion)
go.sum Removed checksums for benhoyt/goawk package
config/config_test.go Updated test to use embedded ConfigTOML instead of reading from file
config/config.go Added //go:embed directive to embed config.toml as ConfigTOML variable
cmd/gorse-master/main.go Removed unused --managed flag
cmd/gorse-worker/main.go Removed unused --managed flag
cmd/gorse-in-one/mysql2sqlite Deleted AWK script for MySQL to SQLite conversion
cmd/gorse-in-one/main.go Simplified playground initialization to use binary dump format and call Restore() method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@zhenghaoz zhenghaoz marked this pull request as ready for review November 15, 2025 19:05
@zhenghaoz zhenghaoz merged commit f942961 into master Nov 15, 2025
12 checks passed
@zhenghaoz zhenghaoz deleted the dump branch November 15, 2025 19:10
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.

2 participants