Skip to content

fix: apply endpoint descriptions in connection upsert - #510

Open
pcbeingused33 wants to merge 1 commit into
hookdeck:mainfrom
pcbeingused33:fix/connection-upsert-endpoint-descriptions
Open

pcbeingused33 wants to merge 1 commit into
hookdeck:mainfrom
pcbeingused33:fix/connection-upsert-endpoint-descriptions

Conversation

@pcbeingused33

Copy link
Copy Markdown
Contributor

When updating an existing connection, hookdeck gateway connection upsert ignores --source-description and --destination-description if they are the only endpoint flags. The partial-update checks omit both flags, so the PUT body only references the endpoint IDs. The partial-update builders also copy the stored descriptions.

Use the existing partial-update builders when either endpoint has a non-empty description flag. Each builder applies the supplied description to its endpoint. Endpoints without update flags continue to be referenced by ID.

The regression test captures the PUT body and checks both description updates and ID preservation when the flags are omitted. It fails on main and passes with this change. go test ./pkg/cmd -run '^TestConnectionUpsert' -count=1 passes.

AI assistance was used to prepare this change and its tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant