fix(datastore): (re)expose key types used for delete operations - #116
Conversation
Release impact (release-please)
PR title: Merging this PR as-is will contribute a patch bump to the next release-please release PR. Conventional commit → bump
Update the PR title before merge if you need a different bump (squash commit message = PR title). Preview is based on this PR title only. The release-please release PR may include other unreleased commits already on |
If the types are placed in an internal package, it's impossible to directly use the delete operations from another changeset.
3f2b40e to
a03da5d
Compare
|
There was a problem hiding this comment.
Pull request overview
This PR makes datastore key “mirror” types publicly importable so other changesets can construct the correct key types for delete operations, instead of being blocked by Go’s internal/ package visibility.
Changes:
- Introduces a new public
datastore/keyspackage containing JSON-serializable key mirror types and conversion helpers to framework keys. - Updates delete operations/sequences/changesets (and their tests) to import
github.com/smartcontractkit/cld-changesets/datastore/keysinstead of the formerdatastore/internal/keys. - Adds/updates tests to validate JSON round-tripping and framework-key conversion for the newly exposed types.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| datastore/sequences/delete_resources.go | Switches key import to the new public datastore/keys package. |
| datastore/sequences/delete_resources_test.go | Updates test imports to use public datastore/keys. |
| datastore/operations/delete_contract_metadata.go | Switches key import to the new public datastore/keys package. |
| datastore/operations/delete_contract_metadata_test.go | Updates test imports to use public datastore/keys. |
| datastore/operations/delete_chain_metadata.go | Switches key import to the new public datastore/keys package. |
| datastore/operations/delete_chain_metadata_test.go | Updates test imports to use public datastore/keys. |
| datastore/operations/delete_address_ref.go | Switches key import to the new public datastore/keys package. |
| datastore/operations/delete_address_ref_test.go | Updates test imports to use public datastore/keys. |
| datastore/keys/keys.go | Adds public JSON-friendly mirror key types + conversion methods to framework keys. |
| datastore/keys/keys_test.go | Updates tests to reference the new public datastore/keys package. |
| datastore/changesets/delete_resources.go | Switches key import to the new public datastore/keys package. |
| datastore/changesets/delete_resources_test.go | Updates test imports to use public datastore/keys. |
| datastore/changesets/delete_contract_metadata.go | Switches key import to the new public datastore/keys package. |
| datastore/changesets/delete_contract_metadata_test.go | Updates test imports to use public datastore/keys. |
| datastore/changesets/delete_chain_metadata.go | Switches key import to the new public datastore/keys package. |
| datastore/changesets/delete_chain_metadata_test.go | Updates test imports to use public datastore/keys. |
| datastore/changesets/delete_address_ref.go | Switches key import to the new public datastore/keys package. |
| datastore/changesets/delete_address_ref_test.go | Updates test imports to use public datastore/keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
graham-chainlink
left a comment
There was a problem hiding this comment.
If the key are not exposed externally, we could put the keys on the top level internal folder, then every package in the repo can access it ?
Sorry, I'm not sure I follow. The purpose of the PR is to expose the keys externally... |
🤖 I have created a release *beep* *boop* --- ## [0.8.1](v0.8.0...v0.8.1) (2026-07-21) ### Bug Fixes * **datastore:** (re)expose key types used for delete operations ([#116](#116)) ([984a499](984a499)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: app-token-issuer-ops-platform[bot] <275822481+app-token-issuer-ops-platform[bot]@users.noreply.github.com>





If the types are placed in an internal package, it's impossible to directly use the delete operations from another changeset.