Skip to content

fix: bind changesets and proposal operations using changeset uuids#919

Merged
gustavogama-cll merged 1 commit intomainfrom
ggama/chore/modify-changeset-metadata-added-to-proposal
Apr 9, 2026
Merged

fix: bind changesets and proposal operations using changeset uuids#919
gustavogama-cll merged 1 commit intomainfrom
ggama/chore/modify-changeset-metadata-added-to-proposal

Conversation

@gustavogama-cll
Copy link
Copy Markdown
Contributor

@gustavogama-cll gustavogama-cll commented Apr 8, 2026

Change how we associate proposal operations and changesets. Previously we relied on the "operation id"s, which had recently been added to the proposal's operation types. However, that change had to be reverted and the latest release of mcms no longer contains the operation id attributes.

As an alternative, we now reverse the association by assigning a unique (uu)id to each changeset, and then add a tag to the operations that were generated by the changeset:

{
  ...
  "metadata": {
    "changesets": [{
      "id": "c00e5d67-c275-4389-aded-7d8b151cbd5b",
        "name": "my_changeset",
        "input": {
          "payload": {
            "key": "value"
          }
        }
    }]
  },
  "operations": [{
    "chainSelector": 12345678901234567890,
    "transactions": [{
      "to": "0x02",
      "data": "",
      "additionalFields": { "value": 0 },
      "contractType": "",
      "tags": [ "changeset:c00e5d67-c275-4389-aded-7d8b151cbd5b" ]
    }]
  }]
}

This pull-request also applies a couple of change requests from CCIP after initial tests with the proposal hooks API:

  1. return a failure in fork tests and the "mcms hooks" command when a hook with failure policy set as "abort" returns an error
  2. expose an new interface in the ProposalHookEnv (ForkContext) and a corresponding implementation for EVM (EVMForkContext) which allows hooks to identify that they're running inside a "forked environment" and gives them the configuration so that they can directly access it (e.g., the URL of the RPC spawned by the anvil container).

OPT-467

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: a076b4f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chainlink-deployments-framework Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This comment was marked as resolved.

@gustavogama-cll gustavogama-cll force-pushed the ggama/chore/modify-changeset-metadata-added-to-proposal branch from d6b5fec to 559f5aa Compare April 8, 2026 06:30
@gustavogama-cll gustavogama-cll requested a review from Copilot April 8, 2026 06:31

This comment was marked as resolved.

@gustavogama-cll gustavogama-cll force-pushed the ggama/chore/modify-changeset-metadata-added-to-proposal branch 4 times, most recently from a598c21 to 9802665 Compare April 9, 2026 03:37
@gustavogama-cll gustavogama-cll requested a review from Copilot April 9, 2026 03:42

This comment was marked as resolved.

@gustavogama-cll gustavogama-cll force-pushed the ggama/chore/modify-changeset-metadata-added-to-proposal branch from 9802665 to 24956c3 Compare April 9, 2026 04:14
@gustavogama-cll gustavogama-cll marked this pull request as ready for review April 9, 2026 04:31
@gustavogama-cll gustavogama-cll requested a review from a team as a code owner April 9, 2026 04:31
Copilot AI review requested due to automatic review settings April 9, 2026 04:31

This comment was marked as resolved.

ecPablo
ecPablo previously approved these changes Apr 9, 2026
…y we

relied on the "operation id"s, which had recently been added to the proposal's
operation types. However, that change had to be reverted and the latest
release of mcms no longer contains the operation id attributes.

As an alternative, we now reverse the association by assigning a unique (uu)id
to each changeset, and then add a tag to the operations that were generated by
the changeset:

```json
{
  ...
  "metadata": {
    "changesets": [{
      "id": "c00e5d67-c275-4389-aded-7d8b151cbd5b",
        "name": "my_changeset",
        "input": {
          "payload": {
            "key": "value"
          }
        }
    }]
  },
  "operations": [{
    "chainSelector": 12345678901234567890,
    "transactions": [{
      "to": "0x02",
      "data": "",
      "additionalFields": { "value": 0 },
      "contractType": "",
      "tags": [ "changeset:c00e5d67-c275-4389-aded-7d8b151cbd5b" ]
    }]
  }]
}
```

This pull-request also applies a couple of change requests from CCIP after
initial tests with the proposal hooks API:
  1. return a failure in fork tests and the "mcms hooks" command when a hook
     with failure policy set as "abort" returns an error
  2. expose an attribute in the ProposalHookEnv indicating whether the
     environment is a "forked" one.

---
OPT-467
@gustavogama-cll gustavogama-cll dismissed stale reviews from ecPablo and graham-chainlink via a076b4f April 9, 2026 15:51
@gustavogama-cll gustavogama-cll force-pushed the ggama/chore/modify-changeset-metadata-added-to-proposal branch from 24956c3 to a076b4f Compare April 9, 2026 15:51
@gustavogama-cll gustavogama-cll requested a review from ecPablo April 9, 2026 15:54
@gustavogama-cll
Copy link
Copy Markdown
Contributor Author

@ecPablo , I pushed a tiny fix identified by Graham. Will need another stamp.

@cl-sonarqube-production
Copy link
Copy Markdown

@gustavogama-cll gustavogama-cll added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit 267e083 Apr 9, 2026
25 checks passed
@gustavogama-cll gustavogama-cll deleted the ggama/chore/modify-changeset-metadata-added-to-proposal branch April 9, 2026 16:25
github-merge-queue bot pushed a commit that referenced this pull request Apr 9, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## chainlink-deployments-framework@0.94.1

### Patch Changes

-
[#919](#919)
[`267e083`](267e083)
Thanks [@gustavogama-cll](https://github.com/gustavogama-cll)! - fix:
use "changeset uuids" to associate proposal operations and changesets

---------

Co-authored-by: app-token-issuer-engops[bot] <144731339+app-token-issuer-engops[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