refactor: consolidate lifecycle plumbing, remove examples (0.1.2-dev.9) #24

Merged
john merged 1 commit from refactor/consolidate into main 2026-11-18 21:50:43 +00:00
Owner

Refactor with no schema or behaviour change: the full tofu providers schema -json output is byte-identical to 0.1.2-dev.8.

Consolidated (internal/provider/base.go), replacing 16 hand-copied versions of each:

  • provider Configure (resources and data sources; the 3 search data sources and lookups too)
  • the "provider not configured" guard (66 copies → ready(verb, nouns), same messages)
  • Read via get_* with not-found → remove from state (readObject), Delete with not-found = success (deleteObject); same error summaries
  • the id attribute (idAttribute()) and Metadata type names
    About 600 lines fewer; resources keep only their own payload/model logic.

Removed: examples/ (docs pages keep their schema and import notes, no example blocks); Makefile → yawn.json tasks build, testacc, lint (plus existing check).
Added: a test that fails if any schema attribute is missing from its docs/ page (docs are now hand-maintained, no generator).
Fixed: two golangci-lint findings (De Morgan in endpoint check; one ST1005 kept and annotated because "Missing x/y" is user-facing).

VERSION 0.1.2-dev.9: merging tags it, publishes the zips and signs SHA256SUMS via yawn request sign (first real signature through the renamed path), then publishes the wiki.

Refactor with **no schema or behaviour change**: the full `tofu providers schema -json` output is byte-identical to 0.1.2-dev.8. **Consolidated** (`internal/provider/base.go`), replacing 16 hand-copied versions of each: - provider `Configure` (resources and data sources; the 3 search data sources and lookups too) - the "provider not configured" guard (66 copies → `ready(verb, nouns)`, same messages) - Read via `get_*` with not-found → remove from state (`readObject`), Delete with not-found = success (`deleteObject`); same error summaries - the `id` attribute (`idAttribute()`) and `Metadata` type names About 600 lines fewer; resources keep only their own payload/model logic. **Removed:** `examples/` (docs pages keep their schema and import notes, no example blocks); `Makefile` → `yawn.json` tasks `build`, `testacc`, `lint` (plus existing `check`). **Added:** a test that fails if any schema attribute is missing from its `docs/` page (docs are now hand-maintained, no generator). **Fixed:** two golangci-lint findings (De Morgan in endpoint check; one ST1005 kept and annotated because "Missing x/y" is user-facing). VERSION 0.1.2-dev.9: merging tags it, publishes the zips and signs SHA256SUMS via `yawn request sign` (first real signature through the renamed path), then publishes the wiki.
refactor: shared base for resources/data sources; remove examples; yawn tasks replace Makefile (0.1.2-dev.9)
All checks were successful
CI / release-check-1 (pull_request) Successful in 14s
CI / release-check (pull_request) Successful in 0s
Security / scan (pull_request) Successful in 33s
Security / security (pull_request) Successful in 0s
CI / check (pull_request) Successful in 1m45s
e7941764dc
john merged commit 575109c770 into main 2026-11-18 21:50:43 +00:00
john deleted branch refactor/consolidate 2026-11-18 21:50:43 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
john/tofu-provider-xyops!24
No description provided.