Skip to content

Commit 5810e9b

Browse files
Merge branch 'main' into sabrina/manifest-bundle
2 parents e5ece24 + 5f44c0a commit 5810e9b

109 files changed

Lines changed: 2190 additions & 994 deletions

File tree

Some content is hidden

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

.github/actions/build-and-test/action.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ runs:
3434
3535
- name: Build
3636
shell: bash
37-
run: nix develop --command make build
37+
run: make build
3838

3939
- name: Test
4040
shell: bash
41-
run: nix develop --command make test
41+
run: make test
4242

4343
- name: Build the Docker image
4444
shell: bash
45-
run: nix develop --command make docker-build
45+
run: make docker-build
4646

4747
- name: Deploy controller to local cluster
4848
shell: bash
@@ -57,7 +57,7 @@ runs:
5757
kubectl create ns e2e || true
5858
5959
# deploy ngrok-op for e2e tests
60-
nix develop --command make deploy_for_e2e
60+
make deploy_for_e2e
6161
6262
- name: Check if operator is up
6363
shell: bash
@@ -71,7 +71,7 @@ runs:
7171
- name: Run e2e tests
7272
shell: bash
7373
if: ${{ inputs.run-e2e == 'true' }}
74-
run: nix develop --command make e2e-tests
74+
run: make e2e-tests
7575

7676
# best effort to remove ngrok k8s resources from cluster
7777
# this allows our finalizers to delete upstream ngrok API resources too
@@ -80,4 +80,4 @@ runs:
8080
shell: bash
8181
if: ${{ always() && inputs.run-e2e == 'true' }}
8282
run: |
83-
nix develop --command make e2e-clean
83+
make e2e-clean
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Action - Nix Setup
2+
description: "Sets up Nix with caching and puts tools in PATH for use in later steps"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34
8+
- uses: DeterminateSystems/magic-nix-cache-action@b8276522d77f21bf19d3574e5bc99186a6c7aa6c
9+
- name: Install direnv
10+
shell: bash
11+
run: |
12+
DIRENV_VERSION="2.37.1"
13+
DIRENV_SHA256="1f1b93dd6f38523fde26dfac96151ef9d31a374e3005cd3345fb93555ae0c9b5"
14+
curl -sfL "https://github.com/direnv/direnv/releases/download/v${DIRENV_VERSION}/direnv.linux-amd64" -o /tmp/direnv
15+
echo "${DIRENV_SHA256} /tmp/direnv" | sha256sum -c
16+
chmod +x /tmp/direnv
17+
mkdir -p "$HOME/.local/bin"
18+
mv /tmp/direnv "$HOME/.local/bin/direnv"
19+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
20+
export PATH="$HOME/.local/bin:$PATH"
21+
- name: Allow direnv and export environment variables
22+
shell: bash
23+
run: |
24+
direnv allow .
25+
direnv export gha >> "$GITHUB_ENV"
26+

.github/agents/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@ This directory contains custom GitHub Copilot agents that provide specialized as
44

55
## Available Agents
66

7+
### Test Agent (`test-agent.agent.md`)
8+
9+
A specialized AI agent with expert knowledge of testing the ngrok Kubernetes Operator. It writes new tests following best practices, finds and fixes flaky tests, and verifies new tests are stable and well-structured.
10+
11+
**What it does:**
12+
- Writes new tests following Ginkgo v2 / Gomega best practices for this codebase
13+
- Verifies new tests are stable by running them repeatedly (`--repeat=N`) and with `-race`
14+
- Reproduces flaky test failures and identifies root causes: missing `Eventually`, race conditions, shared state, insufficient timeouts
15+
- Prefers fixing test code over production code unless a real bug is demonstrated
16+
- Confirms fixes are stable by re-running tests multiple times
17+
18+
**How to use it:**
19+
20+
```
21+
@test-agent write tests for the new MyController in internal/controller/ngrok
22+
```
23+
24+
```
25+
@test-agent investigate why TestFooController is flaky
26+
```
27+
28+
```
29+
@test-agent verify that the new tests I just added are not flaky
30+
```
31+
32+
The agent will:
33+
1. Analyze the code and existing test patterns
34+
2. Write or fix tests following codebase conventions
35+
3. Run tests repeatedly to confirm stability
36+
4. Fix any flakiness found before finishing
37+
38+
---
39+
740
### Release Agent (`release-agent.agent.md`)
841

942
A specialized AI agent that automates the release process for the ngrok Kubernetes Operator.

0 commit comments

Comments
 (0)