Skip to content

Commit 3175474

Browse files
authored
Merge pull request #435 from Shopify/get-rid-of-vendored-packages
restacking in github is kinda slow 🤦
2 parents 26ab10f + bcc3381 commit 3175474

10 files changed

Lines changed: 64 additions & 44 deletions

File tree

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
github-pages:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
12+
- uses: actions/checkout@v6.0.2
1313

1414
- name: Build documentations
1515
run: .github/workflows/build-docs.sh

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ jobs:
1414
runner: [ubuntu-latest, shopify-ubuntu-arm64]
1515
runs-on: ${{ matrix.runner }}
1616
steps:
17-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
- uses: actions/checkout@v6.0.2
1818

1919
- name: Setup Go
20-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
20+
uses: actions/setup-go@v6.4.0
2121
with:
22-
go-version: 1.24.1
22+
go-version: "1.26.2"
2323

2424
- name: Building Ghostferry
2525
run: .github/workflows/build-deb.sh
2626

2727
- name: Upload debs
28-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
28+
uses: actions/upload-artifact@v7.0.1
2929
with:
3030
name: debs-${{ github.sha }}-${{ matrix.runner }}
3131
path: build/ghostferry*
@@ -34,9 +34,9 @@ jobs:
3434
runs-on: ubuntu-latest
3535
needs: build-debs
3636
steps:
37-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37+
- uses: actions/checkout@v6.0.2
3838
- name: Fetch uploaded artifacts
39-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
39+
uses: actions/download-artifact@v8.0.1
4040
with:
4141
pattern: debs-${{ github.sha }}-*
4242
merge-multiple: true

.github/workflows/tests.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
MYSQL_VERSION: ${{ matrix.mysql }}
3030

3131
steps:
32-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
33-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
32+
- uses: actions/checkout@v6.0.2
33+
- uses: actions/setup-go@v6.4.0
3434
with:
35-
go-version: 1.24.1
35+
go-version: "1.26.2"
3636

3737
- name: Starting up MySQL
3838
run: .github/workflows/start-mysql.sh
@@ -54,10 +54,10 @@ jobs:
5454
MYSQL_VERSION: ${{ matrix.mysql }}
5555

5656
steps:
57-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
58-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
57+
- uses: actions/checkout@v6.0.2
58+
- uses: actions/setup-go@v6.4.0
5959
with:
60-
go-version: 1.24.1
60+
go-version: "1.26.2"
6161

6262
- name: Starting up MySQL
6363
run: .github/workflows/start-mysql.sh
@@ -85,13 +85,12 @@ jobs:
8585
GHOSTFERRY_LOG_BACKEND: ${{ matrix.log_backend }}
8686

8787
steps:
88-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
89-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
88+
- uses: actions/checkout@v6.0.2
89+
- uses: actions/setup-go@v6.4.0
9090
with:
91-
go-version: 1.24.1
92-
- uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0
91+
go-version: "1.26.2"
92+
- uses: ruby/setup-ruby@v1
9393
with:
94-
ruby-version: 3.2
9594
bundler-cache: true
9695

9796
- name: Starting up MySQL
@@ -106,16 +105,16 @@ jobs:
106105
runner: [ubuntu-latest, shopify-ubuntu-arm64]
107106
runs-on: ${{ matrix.runner }}
108107
steps:
109-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
110-
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
108+
- uses: actions/checkout@v6.0.2
109+
- uses: actions/setup-go@v6.4.0
111110
with:
112-
go-version: 1.24.1
111+
go-version: "1.26.2"
113112

114113
- name: Building Ghostferry
115114
run: .github/workflows/build-deb.sh --tagged-only
116115

117116
- name: Upload debs
118-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
117+
uses: actions/upload-artifact@v7.0.1
119118
with:
120119
name: debs-${{ github.sha }}-${{ matrix.runner }}
121120
path: build/ghostferry*

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.2
1+
3.4.8

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ All notable changes to this project will be documented in this file.
88

99
- Align default zerolog log level with logrus (info vs trace)
1010
- Introduce slog handler wrapper around our Logger interface and use it with BinlogStreamer
11+
- Updated golang to 1.26.2
12+
- Updated ruby to 3.4.8 (test dependency)
13+
- Updated github actions (CI dependency)
1114

1215
### Removed
1316

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ group :development do
1616
gem "tqdm"
1717
gem "pry-byebug"
1818
end
19+
20+
gem "mutex_m", "~> 0.3.0"

Gemfile.lock

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
ansi (1.5.0)
5-
builder (3.2.4)
6-
byebug (11.1.3)
4+
ansi (1.6.0)
5+
bigdecimal (4.1.1)
6+
builder (3.3.0)
7+
byebug (13.0.0)
8+
reline (>= 0.6.0)
79
coderay (1.1.3)
8-
method_source (1.0.0)
9-
minitest (5.20.0)
10+
io-console (0.8.2)
11+
method_source (1.1.0)
12+
minitest (5.27.0)
1013
minitest-fail-fast (0.1.0)
1114
minitest (~> 5)
12-
minitest-hooks (1.5.1)
15+
minitest-hooks (1.5.3)
1316
minitest (> 5.3)
14-
minitest-reporters (1.6.1)
17+
minitest-reporters (1.8.0)
1518
ansi
1619
builder
17-
minitest (>= 5.0)
20+
minitest (>= 5.0, < 7)
1821
ruby-progressbar
19-
minitest-retry (0.2.2)
22+
minitest-retry (0.3.1)
2023
minitest (>= 5.0)
21-
mysql2 (0.5.5)
22-
pry (0.14.2)
24+
mutex_m (0.3.0)
25+
mysql2 (0.5.7)
26+
bigdecimal
27+
pry (0.16.0)
2328
coderay (~> 1.1)
2429
method_source (~> 1.0)
25-
pry-byebug (3.10.1)
26-
byebug (~> 11.0)
27-
pry (>= 0.13, < 0.15)
28-
rake (13.2.1)
30+
reline (>= 0.6.0)
31+
pry-byebug (3.12.0)
32+
byebug (~> 13.0)
33+
pry (>= 0.13, < 0.17)
34+
rake (13.4.1)
35+
reline (0.6.3)
36+
io-console (~> 0.5)
2937
ruby-progressbar (1.13.0)
3038
tqdm (0.4.1)
31-
webrick (1.8.2)
39+
webrick (1.9.2)
3240

3341
PLATFORMS
3442
ruby
@@ -39,11 +47,12 @@ DEPENDENCIES
3947
minitest-hooks
4048
minitest-reporters (~> 1.4)
4149
minitest-retry
50+
mutex_m (~> 0.3.0)
4251
mysql2
4352
pry-byebug
4453
rake
4554
tqdm
4655
webrick
4756

4857
BUNDLED WITH
49-
2.2.22
58+
4.0.10

dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ up:
99
- ruby
1010
- bundler
1111
- go:
12-
version: "1.24.1"
12+
version: "1.26.2"
1313
- podman
1414
- custom:
1515
name: Go Dependencies

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/Shopify/ghostferry
22

3-
go 1.24.1
3+
go 1.26.2
44

55
require (
66
github.com/DataDog/datadog-go v4.8.2+incompatible

test/integration/interrupt_resume_test.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ def test_interrupt_resume_without_writes_to_source_to_check_target_state_when_in
1919

2020
result = target_db.query("SELECT COUNT(*) AS cnt FROM #{DEFAULT_FULL_TABLE_NAME}")
2121
count = result.first["cnt"]
22-
assert_equal 200, count
22+
# TERM is delivered asynchronously so the signal may arrive after the
23+
# second batch has already been written. At least one batch (200 rows)
24+
# must have been copied; more is also acceptable as we are verifying
25+
# the last_successful_id later on against the dumped state.
26+
assert_operator count, :>=, 200
2327

2428
result = target_db.query("SELECT MAX(id) AS max_id FROM #{DEFAULT_FULL_TABLE_NAME}")
2529
last_successful_id = result.first["max_id"]
@@ -701,7 +705,10 @@ def test_interrupt_resume_without_writes_to_source_with_uuid_table
701705

702706
result = target_db.query("SELECT COUNT(*) AS cnt FROM #{UUID_FULL_TABLE_NAME}")
703707
count = result.first["cnt"]
704-
assert_equal 200, count
708+
# Same as the integer-keyed variant: TERM is async so at least one batch
709+
# (200 rows) must be copied; a second batch landing first is also valid.
710+
# We are verifying the last_successful_id_bytes later on against the dumped state.
711+
assert_operator count, :>=, 200
705712

706713
result = target_db.query("SELECT MAX(uuid) AS max_id FROM #{UUID_FULL_TABLE_NAME}")
707714
last_successful_id_bytes = result.first["max_id"]

0 commit comments

Comments
 (0)