Skip to content
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

Multichain Testing - Single Command Startup #9855

Closed
Jovonni opened this issue Aug 6, 2024 · 1 comment · Fixed by #10002
Closed

Multichain Testing - Single Command Startup #9855

Jovonni opened this issue Aug 6, 2024 · 1 comment · Fixed by #10002
Labels
enhancement New feature or request

Comments

@Jovonni
Copy link
Contributor

Jovonni commented Aug 6, 2024

What is the Problem Being Solved?

currently, the multichain testing setup requires multiple commands to start. There is no readiness check to make sure containers are up and running before executing port-forwarding. Sometimes I have to re-run make port-forward for it to succeed after the deployment is finished.

Description of the Design

implement a readiness script to check the status of containers before runing the make port-forward command. Maybe we can modify the Makefile to integrate this readiness check, allowing for a single command startup process 🚀

A lazy makefile target I use is this:

teardown: stop-forward stop clean delete

all: setup install
	sleep 3
	make port-forward
	sleep 120
	make fund-provision-pool
	echo "done running"

Seen here:
https://github.com/Agoric/dapp-orchestration-basics/tree/dev/orca-v1#multichain-testing-makefile-helpers

Security Considerations

we can just make the readiness check does not introduce any security vulnerabilities, maybe with how container states are verified. This should be minimal since this is a test environment.

Scaling Considerations

the solution should scale well well with different numbers and types of containers too, and should be consistent behavior, mostly.

Test Plan

  • verify the readiness script works across all supported environments?
  • test the single command startup to ensure it functions as intended?

Upgrade Considerations

document the changes in the Makefile and ensure backward compatibility with existing setups. We can change the documentation where relevant as well.

@0xpatrickdev
Copy link
Member

I opened #10002. The only thing it's maybe missing is logic to ensure the latest agoric-sdk:dev docker image is pulled. I imagine after a first release, we might want to point to a tagged version instead of dev which updates on each merge to master.

imagePullPolicy: Always (in config.yaml) is supposed to do this, but I haven't observed it working. Maybe it should be scoped under chain but the starship helm config doesn't support that.

Alternatively, we maybe have a Makefile helper that does docker pull ghcr.io/agoric/agoric-sdk:dev, or at least document it.

0xpatrickdev added a commit that referenced this issue Sep 3, 2024
0xpatrickdev added a commit that referenced this issue Sep 3, 2024
@mergify mergify bot closed this as completed in #10002 Sep 3, 2024
mergify bot added a commit that referenced this issue Sep 3, 2024
closes: #9855

## Description
Adds a `pod-readiness.ts` script and documents a single command (`make start`) setup for starship multichain-testing.

Reviewers, please pull this down and try something like `make start && yarn test test/basic-flows.test.ts` to verify it's working.

### Security Considerations
n/a

### Scaling Considerations
n/a

### Documentation Considerations
Includes updated documentation.

### Testing Considerations
Manually tested by author and reviewers. In CI, the starship gh action does this check for us so this script is not needed there.

### Upgrade Considerations
n/a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants