You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a suite of tests to cover interacting with a deployed agent, which we can do using testnet.polykey.io. These tests need to cover various different connection scenarios:
Connecting to a deployed agent as a seed node during startup
Pinging a deployed agent
Using the deployed agent as a signaller (and eventually a relay once this is implemented)
Any bugs that are discovered during the above tasks
These tests should go into their own subdirectory tests/testnet and should not be run with the other tests. They should be disabled in our jest config and should only run when explicitly called (which will happen during the integration stage of our pipelines).
Required tests:
tests/testnet/testnetConnection.test.ts
Can connect to the testnet
Within a reasonable amount of time
Without errors/shutting down the local agent
Without errors/shutting down the testnet
Can disconnect from the testnet
Within a reasonable amount of time
Without errors/shutting down the local agent
Without errors/shutting down the testnet
Can reconnect to the testnet
Able to handle different node ids (testnet is a cluster of nodes)
tests/testnet/testnetPing.test.ts
Can ping the testnet
Able to handle different node ids (testnet is a cluster of nodes)
Can ping another node via the testnet (signaling)
Can ping another node via the testnet (relay)
Can attempt to ping another node that doesn't exist
Without shutting down the testnet
tests/testnet/testnetNAT.test.ts
Can ping a node that is behind endpoint-independent NAT via the testnet
From a node that is not behind a NAT (DMZ)
From a node that is behind endpoint-independent NAT
From a node that is behind endpoint-dependent NAT
Can ping a node that is behind endpoint-dependent NAT via the testnet
From a node that is not behind a NAT (DMZ)
From a node that is behind endpoint-independent NAT
1. Attempt connections to the deployed seed node and create issues for all bugs discovered (and resolve them)
2. Create tests for simple connections to testnet.polykey.io
1 node connected to testnet.polykey.io and maintains connection
2 nodes connected to testnet.polykey.io and can ping each other (they will have the same IP but different ports)
[ ] 3. Create tests for edge cases and previous bugs - most edge cases will go to the simulation suite
[ ] 4. Create tests for connecting to a deployed seed node from behind a NAT - this can only be done as part of a simulation suite, since we don't control host firewalls
6. Add new INFO level logs for situations where connections are going into stopping. This is next to the debug logs.
[ ] 7. Add a logging debug filter to command line arguments to take a regular expression. Should be global option like --log='/regex/'. - not relevant to integration testing, the js-logger does support REGEX filtering, but the PK CLI currently doesn't have this option.
[ ] 9. agent status command needs to display useful information like the polykey version and other useful statistics like active connections, number of node graph entries etc etc.
[ ] 10. --client-host needs to support host names. - this is pending a change to being able to use PolykeyClient to connect to a host name - which would require using the DNS-SD SRV records. This still needs to be specced out how this would work because in some cases you want to connect to a SINGLE Node, in other cases you are "discovering" a node to connect to, but it's not relevant to this epic.
11. EC2 setup with idempotency
12. Multi Node Setup on AWS
13. Recovery Code Pool on AWS
14. Multi-Host DNS resolution
15. Multi Node Resolver
16. NodeGraph KeyPath to lift Host and Port to the key path
1. Seed node is failing to establish a reverse connection back to the connecting node. The problem is somewhere in ConnectionReverse.start() between Starting Connection Reverse and Started Connection Reverse. Start by testing locally.
Specification
We need a suite of tests to cover interacting with a deployed agent, which we can do using
testnet.polykey.io. These tests need to cover various different connection scenarios:These tests should go into their own subdirectory
tests/testnetand should not be run with the other tests. They should be disabled in our jest config and should only run when explicitly called (which will happen during the integration stage of our pipelines).Required tests:
tests/testnet/testnetConnection.test.tstests/testnet/testnetPing.test.tstests/testnet/testnetNAT.test.tsAdditional context
testnet.polykey.ioStarting Connection Forwardinfinite loop Polykey#413 - Issue for potential infinite loop when connecting to deployed seed nodeTasks
testnet.polykey.io[ ] 3. Create tests for edge cases and previous bugs- most edge cases will go to the simulation suite[ ] 4. Create tests for connecting to a deployed seed node from behind a NAT- this can only be done as part of a simulation suite, since we don't control host firewalls[ ] 7. Add a logging debug filter to command line arguments to take a regular expression. Should be global option like- not relevant to integration testing, the--log='/regex/'.js-loggerdoes support REGEX filtering, but the PK CLI currently doesn't have this option.[ ] 8. Use https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerOverride.html to be able to easily try different debugging levels and filters.- cannot use container overrides in services, can be done as part of tasks though, will have to just redeploy service with different task definition each time[ ] 9.agent statuscommand needs to display useful information like the polykey version and other useful statistics like active connections, number of node graph entries etc etc.[ ] 10.- this is pending a change to being able to use--client-hostneeds to support host names.PolykeyClientto connect to a host name - which would require using the DNS-SD SRV records. This still needs to be specced out how this would work because in some cases you want to connect to a SINGLE Node, in other cases you are "discovering" a node to connect to, but it's not relevant to this epic.src/config.ts- from Infrastructure setup for testnet should automate multiple instances for multiple nodes Polykey#488Emergent bugs
ConnectionReverse.start()betweenStarting Connection ReverseandStarted Connection Reverse. Start by testing locally.testnet.polykey.com#71testnet.polykey.com#71testnet.polykey.com#71