Skip to content

feat: support workflow ownership tags#180

Merged
intel352 merged 4 commits into
mainfrom
issue-779-ownership-tags
Jun 1, 2026
Merged

feat: support workflow ownership tags#180
intel352 merged 4 commits into
mainfrom
issue-779-ownership-tags

Conversation

@intel352
Copy link
Copy Markdown
Contributor

@intel352 intel352 commented Jun 1, 2026

Summary

  • implements the workflow IaC ownership provider contract for DigitalOcean tag-backed resources
  • maps owners to workflow-owner:<owner> DO tags for droplets, volumes, databases, and caches
  • advertises IaCProviderOwnership in plugin manifests and bumps minEngineVersion to 0.69.1
  • carries database/cache tags through read outputs so ownership reads are consistent

Verification

  • GOWORK=off go test ./... -count=1
  • GOWORK=off golangci-lint run ./internal/... ./cmd/... --new-from-rev origin/main
  • git diff --check

TDD / regression proof

With implementation absent, the new tests failed to compile as expected:

internal/ownership_test.go:24:39: *DOProvider does not implement interfaces.OwnershipProvider (missing method GetOwner)
internal/ownership_test.go:61:18: p.GetOwner undefined
internal/ownership_test.go:85:11: p.SetOwner undefined
internal/ownership_test.go:122:19: p.ListOwners undefined

With the implementation restored, the focused tests pass:

ok github.com/GoCodeAlone/workflow-plugin-digitalocean/internal

Depends on merged workflow PR GoCodeAlone/workflow#824 (0072d3221).

Copilot AI review requested due to automatic review settings June 1, 2026 22:53
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

This PR adds support for the workflow IaC ownership provider contract in the DigitalOcean plugin by representing ownership via workflow-owner:<owner> tags and exposing the new Ownership gRPC service/manifest capability.

Changes:

  • Implement interfaces.OwnershipProvider on *DOProvider using DigitalOcean tags, plus a gRPC server adapter for the ownership RPCs.
  • Advertise IaCProviderOwnership in both plugin manifests and bump minEngineVersion / workflow dependency to 0.69.1.
  • Include database/cache tags in read outputs so ownership reads remain consistent across resource types.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
plugin.json Bumps minEngineVersion and advertises Ownership service in iacServices.
cmd/plugin/plugin.json Mirrors manifest changes for the embedded/bundled plugin manifest.
internal/ownership.go Adds ownership provider implementation (tag parsing/encoding, read/set/list).
internal/ownership_server.go Adds gRPC handlers mapping pb Ownership RPCs to provider methods.
internal/ownership_test.go Adds unit tests for provider behavior + service registration + manifest advertising.
internal/iacserver.go Embeds UnimplementedIaCProviderOwnershipServer and asserts interface implementation.
internal/iacserver_mapper_test.go Updates min engine version expectation to 0.69.1.
internal/drivers/database.go Adds tags to database outputs in structpb-compatible form.
internal/drivers/cache.go Adds tags to cache outputs in structpb-compatible form.
go.mod Updates workflow dependency to 0.69.1-... prerelease.
go.sum Updates dependency checksums for the workflow version bump.

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

Comment thread internal/ownership.go
Comment thread internal/ownership.go
Comment thread internal/ownership.go
Copilot AI review requested due to automatic review settings June 1, 2026 23:07
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

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Comment thread internal/ownership.go
Comment thread internal/ownership_test.go
@intel352 intel352 merged commit 345bc3c into main Jun 1, 2026
7 checks passed
@intel352 intel352 deleted the issue-779-ownership-tags branch June 1, 2026 23:20
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