Skip to content

Commit 38d4d07

Browse files
authored
Merge branch 'main' into fix/websocket-keepalive
2 parents 4098452 + 8c728c6 commit 38d4d07

56 files changed

Lines changed: 2712 additions & 309 deletions

Some content is hidden

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

‎.github/workflows/acceptance.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
- name: Set up Go
102102
uses: actions/setup-go@v3
103103
with:
104-
go-version: "1.26.10"
104+
go-version: "1.26.11"
105105

106106
- name: Run Go Acceptance Tests (slice ${{ matrix.slice }})
107107
# 30m, not 12m: slice 0 timed out at exactly 720s once the MCP tests
@@ -133,7 +133,7 @@ jobs:
133133
- name: Set up Go
134134
uses: actions/setup-go@v3
135135
with:
136-
go-version: "1.26.10"
136+
go-version: "1.26.11"
137137

138138
- name: Run telemetry acceptance tests
139139
run: go test -tags=telemetry ./test/acceptance/... -v -timeout 12m

‎.github/workflows/dependabot_pr.yml‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

‎.github/workflows/outpost-live.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up Go
3131
uses: actions/setup-go@v3
3232
with:
33-
go-version: "1.26.10"
33+
go-version: "1.26.11"
3434

3535
# The tests skip themselves when the key is absent, which is right for a
3636
# developer machine and wrong here: a missing secret would turn this job

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Go
2525
uses: actions/setup-go@v5
2626
with:
27-
go-version: 1.26.10
27+
go-version: 1.26.11
2828
- name: Run GoReleaser
2929
uses: goreleaser/goreleaser-action@v5
3030
with:
@@ -56,7 +56,7 @@ jobs:
5656
- name: Set up Go
5757
uses: actions/setup-go@v5
5858
with:
59-
go-version: 1.26.10
59+
go-version: 1.26.11
6060
- name: Run GoReleaser
6161
uses: goreleaser/goreleaser-action@v5
6262
with:
@@ -76,7 +76,7 @@ jobs:
7676
- name: Set up Go
7777
uses: actions/setup-go@v5
7878
with:
79-
go-version: 1.26.10
79+
go-version: 1.26.11
8080
- name: Run GoReleaser
8181
uses: goreleaser/goreleaser-action@v5
8282
with:
@@ -151,7 +151,7 @@ jobs:
151151
- name: Set up Go
152152
uses: actions/setup-go@v5
153153
with:
154-
go-version: 1.26.10
154+
go-version: 1.26.11
155155

156156
- name: Build npm binaries with GoReleaser
157157
uses: goreleaser/goreleaser-action@v5

‎.github/workflows/test-npm-build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v5
1818
with:
19-
go-version: 1.26.10
19+
go-version: 1.26.11
2020

2121
- name: Set up Node.js
2222
uses: actions/setup-node@v4

‎.github/workflows/test.yml‎

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: test
22

33
on:
4-
workflow_run:
5-
workflows: ["Dependabot PR Check"]
6-
types:
7-
- completed
4+
# No workflow_run trigger. It used to run this workflow again after the
5+
# "Dependabot PR Check" workflow, to give build-linux the Docker Hub secrets
6+
# that Dependabot's pull_request runs do not get. But a workflow_run run
7+
# checks out the default branch, not the PR, so it never built the
8+
# dependency bump. Checking out the PR there instead would build untrusted
9+
# code with secrets. build-linux now runs on pull_request without secrets.
810
pull_request:
911
branches:
1012
- main
@@ -27,7 +29,7 @@ jobs:
2729
- name: Set up Go
2830
uses: actions/setup-go@v5
2931
with:
30-
go-version: 1.26.10
32+
go-version: 1.26.11
3133
- name: Run unit tests
3234
run: go test -short ./pkg/...
3335
# `go test` runs a reduced vet suite (printf, bools, atomic and a few
@@ -50,7 +52,7 @@ jobs:
5052
- name: Set up Go
5153
uses: actions/setup-go@v5
5254
with:
53-
go-version: 1.26.10
55+
go-version: 1.26.11
5456
- name: Run govulncheck
5557
# Pinned rather than @latest: a new govulncheck release could change
5658
# behaviour or fail this job with no change to the repo. Bump
@@ -70,7 +72,7 @@ jobs:
7072
- name: Set up Go
7173
uses: actions/setup-go@v5
7274
with:
73-
go-version: 1.26.10
75+
go-version: 1.26.11
7476
- name: Run GoReleaser
7577
uses: goreleaser/goreleaser-action@v5
7678
with:
@@ -79,9 +81,14 @@ jobs:
7981
env:
8082
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
8183

84+
# Runs on every pull request, including Dependabot and fork PRs, which get no
85+
# secrets. A --snapshot build never pushes images ("snapshot build: will not
86+
# push any images"), so Docker Hub credentials are only used to authenticate
87+
# the pull of the public alpine base image. Log in when they are available and
88+
# pull anonymously when they are not, rather than skipping the job: a skipped
89+
# required check counts as passing.
8290
build-linux:
8391
runs-on: ubuntu-latest
84-
if: ${{ github.actor != 'dependabot[bot]' || github.event.workflow_run.conclusion == 'success' }}
8592
env:
8693
# https://goreleaser.com/customization/docker_manifest/
8794
DOCKER_CLI_EXPERIMENTAL: "enabled"
@@ -90,7 +97,20 @@ jobs:
9097
uses: actions/checkout@v4
9198
with:
9299
fetch-depth: 0
100+
# A step's `if` cannot read `secrets` directly, so check for them here.
101+
- name: Check for Docker Hub credentials
102+
id: docker-creds
103+
env:
104+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
105+
run: |
106+
if [ -n "$DOCKER_USERNAME" ]; then
107+
echo "available=true" >> "$GITHUB_OUTPUT"
108+
else
109+
echo "available=false" >> "$GITHUB_OUTPUT"
110+
echo "::notice::No Docker Hub credentials in this run (Dependabot or fork PR); pulling base images anonymously."
111+
fi
93112
- name: Docker Login
113+
if: steps.docker-creds.outputs.available == 'true'
94114
uses: docker/login-action@v3
95115
with:
96116
username: ${{ secrets.DOCKER_USERNAME }}
@@ -102,7 +122,7 @@ jobs:
102122
- name: Set up Go
103123
uses: actions/setup-go@v5
104124
with:
105-
go-version: 1.26.10
125+
go-version: 1.26.11
106126
- name: Run GoReleaser
107127
uses: goreleaser/goreleaser-action@v5
108128
with:
@@ -121,7 +141,7 @@ jobs:
121141
- name: Set up Go
122142
uses: actions/setup-go@v5
123143
with:
124-
go-version: 1.26.10
144+
go-version: 1.26.11
125145
- name: Run GoReleaser
126146
uses: goreleaser/goreleaser-action@v5
127147
with:

‎KNOWN_ISSUES.md‎

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,58 @@
11
# Known Issues
22

3+
## `--rule-transform-name` with an ID or a mistyped name attaches an empty transformation
4+
5+
**Symptom:** `hookdeck gateway connection create`, `update` or `upsert` with `--rule-transform-name`
6+
set to a transformation ID, or to a name that doesn't exist, succeeds, but every event on the
7+
connection then fails its transformation with a `TypeError`.
8+
9+
**Why:** The CLI always sent the value as a transformation name. When no transformation has that
10+
name, the API creates one, even with no code, so the connection got a new, empty transformation
11+
instead of the one you meant.
12+
13+
**Affected:** v3.1.0 and earlier.
14+
15+
**Recommended fix:** Update to **v3.2.0 or later**. The value is then resolved as an ID or an exact
16+
name, and an unknown value without `--rule-transform-code` is an error.
17+
18+
- npm: `npm install -g hookdeck-cli@latest`
19+
- Homebrew: `brew upgrade hookdeck`
20+
21+
**Workaround (until you update):** Pass the rule as JSON with `--rules` or `--rules-file`,
22+
referencing the transformation by `transformation_id`.
23+
24+
**Cleanup:** If you hit this, you have empty transformations named after an ID (`trs_...`) or a
25+
typo. Find them with `hookdeck gateway transformation list`. Point any connection that uses one at
26+
the right transformation, then delete it with `hookdeck gateway transformation delete <id>`.
27+
28+
**Tracking:** #468
29+
30+
## Connection rules built from `--rule-*` flags run in a fixed order, not the order you wrote them
31+
32+
**Symptom:** A connection created, updated or upserted with `--rule-*` flags runs its rules in a
33+
different order from the flags. For example, `--rule-filter-body … --rule-transform-name …`
34+
produces a transform rule followed by a filter rule, so the filter sees the transformed payload
35+
instead of the original one.
36+
37+
**Why:** The CLI always built rules as deduplicate, transform, filter, delay, retry, whatever the
38+
order of the flags. Filter, transform and deduplicate rules run in the order they appear in the
39+
connection's `rules` array.
40+
41+
**Affected:** v3.1.0 and earlier. `--rules` and `--rules-file` were not affected: they send the
42+
array exactly as given.
43+
44+
**Recommended fix:** Update to **v3.2.0 or later**. Rules then follow the position of each rule
45+
type's first flag. If you put filter flags before transform flags and relied on transform running
46+
first, put the transform flags first.
47+
48+
- npm: `npm install -g hookdeck-cli@latest`
49+
- Homebrew: `brew upgrade hookdeck`
50+
51+
**Workaround (until you update):** Pass the rules as JSON with `--rules` or `--rules-file`, in the
52+
order you want them to run.
53+
54+
**Tracking:** #464
55+
356
## `hookdeck listen` never prints "Connected" when output is piped or `--color off` is set
457

558
**Symptom:** `hookdeck listen` prints the connection banner and then nothing. The documented

‎README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,8 @@ $ hookdeck gateway connection create \
12191219
--rule-retry-count 3
12201220
```
12211221

1222+
Rules built from `--rule-*` flags follow the order in which each rule type's first flag appears. Filter, transform and deduplicate rules run in that order, so put `--rule-filter-*` before `--rule-transform-*` to filter on the original payload. To set the whole array explicitly, use `--rules` or `--rules-file`.
1223+
12221224
#### Configure rate limiting
12231225

12241226
Control the rate of event delivery to your destination:
@@ -1480,7 +1482,8 @@ There are also hidden flags for development and debugging (not listed in user-fa
14801482

14811483
* `--api-base`: Sets the API base URL.
14821484
* `--dashboard-base`: Sets the web dashboard base URL.
1483-
* `--console-base`: Sets the web console base URL.
1485+
* `--console-base`: Deprecated. Guest links now open Hookdeck Inspect; use `--inspect-base`.
1486+
* `--inspect-base`: Sets the Hookdeck Inspect base URL that `listen` links guest accounts to.
14841487
* `--ws-base`: Sets the Websocket base URL.
14851488

14861489
## Troubleshooting

‎REFERENCE.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ hookdeck gateway connection create [flags]
386386
| `--destination-path-forwarding-disabled` | `string` | Disable path forwarding for HTTP destinations (true/false) |
387387
| `--destination-rate-limit` | `int` | Rate limit for destination (requests per period) (default "0") |
388388
| `--destination-rate-limit-period` | `string` | Rate limit period (second, minute, hour, concurrent) |
389-
| `--destination-type` | `string` | Destination type (CLI, HTTP, MOCK) |
389+
| `--destination-type` | `string` | Destination type (CLI, HTTP, MOCK_API) |
390390
| `--destination-url` | `string` | URL for HTTP destinations |
391391
| `--name` | `string` | Connection name (required) |
392392
| `--output` | `string` | Output format (json) |
@@ -402,9 +402,9 @@ hookdeck gateway connection create [flags]
402402
| `--rule-retry-interval` | `int` | Interval between retries in milliseconds (default "0") |
403403
| `--rule-retry-response-status-codes` | `string` | Comma-separated HTTP status codes to retry on |
404404
| `--rule-retry-strategy` | `string` | Retry strategy (linear, exponential) |
405-
| `--rule-transform-code` | `string` | Transformation code (if creating inline) |
406-
| `--rule-transform-env` | `string` | JSON string representing environment variables for transformation |
407-
| `--rule-transform-name` | `string` | Name or ID of the transformation to apply |
405+
| `--rule-transform-code` | `string` | Transformation code. Creates the transformation named by `--rule-transform-name`, or replaces its code if it exists |
406+
| `--rule-transform-env` | `string` | JSON string representing environment variables for transformation. Replaces the env of an existing transformation |
407+
| `--rule-transform-name` | `string` | Name or ID of an existing transformation to apply. With `--rule-transform-code`, an existing transformation's code is replaced, or a new transformation is created with this name |
408408
| `--rules` | `string` | JSON string representing the entire rules array |
409409
| `--rules-file` | `string` | Path to a JSON file containing the rules array |
410410
| `--source-allowed-http-methods` | `string` | Comma-separated list of allowed HTTP methods (GET, POST, PUT, PATCH, DELETE) |
@@ -521,9 +521,9 @@ hookdeck gateway connection update <connection-id> [flags]
521521
| `--rule-retry-interval` | `int` | Interval between retries in milliseconds (default "0") |
522522
| `--rule-retry-response-status-codes` | `string` | Comma-separated HTTP status codes to retry on |
523523
| `--rule-retry-strategy` | `string` | Retry strategy (linear, exponential) |
524-
| `--rule-transform-code` | `string` | Transformation code (if creating inline) |
525-
| `--rule-transform-env` | `string` | JSON string representing environment variables for transformation |
526-
| `--rule-transform-name` | `string` | Name or ID of the transformation to apply |
524+
| `--rule-transform-code` | `string` | Transformation code. Creates the transformation named by `--rule-transform-name`, or replaces its code if it exists |
525+
| `--rule-transform-env` | `string` | JSON string representing environment variables for transformation. Replaces the env of an existing transformation |
526+
| `--rule-transform-name` | `string` | Name or ID of an existing transformation to apply. With `--rule-transform-code`, an existing transformation's code is replaced, or a new transformation is created with this name |
527527
| `--rules` | `string` | JSON string representing the entire rules array |
528528
| `--rules-file` | `string` | Path to a JSON file containing the rules array |
529529
| `--source-id` | `string` | Update source by ID |
@@ -645,7 +645,7 @@ hookdeck gateway connection upsert <name> [flags]
645645
| `--destination-path-forwarding-disabled` | `string` | Disable path forwarding for HTTP destinations (true/false) |
646646
| `--destination-rate-limit` | `int` | Rate limit for destination (requests per period) (default "0") |
647647
| `--destination-rate-limit-period` | `string` | Rate limit period (second, minute, hour, concurrent) |
648-
| `--destination-type` | `string` | Destination type (CLI, HTTP, MOCK) |
648+
| `--destination-type` | `string` | Destination type (CLI, HTTP, MOCK_API) |
649649
| `--destination-url` | `string` | URL for HTTP destinations |
650650
| `--dry-run` | `bool` | Preview changes without applying them |
651651
| `--output` | `string` | Output format (json) |
@@ -661,9 +661,9 @@ hookdeck gateway connection upsert <name> [flags]
661661
| `--rule-retry-interval` | `int` | Interval between retries in milliseconds (default "0") |
662662
| `--rule-retry-response-status-codes` | `string` | Comma-separated HTTP status codes to retry on |
663663
| `--rule-retry-strategy` | `string` | Retry strategy (linear, exponential) |
664-
| `--rule-transform-code` | `string` | Transformation code (if creating inline) |
665-
| `--rule-transform-env` | `string` | JSON string representing environment variables for transformation |
666-
| `--rule-transform-name` | `string` | Name or ID of the transformation to apply |
664+
| `--rule-transform-code` | `string` | Transformation code. Creates the transformation named by `--rule-transform-name`, or replaces its code if it exists |
665+
| `--rule-transform-env` | `string` | JSON string representing environment variables for transformation. Replaces the env of an existing transformation |
666+
| `--rule-transform-name` | `string` | Name or ID of an existing transformation to apply. With `--rule-transform-code`, an existing transformation's code is replaced, or a new transformation is created with this name |
667667
| `--rules` | `string` | JSON string representing the entire rules array |
668668
| `--rules-file` | `string` | Path to a JSON file containing the rules array |
669669
| `--source-allowed-http-methods` | `string` | Comma-separated list of allowed HTTP methods (GET, POST, PUT, PATCH, DELETE) |

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/stretchr/testify v1.12.1
2525
github.com/tidwall/pretty v1.2.2
2626
github.com/x-cray/logrus-prefixed-formatter v0.5.2
27-
golang.org/x/sys v0.48.0
27+
golang.org/x/sys v0.49.0
2828
golang.org/x/term v0.46.0
2929
)
3030

0 commit comments

Comments
 (0)