Skip to content

feat(provider)!: remove marketplace_panel resource and data source - #21

Open
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
feat/cozystack-1.6from
feat/cozystack-1.6-marketplace-removal
Open

feat(provider)!: remove marketplace_panel resource and data source#21
Aleksei Sviridkin (lexfrei) wants to merge 1 commit into
feat/cozystack-1.6from
feat/cozystack-1.6-marketplace-removal

Conversation

@lexfrei

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

Cozystack 1.6 deleted the dashboard.cozystack.io API group: the controller is gone and the platform migration drops the MarketplacePanel CRD during upgrade, so provider calls fail on any 1.6 cluster. This removes the cozystack_marketplace_panel resource and data source with their examples, docs and the now-empty client group declaration.

Breaking change: run terraform state rm on existing cozystack_marketplace_panel resources and drop them from configuration before upgrading.

Changes

  • Remove the cozystack_marketplace_panel resource and data source registrations and schemas
  • Remove the dashboard.cozystack.io client group declaration, which had no other consumer
  • Drop the examples, regenerate docs, update the README resource catalog

Testing

  • Unit tests pass locally (make test): the branch inherits 7 spec-coverage failures from the integration base (v1.6.1 pin bump). The sibling field-modeling PRs fix them. This diff adds zero new failures, checked against the merge base.
  • Linters pass locally (make lint)
  • Generated docs are up to date (make docs produces no diff)
  • Acceptance tests pass against a live cluster (make testacc), if applicable: not run in this pass

Documentation

  • Examples added or updated under examples/ (removed together with the resource)
  • Registry docs regenerated (make docs)
  • CHANGELOG updated (if user-facing): a consolidated v1.6 section lands with the integration PR

Checklist

  • Commit messages follow semantic format (type(scope): description)
  • No secrets or credentials in code or state
  • Breaking changes documented (see Summary)

Additional Notes

Targets the feat/cozystack-1.6 integration branch, not master.

Cozystack 1.6 deleted the dashboard.cozystack.io API group upstream:
the controller is gone and the platform migration runs kubectl delete
crd on marketplacepanels.dashboard.cozystack.io during the upgrade.
On a 1.6 cluster every cozystack_marketplace_panel call now fails
with no-matches-for-kind, so the resource and data source are removed
outright rather than deprecated.

BREAKING CHANGE: cozystack_marketplace_panel resource and data source
are gone. Practitioners must run terraform state rm on any existing
cozystack_marketplace_panel entries before upgrading the provider.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 03c5523b-a00e-4794-a979-839c69f6842a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lexfrei
Aleksei Sviridkin (lexfrei) marked this pull request as ready for review August 7, 2026 11:39

@IvanHunters IvanHunters left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

LGTM

Summary

Clean, complete removal of the cozystack_marketplace_panel resource and data source. The dashboard.cozystack.io/MarketplacePanel wiring is torn out at every layer — provider registration (provider.go Resources + DataSources), the MarketplacePanelResource() group declaration (groups.go), the two schema constructors (rawspec_schema.go), the generated docs, and both example files. README and the groups.go header comment are updated to match.

Verification

  • go build ./... -> exit 0
  • go vet ./internal/... -> exit 0
  • grep -rin "marketplace|MarketplacePanel|dashboard.cozystack.io" over *.go/*.tf/*.md: no dangling code references. The only remaining hits are benign:
    • CHANGELOG.md:23 — a historical record of what v1.4.2 shipped (accurate as history).
    • README.md:73 — states the dashboard.cozystack.io UI CRDs are deliberately not exposed; after this removal that line is more accurate, not less.
  • No acceptance/unit test referenced the removed kind, so nothing to update.
  • The removed schema constructors and MarketplacePanelResource() had exactly one caller each (the registration lines removed in the same diff) — no orphaned symbols or unused imports left behind.

Notes (non-blocking)

  1. Upgrade guidance for the breaking removal. The PR is correctly marked breaking (!). A user who already has cozystack_marketplace_panel in state will hit a "resource type not found" error on the first plan after upgrading, and must run terraform state rm for those addresses. This PR is stacked on feat/cozystack-1.6 and the branch has no 1.6 CHANGELOG section yet, so I assume release notes are centralized for the whole 1.6 stack. Please make sure the eventual 1.6 changelog/upgrade note spells out the terraform state rm cozystack_marketplace_panel.<name> step — it is the only migration action users need and it is easy to lose across a multi-PR stack.

Nothing here blocks merge.

@IvanHunters

Copy link
Copy Markdown

Verdict

LGTM with non-blocking notes

Removal of the cozystack_marketplace_panel resource and data source is complete at every registration point (provider.go Resources()/DataSources(), groups.go group declaration, both schema constructors, docs, examples), with zero dangling references found anywhere in code, tests, or examples. One documentation-accuracy gap remains in an adjacent, untouched line of README.md.

Findings

[MINOR] README.md:73, stale claim that dashboard.cozystack.io is still "shipped and reconciled by Cozystack itself"

The line reads: "Deliberately not exposed: the strategy.backups.cozystack.io per-engine backup strategies and the dashboard.cozystack.io UI-customization CRDs (Sidebar, Navigation, Factory, ...) - platform internals shipped and reconciled by Cozystack itself, with no Infrastructure-as-Code use case." I verified against the pinned cozystack/cozystack v1.6.1 tag (the exact version this PR's integration branch bumps to, per the merge-base commit) that migration packages/core/platform/images/migrations/migrations/40 deletes ALL eleven dashboard.cozystack.io CRDs (breadcrumbs, breadcrumbsinside, cfomappings, customcolumnsoverrides, customformsoverrides, customformsprefills, factories, marketplacepanels, navigations, sidebars, tableurimappings), and its own comment states "the dashboard controller ... is no longer part of Cozystack." So on the exact target version, Sidebar/Navigation/Factory are not "platform internals shipped and reconciled by Cozystack itself": there is nothing left to reconcile, the whole group and its controller are gone, matching this PR's own stated premise for removing marketplace_panel. This is the one line in this file that the diff does not touch, immediately below the two edits this PR does make in the same file (the "Backups and dashboard" to "Backups" header rename and the removed catalog row). Fix: reword or drop the dashboard.cozystack.io mention, e.g. "Deliberately not exposed: the strategy.backups.cozystack.io per-engine backup strategies, platform internals with no Infrastructure-as-Code use case. (dashboard.cozystack.io was retired outright in Cozystack 1.6.)"

Claim mismatches

[UNVERIFIABLE] "Generated docs are up to date (make docs produces no diff)": make docs shells out to tofu/terraform plus tfplugindocs, neither available in this review's sandbox, so the regeneration was not re-executed. Circumstantial check performed instead: docs/resources/marketplace_panel.md and docs/data-sources/marketplace_panel.md are deleted matching the resource/data-source removal, and the README catalog row is dropped; no residual docs/ reference to marketplace_panel remains anywhere.

Caveats

  • make docs regeneration not independently re-executed (tooling unavailable in this sandbox); see Claim mismatches above for the substitute check performed.
  • go build ./..., go vet ./..., and golangci-lint run ./... all executed clean against the PR head.
  • go test ./... at the PR head produces the same 7 failing tests (TestExpandKeysMatchConfigSpec, TestPostgresqlExpandKeysMatchConfigSpec, TestNatsExpandKeysMatchConfigSpec, TestKubernetesExpandNodeGroupKeysMatchNodeGroupSpec, TestKubernetesExpandKeysMatchConfigSpec, TestQdrantExpandKeysMatchConfigSpec, TestKafkaExpandKeysMatchConfigSpec) as the merge-base commit 583e1a9, confirmed by running the suite at both revisions: this diff adds zero new failures.
  • The removed MarketplacePanelResource() (internal/client/groups.go) and the two removed schema constructors (internal/provider/rawspec_schema.go) each had exactly one caller, both removed in the same diff (internal/provider/provider.go); no orphaned symbols remain.
  • Repo-wide case-insensitive search for marketplace across *.go/*.md/*.tf after the change: the only surviving hit is CHANGELOG.md:23, which documents the historical v1.4.2 release contents and is correctly left unedited (changelogs are not rewritten retroactively).
  • An existing Terraform user with cozystack_marketplace_panel still in state will get a "resource type not implemented" error on the first plan/refresh against the upgraded provider binary. This is standard Terraform behavior for a provider that drops a resource type, not a new failure mode introduced here, and the required mitigation (terraform state rm) is stated in both the PR body and the commit's BREAKING CHANGE: footer.

Recommended follow-ups

  • The terraform state rm cozystack_marketplace_panel.<name> instruction currently lives only in the PR body and the commit's BREAKING CHANGE: footer; CHANGELOG.md itself is not updated here (deferred per the PR body to "a consolidated v1.6 section" landing with the integration PR). Confirm that consolidated entry spells out the terraform state rm step verbatim: it is the one action every existing user of this resource must take, and it is easy to lose track of across a multi-PR integration stack.

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.

2 participants