Skip to content

[COR2-1556] fix(catalog_entity): keep Slack channel and link fields on update - #136

Merged
EmiiFont merged 3 commits into
mainfrom
emiliofont/cor2-1556-attentive-terraform-provider
Dec 3, 2026
Merged

EmiiFont merged 3 commits into
mainfrom
emiliofont/cor2-1556-attentive-terraform-provider

Conversation

@EmiiFont

@EmiiFont EmiiFont commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #135. Linear: COR2-1556.

Problem

Updating a cortex_catalog_entity deleted a Slack channel's id and description and a link's description that were set outside Terraform, even with ignore_changes. The provider didn't read those fields, and an update writes the whole descriptor back.

Changes

  • Slack channels read and write id and description, and links read and write description. A channel needs id, name, or both. Empty strings are rejected.
  • slack.channels[].notifications_enabled defaults to false, so a channel without it no longer fails the apply.
  • Behavior change: if someone set these fields outside Terraform and doesn't ignore changes to them, the plan now shows the removal instead of the apply doing it silently. The CHANGELOG covers it.

Testing

  • Unit tests against the in-memory API, including the steps from the issue (fails on main).
  • The acceptance test now covers a channel by id and a link description.
  • Checked by hand on staging: reproduced the data loss with v0.15.0, then confirmed the fix keeps the fields, upgrades cleanly from v0.15.0 state, and plans empty after an import.

Follow-up

Updating with PATCH would also keep descriptor fields the provider doesn't model at all. That's a bigger change, so it will be its own ticket.

🤖 Generated with Claude Code

EmiiFont and others added 3 commits November 30, 2026 15:39
Update POSTs the whole descriptor, which replaces the stored one. The
provider did not read a Slack channel's id and description or a link's
description, so every update deleted them, also with ignore_changes.

Read and write these fields, make the channel name optional (a channel
needs id, name, or both), and reject empty strings, which the provider
omits on write. Default notifications_enabled to false, so a channel
without it no longer fails the apply with an inconsistent result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
name is now optional next to id, so read it like id and description: a
null name no longer crashes the provider, and a numeric name is kept as
text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ion in acceptance tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EmiiFont
EmiiFont merged commit 54d145e into main Dec 3, 2026
5 checks passed
@EmiiFont
EmiiFont deleted the emiliofont/cor2-1556-attentive-terraform-provider branch December 3, 2026 15:02
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.

cortex_catalog_entity updates delete Slack channel id/description and link description

2 participants