chainlink icon indicating copy to clipboard operation
chainlink copied to clipboard

KS-471: append capabilities to nodes in capability registry

Open krehermann opened this issue 1 year ago • 2 comments

LINK-471

This change adds support in the deployment package to append capabilities to existing nodes.

The capability registry doesn't directly support appending capabilities. It only supports setting them.

Therefore to achieve the end, we have to read the existing state merge the desired capabilities with the existing one.

There are distinct operations to fetching, merging, and setting. I modeled them independently so that the can be composed in the AppendNodeCapabilities func.

In order to test this, I introduced a test package that sets up the registry contract in a given state. A side effect of this new package is that some of the struct and funcs needed to become public, and the PR is littered with capitalization changes.

Most of this change is the testing, bookkeeping between the existing contract state and the desired state, and the private->public renaming.

krehermann avatar Oct 11 '24 22:10 krehermann

Below is an analysis created by an LLM. Be mindful of hallucinations and verify accuracy.

WF: CI Core#7422115

Error 1: Undefined Function in Test Code

Source of Error:
##[error]deployment/keystone/changeset/helpers_test.go:7:34: undefined: updateNodeCapabilitiesImpl

Why:
The error indicates that the function updateNodeCapabilitiesImpl is being called in helpers_test.go but is not defined or imported in the test file or any of its dependencies. This could be due to a missing implementation or incorrect import paths.

Suggested fix:
Check the source file helpers_test.go to ensure that updateNodeCapabilitiesImpl is correctly implemented or imported. If the function is supposed to be part of an external package, verify that the package is correctly imported and available during the test build. If it's a local function, ensure it is correctly defined in the scope of the test or the package.

Error 2: Process Completed with Exit Code 1

Source of Error:
##[error]Process completed with exit code 1.

Why:
This error typically indicates that the test suite failed to execute successfully, leading to a non-zero exit code. The failure is likely a direct result of the previous error where a function was not defined, causing the test compilation to fail.

Suggested fix:
Resolve the initial error related to the undefined function. Ensure all tests compile and pass successfully. Re-run the test suite after making the necessary corrections to the test files or environment configurations.

github-actions[bot] avatar Oct 11 '24 22:10 github-actions[bot]

AER Report: CI Core ran successfully :white_check_mark:

aer_workflow , commit

AER Report: Operator UI CI ran successfully :white_check_mark:

aer_workflow , commit

github-actions[bot] avatar Oct 28 '24 19:10 github-actions[bot]