Skip to content

feat(remote-config): add support for multiple components of the same type, and change from hard to soft delete #1846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 87 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
e82d0ef
extracted most logic from other branch
instamenta Apr 15, 2025
d1680d8
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta Apr 15, 2025
fa7c866
changes from parent branch
instamenta Apr 15, 2025
f17cb00
removing noise
instamenta Apr 15, 2025
80d1b2c
removing block-node related logic
instamenta Apr 15, 2025
a441a79
removing block node logic
instamenta Apr 15, 2025
3292683
cleanup
instamenta Apr 15, 2025
d5e0f8f
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta Apr 16, 2025
04a98e0
removed state field from remote config components
instamenta Apr 16, 2025
35cdc64
adjust tests
instamenta Apr 16, 2025
6caf9e2
changed disableComponent method with removeComponent and used it accc…
instamenta Apr 16, 2025
41e392d
fix tests for ComponentsDataWrapper
instamenta Apr 16, 2025
7ed7479
added new field phase to all components, renamed consensusNodeAliases…
instamenta Apr 16, 2025
8e013ae
removed usages of ConsensusNodeStates
instamenta Apr 16, 2025
8115ba1
switching from names on remote config components to ids
instamenta Apr 16, 2025
c4c5914
replacing remote config component names with ids
instamenta Apr 16, 2025
a5570dd
fixed all references to component name outside of tests
instamenta Apr 16, 2025
e4539b3
removing usages of ComponentName and replacing them with ComponentId …
instamenta Apr 16, 2025
e2177e3
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta Apr 17, 2025
ba62c50
fixes
instamenta Apr 17, 2025
630de7c
fixed warnings from tests and polished implementation
instamenta Apr 17, 2025
6883f47
lint-fix
instamenta Apr 17, 2025
b7ceadd
fixed all unit tests
instamenta Apr 17, 2025
1b44728
added TODO's linked to issues
instamenta Apr 17, 2025
a6f9ae3
fix e2e integration tests
instamenta Apr 17, 2025
3788778
fix dual cluster setup test full
instamenta Apr 17, 2025
9bc16fa
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta Apr 30, 2025
2868bb9
fix tsc errros
instamenta Apr 30, 2025
577b10f
added types and changed 'name' proprety to 'id' on remote config stat…
instamenta Apr 30, 2025
3e61d46
adding classes for the connection between the data runtime and execut…
instamenta Apr 30, 2025
8ef992c
took changes from 'add remote config data layer classes and migration…
instamenta Apr 30, 2025
dc63852
improving remote config classes
instamenta Apr 30, 2025
7968c5c
migrating remote config to the new structure
instamenta May 2, 2025
279bbca
removing obsolete code
instamenta May 5, 2025
09f794e
refactoring to integrate business and data layers
instamenta May 5, 2025
a09083a
removing old component classes
instamenta May 5, 2025
72446c8
removing obsolete code
instamenta May 5, 2025
1f83f04
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta May 7, 2025
f2d6130
fixing imports after merge
instamenta May 7, 2025
0c4d9f6
fixing imports after merge
instamenta May 7, 2025
82dd06a
fixing issues after merge
instamenta May 7, 2025
dc96cf0
adding additional logic
instamenta May 8, 2025
aa64bd7
adding methods needing for managing the remote config runtime state a…
instamenta May 8, 2025
261d126
extending callback logic for modify method on remote config and expos…
instamenta May 8, 2025
9b8d1d9
migrating to new structure
instamenta May 8, 2025
577f99c
adapting code base to new strucure
instamenta May 8, 2025
63e68e5
fix tests and ciruclar dep
instamenta May 8, 2025
2a41e0e
fix all unit tests
instamenta May 8, 2025
f479d9a
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta May 9, 2025
5754b03
fix merge issues
instamenta May 9, 2025
e435a22
removed remote config manager
instamenta May 9, 2025
103b3e8
renamed remote config, switched usages
instamenta May 9, 2025
97d3724
make static classes normal
instamenta May 9, 2025
e5b34d8
intrefuce api interfaces
instamenta May 9, 2025
ad91752
fix circular dep and use api interfaces where needed
instamenta May 9, 2025
bb6bed8
adding logic for handling multiple remote configs
instamenta May 9, 2025
f137ba7
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta May 12, 2025
0e18795
take changes from branch about remote config migration
instamenta May 12, 2025
31952c1
finishing logic for managing the configmaps and writing to all clusters
instamenta May 12, 2025
cfc6f89
lint-fix
instamenta May 12, 2025
56af03e
fix tests
instamenta May 12, 2025
e5d6ee7
fixed lint errors
instamenta May 12, 2025
ba835ba
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta May 12, 2025
bff289e
fix merge issues
instamenta May 12, 2025
de5004c
instantiate empty stringified json object for the configmap key and l…
instamenta May 12, 2025
3d219c7
add optional value for the remote config source to inject a model
instamenta May 12, 2025
776d00d
refactor: split local config runtime state into appropriately shielde…
nathanklick May 13, 2025
4ae0f88
fix: resolve test failures
nathanklick May 13, 2025
4f26df3
fix: resolve test failures
nathanklick May 13, 2025
a295cfb
fix: resolve remote config loading errors
nathanklick May 13, 2025
6cab647
fix: ensure existing cluster context is retrieved correctly from loca…
jeromy-cannon May 14, 2025
7540ff1
refactor: rename constructor parameters for clarity in mutable-backed…
jeromy-cannon May 14, 2025
47c251a
test: add unit tests for StringFacade functionality
jeromy-cannon May 14, 2025
5c95181
refactor: rename backingObject to encapsulatedObject for clarity acro…
jeromy-cannon May 14, 2025
2c2996f
refactor: rename BackedArrayList and BackedMap to FacadeArray and Fac…
jeromy-cannon May 14, 2025
43789fc
refactor: rename backingObject and backingArray to encapsulatedObject…
jeromy-cannon May 14, 2025
60ce44d
Merge remote-tracking branch 'origin/main' into 01822-refactor-remote…
instamenta May 15, 2025
02c92b5
fix issues after merge
instamenta May 15, 2025
a6d9b8e
Merge remote-tracking branch 'origin/runtime-local-config' into 01822…
instamenta May 15, 2025
d0ff8b1
fixing merge issues
instamenta May 15, 2025
5546b5c
fixing broken imports
instamenta May 15, 2025
cc0627d
fixing merge issues
instamenta May 15, 2025
8a52bd6
fixed lint and tsc errors
instamenta May 15, 2025
af2eaa4
merge with main
instamenta May 16, 2025
731d5f9
resolving merge issues
instamenta May 16, 2025
05ffff4
resolved issues after merge
instamenta May 16, 2025
532bb2d
adapting to new structure
instamenta May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 42 additions & 43 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ Maintainers are assigned the following scopes in this repository:

| Name | GitHub ID | Scope | LFID | Discord ID | Email | Company Affiliation |
|----- | ------------- | ---------- | ---- | ------------------- | ----- | ------------------- |
| | jeromy-cannon | Maintainer | | jeromy_at_hashgraph | | Hashgraph |
| | jeromy-cannon | Maintainer | | jeromy\_at\_hashgraph | | Hashgraph |
| | leninmehedy | Maintainer | | | | Hashgraph |
| | nathanklick | Maintainer | | nathan.hashgraph | | Hashgraph |


## Emeritus Maintainers

| Name | GitHub ID | Scope | LFID | Discord ID | Email | Company Affiliation |
Expand All @@ -31,75 +30,75 @@ Maintainers are assigned the following scopes in this repository:

Maintainers are expected to perform the following duties for this repository. The duties are listed in more or less priority order:

- Review, respond, and act on any security vulnerabilities reported against the repository.
- Review, provide feedback on, and merge or reject GitHub Pull Requests from
* Review, respond, and act on any security vulnerabilities reported against the repository.
* Review, provide feedback on, and merge or reject GitHub Pull Requests from
Contributors.
- Review, triage, comment on, and close GitHub Issues
* Review, triage, comment on, and close GitHub Issues
submitted by Contributors.
- When appropriate, lead/facilitate architectural discussions in the community.
- When appropriate, lead/facilitate the creation of a product roadmap.
- Create, clarify, and label issues to be worked on by Contributors.
- Ensure that there is a well defined (and ideally automated) product test and
* When appropriate, lead/facilitate architectural discussions in the community.
* When appropriate, lead/facilitate the creation of a product roadmap.
* Create, clarify, and label issues to be worked on by Contributors.
* Ensure that there is a well defined (and ideally automated) product test and
release pipeline, including the publication of release artifacts.
- When appropriate, execute the product release process.
- Maintain the repository CONTRIBUTING.md file and getting started documents to
* When appropriate, execute the product release process.
* Maintain the repository CONTRIBUTING.md file and getting started documents to
give guidance and encouragement to those wanting to contribute to the product, and those wanting to become maintainers.
- Contribute to the product via GitHub Pull Requests.
- Monitor requests from the LF Decentralized Trust Technical Advisory Council about the
contents and management of LFDT repositories, such as branch handling,
required files in repositories and so on.
- Contribute to the LFDT Project's Quarterly Report.
* Contribute to the product via GitHub Pull Requests.
* Monitor requests from the LF Decentralized Trust Technical Advisory Council about the
contents and management of LFDT repositories, such as branch handling,
required files in repositories and so on.
* Contribute to the LFDT Project's Quarterly Report.

## Becoming a Maintainer

This community welcomes contributions. Interested contributors are encouraged to
progress to become maintainers. To become a maintainer the following steps
occur, roughly in order.

- The proposed maintainer establishes their reputation in the community,
* The proposed maintainer establishes their reputation in the community,
including authoring five (5) significant merged pull requests, and expresses
an interest in becoming a maintainer for the repository.
- A PR is created to update this file to add the proposed maintainer to the list of active maintainers.
- The PR is authored by an existing maintainer or has a comment on the PR from an existing maintainer supporting the proposal.
- The PR is authored by the proposed maintainer or has a comment on the PR from the proposed maintainer confirming their interest in being a maintainer.
- The PR or comment from the proposed maintainer must include their
* A PR is created to update this file to add the proposed maintainer to the list of active maintainers.
* The PR is authored by an existing maintainer or has a comment on the PR from an existing maintainer supporting the proposal.
* The PR is authored by the proposed maintainer or has a comment on the PR from the proposed maintainer confirming their interest in being a maintainer.
* The PR or comment from the proposed maintainer must include their
willingness to be a long-term (more than 6 month) maintainer.
- Once the PR and necessary comments have been received, an approval timeframe begins.
- The PR **MUST** be communicated on all appropriate communication channels, including relevant community calls, chat channels and mailing lists. Comments of support from the community are welcome.
- The PR is merged and the proposed maintainer becomes a maintainer if either:
- Two weeks have passed since at least three (3) Maintainer PR approvals have been recorded, OR
- An absolute majority of maintainers have approved the PR.
- If the PR does not get the requisite PR approvals, it may be closed.
- Once the add maintainer PR has been merged, any necessary updates to the GitHub Teams are made.
* Once the PR and necessary comments have been received, an approval timeframe begins.
* The PR **MUST** be communicated on all appropriate communication channels, including relevant community calls, chat channels and mailing lists. Comments of support from the community are welcome.
* The PR is merged and the proposed maintainer becomes a maintainer if either:
* Two weeks have passed since at least three (3) Maintainer PR approvals have been recorded, OR
* An absolute majority of maintainers have approved the PR.
* If the PR does not get the requisite PR approvals, it may be closed.
* Once the add maintainer PR has been merged, any necessary updates to the GitHub Teams are made.

## Removing Maintainers

Being a maintainer is not a status symbol or a title to be carried
indefinitely. It will occasionally be necessary and appropriate to move a
maintainer to emeritus status. This can occur in the following situations:

- Resignation of a maintainer.
- Violation of the Code of Conduct warranting removal.
- Inactivity.
- A general measure of inactivity will be no commits or code review comments
* Resignation of a maintainer.
* Violation of the Code of Conduct warranting removal.
* Inactivity.
* A general measure of inactivity will be no commits or code review comments
for one reporting quarter. This will not be strictly enforced if
the maintainer expresses a reasonable intent to continue contributing.
- Reasonable exceptions to inactivity will be granted for known long term
* Reasonable exceptions to inactivity will be granted for known long term
leave such as parental leave and medical leave.
- Other circumstances at the discretion of the other Maintainers.
* Other circumstances at the discretion of the other Maintainers.

The process to move a maintainer from active to emeritus status is comparable to the process for adding a maintainer, outlined above. In the case of voluntary
resignation, the Pull Request can be merged following a maintainer PR approval. If the removal is for any other reason, the following steps **SHOULD** be followed:

- A PR is created to update this file to move the maintainer to the list of emeritus maintainers.
- The PR is authored by, or has a comment supporting the proposal from, an existing maintainer or a member of the project's Technical Steering Commitee (TSC).
- Once the PR and necessary comments have been received, the approval timeframe begins.
- The PR **MAY** be communicated on appropriate communication channels, including relevant community calls, chat channels and mailing lists.
- The PR is merged and the maintainer transitions to maintainer emeritus if:
- The PR is approved by the maintainer to be transitioned, OR
- Two weeks have passed since at least three (3) Maintainer PR approvals have been recorded, OR
- An absolute majority of maintainers have approved the PR.
- If the PR does not get the requisite PR approvals, it may be closed.
* A PR is created to update this file to move the maintainer to the list of emeritus maintainers.
* The PR is authored by, or has a comment supporting the proposal from, an existing maintainer or a member of the project's Technical Steering Commitee (TSC).
* Once the PR and necessary comments have been received, the approval timeframe begins.
* The PR **MAY** be communicated on appropriate communication channels, including relevant community calls, chat channels and mailing lists.
* The PR is merged and the maintainer transitions to maintainer emeritus if:
* The PR is approved by the maintainer to be transitioned, OR
* Two weeks have passed since at least three (3) Maintainer PR approvals have been recorded, OR
* An absolute majority of maintainers have approved the PR.
* If the PR does not get the requisite PR approvals, it may be closed.

Returning to active status from emeritus status uses the same steps as adding a
new maintainer. Note that the emeritus maintainer already has the 5 required
Expand Down
2 changes: 1 addition & 1 deletion docs/site/content/en/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Solo docs
---

{{< blocks/cover title="Welcome to Solo" image_anchor="top" height="full" >}} <a class="btn btn-lg btn-primary me-3 mb-4" href="docs/">
{{< blocks/cover title="Welcome to Solo" image\_anchor="top" height="full" >}} <a class="btn btn-lg btn-primary me-3 mb-4" href="docs/">
Learn More <i class="fas fa-arrow-alt-circle-right ms-2"></i> </a>
{{< blocks/link-down color="info" >}}
{{< /blocks/cover >}}
Expand Down
2 changes: 1 addition & 1 deletion docs/site/content/en/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ linkTitle: About
menu: {main: {weight: 10}}
---

{{% blocks/cover title="About Solo" image_anchor="bottom" height="auto" %}}
{{% blocks/cover title="About Solo" image\_anchor="bottom" height="auto" %}}

### A Hiero Ledger tool for deploying and managing Hiero Ledger networks.

Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default [
'warn',
{
allowExpressions: false,
allowTypedFunctionExpressions: false,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: false,
},
],
Expand Down
9 changes: 9 additions & 0 deletions src/business/errors/read-remote-config-before-load-error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: Apache-2.0

import {SoloError} from '../../core/errors/solo-error.js';

export class ReadRemoteConfigBeforeLoadError extends SoloError {
public constructor(message: string, cause?: Error, meta?: object) {
super(message, cause, meta);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// SPDX-License-Identifier: Apache-2.0

import {SoloError} from '../../core/errors/solo-error.js';

export class WriteRemoteConfigBeforeLoadError extends SoloError {
public constructor(message: string, cause?: Error, meta?: object) {
super(message, cause, meta);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// SPDX-License-Identifier: Apache-2.0

import {
type ClusterReference,
type ClusterReferences,
type Context,
type DeploymentName,
} from '../../../types/index.js';
import {type NamespaceName} from '../../../types/namespace/namespace-name.js';
import {type ConfigMap} from '../../../integration/kube/resources/config-map/config-map.js';
import {type AnyObject, type ArgvStruct, type NodeAliases} from '../../../types/aliases.js';
import {type LedgerPhase} from '../../../data/schema/model/remote/ledger-phase.js';
import {type ConsensusNode} from '../../../core/model/consensus-node.js';
import {type ComponentFactoryApi} from '../../../core/config/remote/api/component-factory-api.js';
import {type RemoteConfig} from '../config/remote/remote-config.js';

export interface RemoteConfigRuntimeStateApi {
currentCluster: ClusterReference;
configuration?: RemoteConfig;

getClusterRefs(): ClusterReferences;
getContexts(): Context[];
getConsensusNodes(): ConsensusNode[];
deleteComponents(): Promise<void>;

isLoaded(): boolean;
load(namespace?: NamespaceName, context?: Context): Promise<void>;
populateRemoteConfig(configMap: ConfigMap): Promise<void>;
write(): Promise<void>;
persist(): Promise<void>;

create(
argv: ArgvStruct,
ledgerPhase: LedgerPhase,
nodeAliases: NodeAliases,
namespace: NamespaceName,
deployment: DeploymentName,
clusterReference: ClusterReference,
context: Context,
dnsBaseDomain: string,
dnsConsensusNodePattern: string,
): Promise<void>;

createFromExisting(
namespace: NamespaceName,
clusterReference: ClusterReference,
deployment: DeploymentName,
componentFactory: ComponentFactoryApi,
dnsBaseDomain: string,
dnsConsensusNodePattern: string,
existingClusterContext: Context,
argv: ArgvStruct,
nodeAliases: NodeAliases,
): Promise<void>;

addCommandToHistory(command: string): void;
createConfigMap(namespace: NamespaceName, context: Context): Promise<ConfigMap>;
getConfigMap(namespace?: NamespaceName, context?: Context): Promise<ConfigMap>;
loadAndValidate(
argv: {_: string[]} & AnyObject,
validate?: boolean,
skipConsensusNodesValidation?: boolean,
): Promise<void>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export class LocalConfigRuntimeState {
// Loads the source data and writes it back in case of migrations.
public async load(): Promise<void> {
if (!this.configFileExists()) {
return await this.persist();
await this.persist();
return;
}

try {
Expand Down
Loading
Loading