Add read handler to uv_send to detect remote socket close faster #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Downstream | |
on: | |
push: | |
tags: | |
- '**' | |
pull_request: | |
types: [ labeled, opened, synchronize, reopened ] | |
jobs: | |
cowsql: | |
if: contains(github.event.pull_request.labels.*.name, 'downstream') | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install apt deps | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -qq automake libtool gcc make libuv1-dev libsqlite3-dev | |
- name: Check out raft | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.number }}/head | |
path: raft | |
- name: Install raft | |
run: | | |
cd raft | |
autoreconf -i | |
./configure --prefix=/usr --enable-debug --enable-uv --enable-sanitize --enable-backtrace | |
sudo make -j$(nproc) install | |
- name: Check out cowsql | |
uses: actions/checkout@v3 | |
with: | |
repository: cowsql/cowsql | |
path: cowsql | |
- name: Test and install cowsql | |
run: | | |
cd cowsql | |
autoreconf -i | |
./configure --prefix=/usr --enable-debug --enable-sanitize --enable-backtrace | |
sudo make -j$(nproc) check || (cat ./test-suite.log && false) | |
sudo make install | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
- name: Check out go-cowsql | |
uses: actions/checkout@v3 | |
with: | |
repository: cowsql/go-cowsql | |
path: go-cowsql | |
- name: Test go-cowsql | |
env: | |
GO_DQLITE_MULTITHREAD: '1' | |
run: | | |
cd go-cowsql | |
go get -tags libsqlite3 -t ./... | |
go test -asan -v ./... | |
VERBOSE=1 ASAN=-asan ./test/cowsql-demo.sh | |
VERBOSE=1 ASAN=-asan ./test/roles.sh | |
VERBOSE=1 ASAN=-asan ./test/recover.sh | |
dqlite: | |
if: contains(github.event.pull_request.labels.*.name, 'downstream') | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install apt deps | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -qq automake libtool gcc make libuv1-dev libsqlite3-dev | |
- name: Check out raft | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.number }}/head | |
path: raft | |
- name: Install raft | |
run: | | |
cd raft | |
autoreconf -i | |
./configure --prefix=/usr --enable-debug --enable-uv --enable-sanitize --enable-backtrace | |
sudo make -j$(nproc) install | |
- name: Check out dqlite | |
uses: actions/checkout@v3 | |
with: | |
repository: canonical/dqlite | |
ref: v1.16.0 | |
path: dqlite | |
- name: Test and install dqlite | |
run: | | |
cd dqlite | |
autoreconf -i | |
./configure --prefix=/usr --enable-debug --enable-sanitize --enable-backtrace | |
sudo make -j$(nproc) check || (cat ./test-suite.log && false) | |
sudo make install | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
- name: Check out go-dqlite | |
uses: actions/checkout@v3 | |
with: | |
repository: canonical/go-dqlite | |
path: go-dqlite | |
- name: Test go-dqlite | |
env: | |
GO_DQLITE_MULTITHREAD: '1' | |
run: | | |
cd go-dqlite | |
go get -tags libsqlite3 -t ./... | |
go test -asan -v ./... | |
VERBOSE=1 ASAN=-asan ./test/dqlite-demo.sh | |
VERBOSE=1 ASAN=-asan ./test/roles.sh | |
VERBOSE=1 ASAN=-asan ./test/recover.sh | |
incus: | |
if: contains(github.event.pull_request.labels.*.name, 'downstream') | |
runs-on: ubuntu-22.04 | |
env: | |
CGO_LDFLAGS_ALLOW: "(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" | |
INCUS_SHIFTFS_DISABLE: "true" | |
INCUS_VERBOSE: "1" | |
INCUS_OFFLINE: "1" | |
INCUS_TMPFS: "1" | |
INCUS_REQUIRED_TESTS: "test_storage_buckets" | |
strategy: | |
fail-fast: false | |
matrix: | |
suite: ["cluster", "standalone"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: lxc/incus | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
- name: Install dependencies | |
run: | | |
set -x | |
sudo add-apt-repository ppa:ubuntu-lxc/lxc-git-master -y --no-update | |
sudo apt-get update | |
sudo snap remove lxd --purge | |
sudo snap remove core20 --purge || true | |
sudo apt-get autopurge moby-containerd docker uidmap -y | |
sudo ip link delete docker0 | |
sudo nft flush ruleset | |
sudo systemctl mask lxc.service | |
sudo systemctl mask lxc-net.service | |
sudo apt-get install --no-install-recommends -y \ | |
curl \ | |
git \ | |
libacl1-dev \ | |
libcap-dev \ | |
libdbus-1-dev \ | |
liblxc-dev \ | |
libseccomp-dev \ | |
libselinux-dev \ | |
libsqlite3-dev \ | |
libtool \ | |
libudev-dev \ | |
libuv1-dev \ | |
automake \ | |
make \ | |
pkg-config\ | |
acl \ | |
attr \ | |
bind9-dnsutils \ | |
btrfs-progs \ | |
busybox-static \ | |
dnsmasq-base \ | |
easy-rsa \ | |
gettext \ | |
jq \ | |
lxc-utils \ | |
lvm2 \ | |
nftables \ | |
quota \ | |
rsync \ | |
s3cmd \ | |
socat \ | |
sqlite3 \ | |
squashfs-tools \ | |
tar \ | |
tcl \ | |
thin-provisioning-tools \ | |
uuid-runtime \ | |
xfsprogs \ | |
xz-utils \ | |
zfsutils-linux | |
# reclaim some space | |
sudo apt-get clean | |
# Download minio. | |
curl -sSfL https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20240116160738.0.0_amd64.deb --output /tmp/minio.deb | |
sudo apt-get install /tmp/minio.deb --yes | |
# Download MinIO client | |
curl -sSfL https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2024-01-16T16-06-34Z --output /tmp/mc | |
sudo mv /tmp/mc /usr/local/bin/ | |
sudo chmod +x /usr/local/bin/mc | |
# Download latest release of openfga server. | |
mkdir -p "$(go env GOPATH)/bin" | |
curl -sSfL https://api.github.com/repos/openfga/openfga/releases/latest | jq -r '.assets | .[] | .browser_download_url | select(. | test("_linux_amd64.tar.gz$"))' | xargs -I {} curl -sSfL {} -o openfga.tar.gz | |
tar -xzf openfga.tar.gz -C "$(go env GOPATH)/bin/" | |
# Download latest release of openfga cli. | |
curl -sSfL https://api.github.com/repos/openfga/cli/releases/latest | jq -r '.assets | .[] | .browser_download_url | select(. | test("_linux_amd64.tar.gz$"))' | xargs -I {} curl -sSfL {} -o fga.tar.gz | |
tar -xzf fga.tar.gz -C "$(go env GOPATH)/bin/" | |
- name: Check out raft | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.number }}/head | |
path: raft | |
- name: Install raft | |
run: | | |
cd raft | |
autoreconf -i | |
./configure --prefix=/usr --enable-debug --enable-backtrace | |
sudo make -j$(nproc) install | |
- name: Check out cowsql | |
uses: actions/checkout@v3 | |
with: | |
repository: cowsql/cowsql | |
path: cowsql | |
- name: Install cowsql | |
run: | | |
cd cowsql | |
autoreconf -i | |
./configure --prefix=/usr --enable-debug --enable-backtrace | |
sudo make -j$(nproc) install | |
- name: Download go dependencies | |
run: | | |
go mod download | |
- name: Run Incus build | |
run: | | |
make | |
- name: "Run system tests" | |
run: | | |
chmod +x ~ | |
echo "root:1000000:1000000000" | sudo tee /etc/subuid /etc/subgid | |
cd test | |
sudo --preserve-env=PATH,GOPATH,GITHUB_ACTIONS,INCUS_VERBOSE,INCUS_BACKEND,INCUS_OFFLINE,INCUS_SKIP_TESTS,INCUS_REQUIRED_TESTS,INCUS_SHIFTFS_DISABLE INCUS_BACKEND=dir ./main.sh ${{ matrix.suite }} | |
jepsen: | |
if: contains(github.event.pull_request.labels.*.name, 'downstream') | |
uses: cowsql/jepsen.cowsql/.github/workflows/test-build-run.yml@main | |
with: | |
raft-ref: refs/pull/${{ github.event.number }}/head | |
workloads: > | |
['append', 'bank', 'set'] | |
nemeses: > | |
['none', 'partition', 'kill', 'stop', 'disk', 'member', | |
'partition,stop', 'partition,kill', 'partition,member', | |
'packet,stop', 'pause'] |