forked from hyperlane-xyz/hyperlane-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(infra): fetch registry on warp monitor startup (hyperlane-xyz#5246)
### Description feat: fetch registry on warp monitor startup can describe pod to get the registry commit that a monitor was deployed with ``` kubectl describe pod hyperlane-warp-route-brett-base-zeronetwork-0 | grep REGISTRY REGISTRY_COMMIT: v6.19.1 ``` ### Drive-by changes - add the entrypoint in monorepo Dockerfile to fetch registry at startup - opens the path for removing the registry fetching from the image build entirely, once other monorepo users (e.g. keyfunder/kathy) specify their own registry commit to run with - get mailbox addresses from regular registry chain addresses instead of via warp route configs ### Related issues resolves hyperlane-xyz#5174 resolves hyperlane-xyz#5257 ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing - spun up a BRETT/base-zeronetwork warp monitor ```sh kubectl logs hyperlane-warp-route-brett-base-zeronetwork-0 Updating Hyperlane registry to commit: v6.19.1 From https://github.com/hyperlane-xyz/hyperlane-registry * tag v6.19.1 -> FETCH_HEAD Previous HEAD position was 80023dd feat: Add OP extension and Trumpchain warp route (hyperlane-xyz#507) HEAD is now at e87c85f Version Packages (hyperlane-xyz#508) bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?) {"level":30,"time":1737556333704,"pid":29,"module":"warp-balance-monitor","labels":{"chain_name":"zeronetwork","token_address":"0xf7F253769c36CC7e1B01988CFf3aE198dea2c172","token_name":"Brett","wallet_address":"0xf7F253769c36CC7e1B01988CFf3aE198dea2c172","token_standard":"EvmHypSynthetic","warp_route_id":"BRETT/base-zeronetwork","related_chain_names":"base"},"balance":1e-18,"msg":"Wallet balance updated for token"} ... etc ``` confirmed it's validating the given commit exists <img width="571" alt="image" src="https://github.com/user-attachments/assets/47f7ebe8-3c64-458e-b504-43557665fd02" />
- Loading branch information
1 parent
11cf66c
commit e4c9c7d
Showing
10 changed files
with
91 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Set default registry URI, same as Dockerfile | ||
REGISTRY_URI="/hyperlane-registry" | ||
|
||
# Only update registry if REGISTRY_COMMIT is set | ||
if [ -n "$REGISTRY_COMMIT" ]; then | ||
echo "Updating Hyperlane registry to commit: ${REGISTRY_COMMIT}" | ||
OLDPWD=$(pwd) | ||
cd "$REGISTRY_URI" | ||
git fetch origin "$REGISTRY_COMMIT" | ||
git checkout "$REGISTRY_COMMIT" | ||
cd "$OLDPWD" | ||
fi | ||
|
||
# Execute the main container command | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters