Skip to content

Conversation

pull[bot]
Copy link

@pull pull bot commented Aug 12, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.3)

Can you help keep this open source service alive? 💖 Please sponsor : )

ethanndickson and others added 4 commits August 12, 2025 22:02
Service accounts got deleted, oops
Breaking change: Field types in `codersdk.UpdateTemplateMeta` for
`Icon`, `Description`, and `DisplayName` moved to `*string`

## Summary

In this pull request we're updating the `UpdateTemplateMeta` struct to
allow `DisplayName`, `Description`, and `Icon` to be set as empty `""`
or default to the value from the template if not provided in an update
call.

Fixes #19036

### The bug

The reported bug occurred when clients were attempting to update a
metadata field in a template via an edit call. When the request was
decoded into an `UpdateTemplateMeta` struct the default values for
fields in the struct were used to update the template even if they
weren't provided. This led to fields like `Icon` being set to `""` (the
default value).

### Changes

To allow for specific fields to be set to `""` these fields were updated
to be `*string` as opposed to `string`. This allows for clients to set
these fields as `""` in an update request or they will default to the
template value if they are not provided in the update request (will be
`nil`).

Added tests to confirm empty and nil values and updated other tests that
use these fields.
@pull pull bot locked and limited conversation to collaborators Aug 12, 2025
@pull pull bot added the ⤵️ pull label Aug 12, 2025
@pull pull bot merged commit aab2ccd into jango-blockchained:main Aug 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants