|
1 | 1 | # Measure how long a quiet connection to the render service survives, from a CI runner. |
2 | 2 | # |
3 | 3 | # The equipment under suspicion is the runner's own outbound network, so this has to run |
4 | | -# here rather than on a developer machine. It is started by hand: it holds connections open |
5 | | -# for several minutes at a time and has no reason to run on a push. |
| 4 | +# here rather than on a developer machine. |
6 | 5 | # |
7 | | -# It needs the /connection_hold endpoint, which lives on the testing deployment only. |
| 6 | +# It holds connections open for several minutes at a time, so it runs only for the branch |
| 7 | +# it belongs to and never for any other. It needs the /connection_hold endpoint, which |
| 8 | +# lives on the testing deployment only. |
8 | 9 | name: Probe connection hold |
9 | 10 |
|
10 | 11 | on: |
| 12 | + # A workflow is only offered as a manual run once it is on the default branch, and this |
| 13 | + # one is not meant to live there. Pushing the branch runs it, which is enough to measure |
| 14 | + # from a runner. Re-run it from the Actions page to measure again without a new commit. |
| 15 | + push: |
| 16 | + branches: |
| 17 | + - chore/probe-connection-hold |
11 | 18 | workflow_dispatch: |
12 | 19 | inputs: |
13 | 20 | api: |
@@ -50,11 +57,15 @@ jobs: |
50 | 57 | - name: Probe |
51 | 58 | env: |
52 | 59 | CODEPLAIN_API_KEY: ${{ secrets.CODEPLAIN_API_KEY }} |
| 60 | + # A push carries no inputs, so each one falls back to its default. |
| 61 | + API: ${{ inputs.api || 'https://api.test.codeplain.ai' }} |
| 62 | + DELAYS: ${{ inputs.delays || '60,180,240,300,420,540' }} |
| 63 | + REPEATS: ${{ inputs.repeats || '3' }} |
53 | 64 | run: | |
54 | 65 | python ops/probe_connection_hold.py \ |
55 | | - --api "${{ inputs.api }}" \ |
56 | | - --delays "${{ inputs.delays }}" \ |
57 | | - --repeats "${{ inputs.repeats }}" \ |
| 66 | + --api "$API" \ |
| 67 | + --delays "$DELAYS" \ |
| 68 | + --repeats "$REPEATS" \ |
58 | 69 | --json-out probe-results.json |
59 | 70 |
|
60 | 71 | - name: Keep the measurements |
|
0 commit comments