[Health Checks] Provision RPC module before P2P module #972
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, the P2P module fails to connect to other nodes because they are marked as unhealthy. In Kubernetes, by default, when a Pod is marked as unhealthy, it won't be resolved or discovered via DNS. As a result, when the network is provisioned from scratch and all nodes start at the same time, none of them can become healthy.
Provisioning the RPC module ahead of P2P makes health checks pass, allowing P2P to discover other nodes.
Summary generated by Reviewpad on 08 Aug 23 00:51 UTC
This pull request includes two patches.
Patch 1/3 disables health checks for the localnet build. It modifies the Tiltfile and statefulset.yaml files to set the "healthchecks.enabled" property to false. This change will disable liveness and readiness probes for the Pocket application running in the localnet environment.
Patch 2/3 modifies the Tiltfile and node.go files to provision the RPC module before the P2P module, allowing healthchecks to pass. This change rearranges the order in which the different modules of the Pocket application start, ensuring that the RPC module starts before the P2P module.
Overall, these patches aim to improve the development and testing experience by managing the health checks in the localnet environment and ensuring the correct order of module startup.
Issue
This has been reported on discord a few times.
Type of change
Please mark the relevant option(s):
List of changes
Testing
make develop_test; if any code changes were mademake test_e2eon k8s LocalNet; if any code changes were madee2e-devnet-testpasses tests on DevNet; if any code was changedRequired Checklist
godocformat comments on touched members (see: tip.golang.org/doc/comment)