Skip to content

fix(datastore): (re)expose key types used for delete operations - #116

Merged
gustavogama-cll merged 1 commit into
mainfrom
ggama/fix/reexpose-key-types-delete-operations
Jul 21, 2026
Merged

fix(datastore): (re)expose key types used for delete operations#116
gustavogama-cll merged 1 commit into
mainfrom
ggama/fix/reexpose-key-types-delete-operations

Conversation

@gustavogama-cll

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Release impact (release-please)

Current version 0.8.0 (on main)
After merge 0.8.1 (patch bump)

PR title: fix(datastore): (re)expose key types used for delete operations

Merging this PR as-is will contribute a patch bump to the next release-please release PR.

Conventional commit → bump

Intent PR title prefix Bump
Bug fix fix: patch
New feature feat: minor
Breaking change feat!: / fix!: or BREAKING CHANGE: / BREAKING-CHANGE: in description major
No release chore:, docs:, ci:, refactor:, etc. none

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 main.

If the types are placed in an internal package, it's impossible to
directly use the delete operations from another changeset.
@gustavogama-cll
gustavogama-cll force-pushed the ggama/fix/reexpose-key-types-delete-operations branch from 3f2b40e to a03da5d Compare July 21, 2026 05:01
@cl-sonarqube-production

Copy link
Copy Markdown

@gustavogama-cll
gustavogama-cll requested a review from giogam July 21, 2026 05:08
@gustavogama-cll
gustavogama-cll marked this pull request as ready for review July 21, 2026 05:08
@gustavogama-cll
gustavogama-cll requested a review from a team as a code owner July 21, 2026 05:08
Copilot AI review requested due to automatic review settings July 21, 2026 05:08
@gustavogama-cll gustavogama-cll changed the title fix(datastore): (re)expose key types used in delete operations fix(datastore): (re)expose key types used for delete operations Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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/keys package 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/keys instead of the former datastore/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 graham-chainlink left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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 ?

@gustavogama-cll

Copy link
Copy Markdown
Contributor Author

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...

@gustavogama-cll
gustavogama-cll merged commit 984a499 into main Jul 21, 2026
20 checks passed
@gustavogama-cll
gustavogama-cll deleted the ggama/fix/reexpose-key-types-delete-operations branch July 21, 2026 17:58
gustavogama-cll pushed a commit that referenced this pull request Jul 21, 2026
🤖 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>
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.

4 participants