Skip to content

Conversation

@adamegyed
Copy link
Contributor

Motivation

In preparation to revamp the installPlugin workflow, we need to move SingleOwnerPlugin to the user-controlled flow. Currently this is installValidation, with the goal being merging the two install flows into one, user-controlled flow.

Additionally, SingleOwnerPlugin still uses the old mechanism of "treat functionId as an implementation switcher, rather than a config switcher". We've had draft examples of the intended updated usage in #89 and #84, but it'd be helpful to actually bring this change into the current state of v0.8-develop.

Solution

Change the internal storage of SingleOwnerPlugin to use the id field as a key in a mapping.

Update the test factories to use the user-controlled install flow. For consistency, introduce a constant across tests called TEST_DEFAULT_OWNER_FUNCTION_ID so the installation flow and usage can rely on the same value for the id.

This requires adding the isSignatureValidation flag to the installValidation flow. However, doing so naively results in a stack-too-deep error, due to the large number of parameters. To address this, pack the validation function's FunctionReference into a new variable type, called ValidationConfig, along with the flags for isGlobal and isSignatureValidation.

Update the usage of SingleOwnerPlugin in tests. There's a lot of this.

@adamegyed adamegyed force-pushed the adam/SOP-install-validation branch from 9315a17 to cdd7a7a Compare July 11, 2024 17:57
@adamegyed adamegyed force-pushed the adam/SOP-install-validation branch from cdd7a7a to a879a96 Compare July 11, 2024 18:20
@adamegyed adamegyed merged commit d50ae10 into v0.8-develop Jul 11, 2024
@adamegyed adamegyed deleted the adam/SOP-install-validation branch July 11, 2024 19:53
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.

3 participants