Skip to content

Commit 4ee441a

Browse files
committed
Polt: MySQL archiver, initial commit
0 parents  commit 4ee441a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+7238
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: MySQL 8.0 Build and Run /w docker-compose
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Build and Run Polt
15+
run: docker compose up mysql buildandrun --abort-on-container-exit
16+
working-directory: compose

.github/workflows/linter.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
tags:
5+
- v*
6+
branches:
7+
- master
8+
- main
9+
pull_request:
10+
permissions:
11+
contents: read
12+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
13+
# pull-requests: read
14+
jobs:
15+
golangci:
16+
name: lint
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
- name: Init Hermit
22+
run: ./bin/hermit env -r >> $GITHUB_ENV
23+
- name: golangci-lint
24+
run: golangci-lint run --timeout 3m0s
25+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: MySQL 8.0.28 (Aurora version) /w docker-compose
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Test
15+
run: docker compose -f compose.yml -f 8.0.28.yml up mysql test --abort-on-container-exit
16+
working-directory: compose
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: MySQL 8.0.28 (with replicas) /w docker-compose
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Test
15+
run: docker compose -f compose.yml -f 8.0.28.yml up mysql mysql_replica test --abort-on-container-exit
16+
working-directory: compose/replication
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: MySQL 8.0.32 (Aurora version) /w docker-compose
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Test
15+
run: docker compose -f compose.yml -f 8.0.32.yml up mysql test --abort-on-container-exit
16+
working-directory: compose
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: MySQL 8.0.34 (Aurora version) /w docker-compose
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Test
15+
run: docker compose -f compose.yml up mysql test --abort-on-container-exit
16+
working-directory: compose
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: MySQL 8.0.34 (with replicas) /w docker-compose
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
14+
- name: Test
15+
run: docker compose -f compose.yml up mysql mysql_replica test --abort-on-container-exit
16+
working-directory: compose/replication

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
*.parquet
8+
cover.html
9+
cmd/polt/polt
10+
.DS_store
11+
12+
# Test binary, built with `go test -c`
13+
*.test
14+
15+
# Output of the go coverage tool, specifically when used with LiteIDE
16+
*.out
17+
18+
# Dependency directories (remove the comment below to include it)
19+
# vendor/

.golangci.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
run:
2+
tests: true
3+
4+
output:
5+
print-issued-lines: false
6+
7+
linters:
8+
enable-all: true
9+
disable:
10+
- gomoddirectives
11+
- exhaustruct
12+
- funlen
13+
- gci
14+
- gochecknoglobals
15+
- gocritic
16+
- gofumpt
17+
- gomnd
18+
- gosec
19+
- lll
20+
- mnd
21+
- paralleltest
22+
- testpackage
23+
- varnamelen
24+
- wrapcheck
25+
- wsl
26+
- depguard
27+
- tagalign
28+
- tagliatelle
29+
- ireturn
30+
- godox
31+
- err113
32+
- execinquery
33+
34+
issues:
35+
max-per-linter: 0
36+
max-same: 0

CONTRIBUTING.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing
2+
3+
We're excited to hear that you are interested in contributing to Polt!
4+
5+
Before you spend too much time, we encourage you to read our _philosophy_ and _housekeeping_ rules that are laid out in this document.
6+
7+
## Philosophy
8+
9+
Because the _consequences_ of bugs in Polt are serious (data loss), we may be hesitant to add new features that do not overlap with our use case. This is because:
10+
11+
1. These features will naturally receive less testing.
12+
2. They could complicate code leading to the introduction of other bugs.
13+
3. They may also paint us into a corner, because a future feature that we want to introduce must account for a feature that we do not use.
14+
15+
We require new features to be _safe_ and _designed to be enabled by default_:
16+
17+
* By _safe_, we mean that the feature is not an optimization that could cause potential data loss. Since our workloads are for financial systems, we do not have a use-case for such optimizations.
18+
* By _enabled by default_, our experience with previous projects is that non-default configuration options are not always well tested by test-suites and testing interactions between configuration settings is difficult. We also believe in the [Wordpress philosophy](https://wordpress.org/about/philosophy/) of "Decisions, not options".
19+
20+
We apologize in advance that _our use case_ may seem arbitrary, because we do in-fact have multiple use cases. But the general rule is: AWS, MySQL 8.0 (Aurora), only InnoDB. Please create an issue first to discuss your new feature so that we can confirm that it is a good fit.
21+
22+
## Housekeeping
23+
24+
In terms of housekeeping:
25+
26+
1. Please create a new issue for your feature or bug.
27+
2. After some initial discussion, go ahead and fork and clone the polt repository.
28+
3. Link to the original issue in your PR request.
29+
4. Your PR request should contain new tests for your code, including any documentation.
30+
5. Try and keep your PR as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.

0 commit comments

Comments
 (0)