Skip to content

fix(provider): implement IaCProvider.{BootstrapStateBackend,SupportedCanonicalKeys} stubs#4

Merged
intel352 merged 2 commits into
mainfrom
fix/bootstrap-state-backend-stub
May 4, 2026
Merged

fix(provider): implement IaCProvider.{BootstrapStateBackend,SupportedCanonicalKeys} stubs#4
intel352 merged 2 commits into
mainfrom
fix/bootstrap-state-backend-stub

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented May 4, 2026

Summary

Closes the pre-existing IaCProvider interface gap surfaced by workflow PR #534's new cross-plugin-build CI gate. That gate builds this plugin against workflow main via a replace directive, which is exactly the gap class it was designed to catch.

Changes

Method Implementation Rationale
BootstrapStateBackend(ctx, cfg) (*BootstrapResult, error) return nil, nil Per the interface doc: "Providers that do not manage a state backend should return (nil, nil)." AWS state lives in S3 via a separate workflow path.
SupportedCanonicalKeys() []string return interfaces.CanonicalKeys() Per the interface doc: "Built-in and stub providers return the full canonical key set." Per-driver field validation already happens in Diff.

Dep bump

Bumps github.com/GoCodeAlone/workflow from v0.3.56 → v0.19.2. Required because interfaces.BootstrapResult (the return type) only exists in v0.18.6+. Without the bump, the method signature would not compile against the plugin's own CI.

The bump is the minimum required to get both interface methods + the BootstrapResult type. No other intentional behavior changes; go mod tidy pulled the standard transitive set.

Sister-PR context

This is the second of three sister PRs closing the same gap class:

  • workflow-plugin-aws (this PR)
  • workflow-plugin-gcp (parallel)
  • workflow-plugin-azure (parallel)

DO already implements both methods (real BootstrapStateBackend for Spaces).

Test plan

  • GOWORK=off go build ./... clean
  • GOWORK=off go test ./... pass (provider + drivers)
  • Plugin CI green
  • workflow PR #534 cross-plugin-build gate re-run green for aws matrix entry

…CanonicalKeys} stubs — closes pre-existing gap from workflow#499

Adds the two missing IaCProvider methods that were introduced upstream after this
plugin's last workflow dep bump:

- `BootstrapStateBackend(ctx, cfg) (*BootstrapResult, error)` — returns (nil, nil)
  per the interface's documented contract for providers that do not manage a state
  backend. AWS state lives in S3 via a separate workflow path.
- `SupportedCanonicalKeys() []string` — returns the full `interfaces.CanonicalKeys()`
  set per the doc's "built-in and stub providers return the full canonical key set"
  guidance; per-driver field validation already happens in Diff.

Bumps `github.com/GoCodeAlone/workflow` from v0.3.56 to v0.19.2 because the
`interfaces.BootstrapResult` return type only exists in v0.18.6+. Without the dep
bump, the BootstrapStateBackend method signature would not compile against the
plugin's own CI.

Surfaced by workflow PR #534's new cross-plugin-build CI gate, which builds this
plugin against workflow main via a `replace` directive — exactly the gap class this
gate was designed to catch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Closes an IaCProvider interface gap introduced by newer workflow versions by adding the missing provider methods and updating module dependencies so this plugin builds against workflow main (and newer tagged releases).

Changes:

  • Implement AWSProvider.SupportedCanonicalKeys() by returning interfaces.CanonicalKeys().
  • Implement AWSProvider.BootstrapStateBackend(...) as a documented no-op returning (nil, nil).
  • Bump github.com/GoCodeAlone/workflow to v0.19.2 (and refresh transitive deps via go mod tidy).

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
provider/provider.go Adds SupportedCanonicalKeys and BootstrapStateBackend to satisfy the updated interfaces.IaCProvider contract.
go.mod Upgrades workflow dependency (plus associated direct/indirect module version updates).
go.sum Updated checksums reflecting the dependency upgrades and tidied module graph.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread provider/provider.go Outdated
… params

- Replaced multi-cloud "S3/GCS/Azure Blob" doc copy with AWS-specific reference.
- SupportedCanonicalKeys doc no longer claims per-driver Diff validation
  (drivers compare overlapping fields; do not reject unsupported keys).
- BootstrapStateBackend params switched to _ per repo's no-op convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@intel352 intel352 merged commit 29d5385 into main May 4, 2026
3 checks passed
@intel352 intel352 deleted the fix/bootstrap-state-backend-stub branch May 4, 2026 14:24
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