fix: propagate shared resource values and rerun mirror postgres init#4650
fix: propagate shared resource values and rerun mirror postgres init#4650JeffreyDallas wants to merge 12 commits into
Conversation
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
110e9da to
60d08e4
Compare
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
|
Migration CI follow-up: the failure was caused by the Postgres init wrapper reading the database sentinel with Commit |
There was a problem hiding this comment.
Cleanup rogue function exports, look for opportunity to make the code more readable, avoid unnecessary complexion
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
There was a problem hiding this comment.
Files exporting rogue functions are unwanted, if you need help with figuring out how to where/and how to refactor this, feel free to reach-out to teammembers
There was a problem hiding this comment.
updated.
Added new rule to coding style to enforce the rogue function requirment
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
Summary
solo.hashgraph.io/rolescheduling from mirror-node component values when Redis does not define it explicitly.--ingress-controller-value-fileconsistently for explorer ingress controller installs.Root Cause
There were four related failure modes:
solo.hashgraph.io/role. The mirror-node values put that role scheduling on mirror-node components, but Redis did not define role scheduling directly. Redis therefore still lacked the role toleration after owner/network propagation was fixed.nodeSelector/tolerations, and mirror/explorer HAProxy ingress controllers are installed as separate Helm releases. Those pods could remain Pending even after shared resources were fixed.installSharedResources=falsebecause the shared-resources release already existed. The mirror-node command used that flag to skip Postgres initialization, even though the mirror-node DB roles/users may not have been created yet.installSharedResourcesonly tells us whether the shared-resources chart needs to be installed in this run. It is not a valid signal that mirror-node Postgres has already been initialized. The existing initialization code is idempotent through thesolo-initializeddatabase comment sentinel, so it is safe to invoke for every internal DB deployment.Closes #4649.
Validation
npx mocha 'test/unit/core/shared-resources/shared-resource-manager.test.ts'MOCHA_SUITE_NAME="MirrorNodeCommand" npx mocha 'test/unit/commands/mirror-node.test.ts'npx mocha test/unit/core/util/helm-scheduling-values.test.ts test/unit/commands/mirror-node.test.ts test/unit/commands/explorer.test.tsnpx tsc --noEmit --pretty falsenpx eslint src/core/shared-resources/shared-resource-manager.ts test/unit/core/shared-resources/shared-resource-manager.test.tsnpx eslint src/commands/mirror-node.ts test/unit/commands/mirror-node.test.tstask buildtask formattask checktask build,task format, andtask checkcompleted successfully with the repository's existing lint/typedoc warnings.