Skip to content

Commit

Permalink
Unblock CI (#219)
Browse files Browse the repository at this point in the history
* Bump CI os and Python versions

The integration tests use Python 3.8 / ubuntu 20.04. The problem is
that k8s-snap tests use type specifiers that require Python 3.10.

For this reason, we'll switch to Python 3.10 / ubuntu 22.04.

* Install lxd using k8s-snap composite action

This simplifies the gh workflows and also applies the Docker
iptables workaround.

* Use self-hosted runners

k8s-snap switched to self-hosted CI runners as the default Github
ones didn't have enough resources.

We'll update the k8s-dqlite CI job to use self-hosted runners as
well when running k8s-snap integration tests.

* Fix r install

* Remove "get" checks

The e2e tests are currently failing because of this k8s-dqlite error:

  k8s.k8s-dqlite[1947]: time="2025-01-09T15:00:22Z" level=error
  msg="error while range on /registry/clusterroles/system:aggregate-to-view :
  unexpected limit: want 0, got 1"

A separate PR is removing this check: #212

That being considered, we'll apply this change here to unblock
the CI.

* fix self-hosted runner tag
  • Loading branch information
petrutlucian94 authored Jan 10, 2025
1 parent 0d2b3cc commit 1d267b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/k8s-snap-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ concurrency:
jobs:
build:
name: K8s-snap Integration Test
runs-on: ubuntu-20.04
runs-on: self-hosted-linux-amd64-jammy-large

steps:
- name: Checking out repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.10"
- name: Install tox
run: pip install tox
- name: Install Go
Expand All @@ -34,11 +34,7 @@ jobs:
run: |
sudo snap download k8s --channel=latest/edge --basename k8s
- name: Install lxd
run: |
sudo snap refresh lxd --channel 5.21/stable
sudo lxd init --auto
sudo usermod --append --groups lxd $USER
sg lxd -c 'lxc version'
uses: canonical/k8s-snap/.github/actions/install-lxd@main
- name: Build k8s-dqlite
run: |
make static
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
jobs:
build:
name: K8s-snap Performance Test
runs-on: ubuntu-20.04
runs-on: self-hosted-linux-amd64-jammy-large
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
Expand All @@ -42,20 +42,10 @@ jobs:
go-version: "1.22"
- name: Set-up R
run: |
sudo apt install r-base
sudo apt-get install -y r-base
sudo Rscript -e 'install.packages(c("ggplot2", "dplyr", "optparse"), repos="https://cloud.r-project.org")'
- name: Install lxd
run: |
sudo snap refresh lxd --channel 5.21/stable
sudo lxd init --auto
sudo usermod --append --groups lxd $USER
sg lxd -c 'lxc version'
- name: Ensure lxd network traffic flows by removing docker if installed
run: |
if command -v docker >/dev/null 2>&1; then
echo "Docker is installed, purging it"
sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli containerd runc
fi
uses: canonical/k8s-snap/.github/actions/install-lxd@main
- name: Download latest k8s-snap
run: |
sudo snap download k8s --channel=latest/edge --basename k8s
Expand Down
7 changes: 0 additions & 7 deletions pkg/kine/server/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ func (l *LimitedServer) get(ctx context.Context, r *etcdserverpb.RangeRequest) (
attribute.Int64("revision", r.Revision),
)

if len(r.RangeEnd) != 0 {
return nil, fmt.Errorf("unexpected rangeEnd: want empty, got %s", r.RangeEnd)
}
if r.Limit != 0 {
return nil, fmt.Errorf("unexpected limit: want 0, got %d", r.Limit)
}

rev, kv, err := l.backend.List(ctx, string(r.Key), "", 1, r.Revision)
if err != nil {
return nil, err
Expand Down

0 comments on commit 1d267b0

Please sign in to comment.