refactor(infra): centralize Docker image/tag configuration#7705
refactor(infra): centralize Docker image/tag configuration#7705paulbalaji merged 7 commits intomainfrom
Conversation
|
984d745 to
d8c85ad
Compare
📝 WalkthroughWalkthroughCentralizes Docker image repositories and tags by adding Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant DockerCfg as docker.ts
participant EnvConfs as Env configs (mainnet/testnet)
participant Helm as Helm charts (rebalancer/warp)
DockerCfg->>EnvConfs: export DockerImageRepos + tag constants
DockerCfg->>Helm: export DockerImageRepos + tag constants
EnvConfs->>Helm: import centralized image refs for deployments
note right of Helm: Helm + env configs now consume\ncentralized repo & tag values
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)typescript/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (9)📓 Common learnings📚 Learning: 2025-08-13T16:53:55.163ZApplied to files:
📚 Learning: 2025-12-29T19:45:12.592ZApplied to files:
📚 Learning: 2025-08-26T13:45:52.227ZApplied to files:
📚 Learning: 2025-10-27T15:54:48.485ZApplied to files:
📚 Learning: 2025-12-01T18:31:31.913ZApplied to files:
📚 Learning: 2025-12-18T22:36:13.445ZApplied to files:
📚 Learning: 2025-12-16T17:23:10.420ZApplied to files:
📚 Learning: 2025-10-07T12:58:38.429ZApplied to files:
🧬 Code graph analysis (1)typescript/infra/config/environments/mainnet3/agent.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (60)
🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
typescript/infra/src/warp/helm.ts (1)
105-106: Proper use of centralized Docker image config.Replacing the hardcoded image repo and tag with centralized constants is the right move here. This gives you a single source of truth for all your image references.
Since
warpMonitoronly exists inmainnetDockerTags(not intestnetDockerTags), this naturally enforces mainnet-only deployment through type safety. If you ever need to explicitly guard against testnet deployment, consider adding a runtime check in the constructor orrunPreflightChecks.typescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts (1)
7-8: The non-null assertion isn't needed here.Since
checkWarpDeployis always defined in themainnetDockerTagsobject (it's a required field in theMainnetDockerTagsinterface), the!operator on line 8 doesn't add any value. TypeScript already knows this property exists and is a string.🔎 Proposed simplification
docker: { repo: DockerImageRepos.MONOREPO, - tag: mainnetDockerTags.checkWarpDeploy!, + tag: mainnetDockerTags.checkWarpDeploy, },typescript/infra/config/docker.ts (1)
8-25: Interface hierarchy is well thought out.The layering makes sense: agents get their tags, base adds the common services, and mainnet adds the production-only stuff. Nice separation.
One thing to consider: these interfaces aren't exported. If someone wanted to write a helper function that takes a tag config as a parameter, they'd have to use
typeof mainnetDockerTagsinstead of the interface name. Not a big deal since type inference handles most cases, but worth thinking about whether you want that flexibility.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between bc359c6 and d8c85ad8a474349e843475e578575c07a3a52494.
📒 Files selected for processing (10)
typescript/infra/config/docker.tstypescript/infra/config/environments/mainnet3/agent.tstypescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/mainnet3/helloworld.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.tstypescript/infra/config/environments/testnet4/agent.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/testnet4/helloworld.tstypescript/infra/src/rebalancer/helm.tstypescript/infra/src/warp/helm.ts
🧰 Additional context used
📓 Path-based instructions (1)
typescript/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
typescript/**/*.{ts,tsx}: UseChainMapfor per-chain configurations in TypeScript
Import types from@hyperlane-xyz/sdkwhen using TypeScript SDK types
Files:
typescript/infra/config/environments/mainnet3/agent.tstypescript/infra/src/warp/helm.tstypescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/helloworld.tstypescript/infra/config/environments/mainnet3/helloworld.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/docker.tstypescript/infra/config/environments/testnet4/agent.tstypescript/infra/src/rebalancer/helm.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts
🧠 Learnings (13)
📓 Common learnings
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:12.592Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, Docker image tags in Helm managers (e.g., typescript/infra/src/rebalancer/helm.ts) are intentionally hardcoded for reproducibility and explicit version control, rather than using dynamically generated CI tags.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6891
File: typescript/infra/config/environments/mainnet3/funding.ts:22-22
Timestamp: 2025-08-13T16:53:55.163Z
Learning: In Hyperlane mainnet3 configs, funding.ts uses 'gcr.io/abacus-labs-dev/hyperlane-monorepo' docker image while agent.ts uses 'gcr.io/abacus-labs-dev/hyperlane-agent' docker image. These are different images with independent tag cycles, so tag consistency across them is not expected.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/testnet_config.json in future code reviews as requested by paulbalaji.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/mainnet_config.json in future code reviews as requested by paulbalaji.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/testnet_config.json:34-35
Timestamp: 2025-08-26T13:45:52.227Z
Learning: Skip reviewing mainnet_config.json and testnet_config.json configuration files in typescript/infra/config/ and rust/main/config/ directories as requested by paulbalaji to reduce review noise.
📚 Learning: 2025-08-13T16:53:55.163Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6891
File: typescript/infra/config/environments/mainnet3/funding.ts:22-22
Timestamp: 2025-08-13T16:53:55.163Z
Learning: In Hyperlane mainnet3 configs, funding.ts uses 'gcr.io/abacus-labs-dev/hyperlane-monorepo' docker image while agent.ts uses 'gcr.io/abacus-labs-dev/hyperlane-agent' docker image. These are different images with independent tag cycles, so tag consistency across them is not expected.
Applied to files:
typescript/infra/config/environments/mainnet3/agent.tstypescript/infra/src/warp/helm.tstypescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/helloworld.tstypescript/infra/config/environments/mainnet3/helloworld.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/docker.tstypescript/infra/config/environments/testnet4/agent.tstypescript/infra/src/rebalancer/helm.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts
📚 Learning: 2025-12-29T19:45:12.592Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:12.592Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, Docker image tags in Helm managers (e.g., typescript/infra/src/rebalancer/helm.ts) are intentionally hardcoded for reproducibility and explicit version control, rather than using dynamically generated CI tags.
Applied to files:
typescript/infra/config/environments/mainnet3/agent.tstypescript/infra/src/warp/helm.tstypescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/helloworld.tstypescript/infra/config/environments/mainnet3/helloworld.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/docker.tstypescript/infra/config/environments/testnet4/agent.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts
📚 Learning: 2025-08-26T13:45:52.227Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/testnet_config.json:34-35
Timestamp: 2025-08-26T13:45:52.227Z
Learning: Skip reviewing mainnet_config.json and testnet_config.json configuration files in typescript/infra/config/ and rust/main/config/ directories as requested by paulbalaji to reduce review noise.
Applied to files:
typescript/infra/config/environments/mainnet3/agent.tstypescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/helloworld.tstypescript/infra/config/environments/mainnet3/helloworld.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/testnet4/agent.tstypescript/infra/src/rebalancer/helm.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts
📚 Learning: 2025-10-07T12:58:38.429Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7166
File: typescript/sdk/src/consts/multisigIsm.ts:2167-2175
Timestamp: 2025-10-07T12:58:38.429Z
Learning: When deploying new chains to mainnet in the Hyperlane monorepo, the team bootstraps with a single validator (threshold: 1) initially, and then adds more validators in a subsequent PR before taking the chain to production.
Applied to files:
typescript/infra/config/environments/mainnet3/agent.tstypescript/infra/config/environments/testnet4/agent.ts
📚 Learning: 2025-06-16T11:17:55.750Z
Learnt from: xeno097
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6486
File: typescript/cli/src/tests/warp/warp-check.e2e-test.ts:490-494
Timestamp: 2025-06-16T11:17:55.750Z
Learning: In the Hyperlane registry, the label part of warp IDs can now be any value that matches the registry's regex requirements, not just actual chain names. This means functions like getCombinedWarpRoutePath can accept descriptive filenames like WARP_DEPLOY_DEFAULT_FILE_NAME as valid label components for constructing registry paths.
Applied to files:
typescript/infra/src/warp/helm.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts
📚 Learning: 2025-11-26T13:28:51.658Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7410
File: typescript/cli/package.json:20-20
Timestamp: 2025-11-26T13:28:51.658Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, hyperlane-xyz/registry is maintained in a separate repository and published to npm, so it should use a pinned version (e.g., "23.6.0") rather than the workspace protocol ("workspace:*") that other internal Hyperlane packages use.
Applied to files:
typescript/infra/src/warp/helm.ts
📚 Learning: 2025-12-18T22:36:13.445Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-18T22:36:13.445Z
Learning: Chain metadata lives in external `hyperlane-xyz/registry` package, not in the main repository
Applied to files:
typescript/infra/src/warp/helm.tstypescript/infra/config/environments/testnet4/agent.ts
📚 Learning: 2025-10-24T18:58:44.557Z
Learnt from: xeno097
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7253
File: typescript/infra/scripts/funding/fund-wallet-from-deployer-key.ts:285-289
Timestamp: 2025-10-24T18:58:44.557Z
Learning: In the Hyperlane funding script (typescript/infra/scripts/funding/fund-wallet-from-deployer-key.ts), tokens with 0 decimals are not valid and should be rejected. The truthy check on decimals is intentional and correct for this use case.
Applied to files:
typescript/infra/config/environments/mainnet3/funding.ts
📚 Learning: 2025-10-27T15:54:48.485Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7090
File: typescript/infra/src/utils/safe.ts:83-87
Timestamp: 2025-10-27T15:54:48.485Z
Learning: In the Hyperlane monorepo, safes are only used on mainnet3 environment with Hyperlane context, so hard-coded values for these parameters in safe-related functions are acceptable.
Applied to files:
typescript/infra/config/environments/mainnet3/funding.ts
📚 Learning: 2025-08-26T13:45:29.848Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: typescript/infra/config/environments/testnet4/ism/verification.json:3835-3939
Timestamp: 2025-08-26T13:45:29.848Z
Learning: Skip reviewing verification.json files in typescript/infra/config/environments/testnet4/ism/verification.json and similar verification.json files as requested by paulbalaji.
Applied to files:
typescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/testnet4/agent.ts
📚 Learning: 2025-12-29T19:45:05.429Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:05.429Z
Learning: In typescript/infra/src/rebalancer/helm.ts within the hyperlane-xyz/hyperlane-monorepo, Docker image tags should be hardcoded for reproducibility and explicit version control instead of relying on dynamically generated CI tags. When reviewing this file, verify that the code uses fixed tag strings (e.g., Docker image: 'typescript/infra:1.2.3' or similar) and avoid constructing image tags from CI-derived variables or timestamps. This ensures stable, auditable builds and predictable deployments.
Applied to files:
typescript/infra/src/rebalancer/helm.ts
📚 Learning: 2025-12-18T22:36:13.445Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-18T22:36:13.445Z
Learning: Most deployments are config-driven; check `typescript/infra/config/` for deployment configuration examples
Applied to files:
typescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts
🧬 Code graph analysis (7)
typescript/infra/config/environments/mainnet3/agent.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)mainnetDockerTags(27-38)
typescript/infra/src/warp/helm.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)mainnetDockerTags(27-38)
typescript/infra/config/environments/mainnet3/funding.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)mainnetDockerTags(27-38)
typescript/infra/config/environments/testnet4/helloworld.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)testnetDockerTags(40-48)
typescript/infra/config/environments/mainnet3/helloworld.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)mainnetDockerTags(27-38)
typescript/infra/config/environments/testnet4/funding.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)testnetDockerTags(40-48)
typescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts (2)
typescript/infra/src/config/funding.ts (1)
CheckWarpDeployConfig(41-43)typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)mainnetDockerTags(27-38)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Greptile Review
🔇 Additional comments (23)
typescript/infra/src/warp/helm.ts (1)
15-15: Clean centralization of Docker config imports.The import path looks good and brings in the centralized constants needed for this Helm manager.
typescript/infra/src/rebalancer/helm.ts (2)
13-13: Good - centralized config imported correctly.The import brings in what you need for the rebalancer Docker configuration.
91-92: Centralized Docker config properly applied.Nice work replacing the hardcoded image repo and tag with the centralized constants. This maintains the reproducibility and explicit version control that hardcoded tags provide, while giving you a single place to manage all these values.
The
rebalancertag only exists inmainnetDockerTags, which naturally limits this to mainnet deployments through type checking.Based on learnings, hardcoded tags are intentional for reproducibility - this refactoring maintains that principle while improving maintainability.
typescript/infra/config/environments/testnet4/funding.ts (2)
4-4: Correct import for testnet configuration.The import path resolves properly and brings in the testnet-specific Docker tags as expected.
13-14: Testnet Docker config looks solid.Using
DockerImageRepos.MONOREPOwithtestnetDockerTags.keyFunderis the right approach for the testnet4 key funder configuration. The centralized config makes it easy to update tags across environments.typescript/infra/config/environments/mainnet3/funding.ts (2)
6-6: Mainnet config import is spot on.Bringing in
DockerImageReposandmainnetDockerTagsfrom the centralized config - exactly what this file needs.
39-40: Mainnet Docker config applied correctly.The key funder config now uses
DockerImageRepos.MONOREPOwithmainnetDockerTags.keyFunder. This is the proper setup for mainnet and maintains the separation between MONOREPO and AGENT images (which have independent tag cycles).The centralization gives you a single place to bump tags when needed.
typescript/infra/config/environments/testnet4/helloworld.ts (3)
6-6: Import looks good.The centralized Docker config is imported correctly for the testnet4 HelloWorld setup.
16-17: Hyperlane Kathy config updated properly.Using the centralized
DockerImageRepos.MONOREPOandtestnetDockerTags.kathyfor the Kathy service - this matches the pattern used across other testnet configs.
35-36: Release candidate Kathy config matches hyperlane.The release candidate context uses the same centralized Docker config as the hyperlane context - both pointing to
testnetDockerTags.kathy. This is consistent and makes sense for testnet deployments.typescript/infra/config/environments/mainnet3/agent.ts (4)
36-36: LGTM! Clean import of centralized Docker constants.The import brings in the shared config that'll be used throughout the agent definitions.
870-904: Nice consolidation of Docker configs for the hyperlane context.All three agent types (relayer, validator, scraper) now reference the centralized constants. This makes version updates much simpler - just change one file instead of hunting through multiple configs.
916-942: Release candidate configs look solid.Both relayer and validator configs properly use the RC-specific tags from the centralized config.
960-963: Neutron relayer config updated correctly.Uses the RC tag, which makes sense for the neutron context.
typescript/infra/config/environments/testnet4/agent.ts (4)
24-24: Import looks good for testnet4.Brings in the testnet-specific Docker tags, which is the right choice for this environment.
346-381: Hyperlane context configs properly updated.All three agent types (relayer, validator, scraper) now reference the centralized testnet constants. Consistent pattern with the mainnet configs.
391-418: Release candidate configs migrated cleanly.Both relayer and validator use the testnet RC tags from the centralized config.
439-466: Neutron configs follow the same pattern.Relayer and validator both reference the RC tags, which aligns with the mainnet3 approach.
typescript/infra/config/environments/mainnet3/helloworld.ts (3)
6-6: Import statement brings in the right constants.
15-18: Hyperlane kathy config updated properly.Uses the MONOREPO image and the centralized kathy tag.
35-38: Release candidate kathy config follows suit.Same pattern as the hyperlane context - clean and consistent.
typescript/infra/config/docker.ts (2)
1-6: Solid foundation for the centralized config.The
as constassertion is the right call here - gives you readonly properties with literal types instead of juststring. That extra type safety can catch mistakes at compile time.
27-48: Tag configurations look reasonable.The different tag values across services make sense - as noted in the learnings, different images have independent release cycles. Agent services (relayer, validator, scraper) share the same tag within each environment, which makes sense for consistency.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7705 +/- ##
=======================================
Coverage 77.02% 77.02%
=======================================
Files 117 117
Lines 2651 2651
Branches 244 244
=======================================
Hits 2042 2042
Misses 593 593
Partials 16 16
🚀 New features to boost your workflow:
|
Create typescript/infra/config/docker.ts as a single source of truth for non-agent Docker image repositories and tags. This consolidates previously scattered hardcoded values across multiple config files. Changes: - Add DockerImageRepos const for image repository URLs - Add mainnetDockerTags and testnetDockerTags for per-service, per-env tags - Add getDockerTagsForEnv() helper for environment-based tag lookup - Update key-funder, kathy, check-warp-deploy, warp-monitor, and rebalancer configs to use the centralized configuration Services covered: - Key Funder (mainnet3, testnet4) - Kathy/HelloWorld (mainnet3, testnet4) - Check Warp Deploy (mainnet3 only) - Warp Monitor (both envs) - Rebalancer (both envs)
Add AGENT repo and relayer/relayerRC/validator/validatorRC/scraper tags to the centralized docker.ts configuration file.
Replace local repo variable and hardcoded tags in mainnet3 and testnet4 agent.ts with imports from the centralized docker.ts config file.
- Remove unused helper function, reference consts directly - Remove warpMonitor/rebalancer from testnet (mainnet-only) - Rename TestnetDockerTags to BaseDockerTags
d8c85ad to
ebfe37f
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @typescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts:
- Line 8: Remove the redundant non-null assertion on
mainnetDockerTags.checkWarpDeploy: replace the usage of
"mainnetDockerTags.checkWarpDeploy!" with "mainnetDockerTags.checkWarpDeploy"
(referencing the tag assignment and the MainnetDockerTags type), since
checkWarpDeploy is required in the MainnetDockerTags interface and the assertion
is unnecessary.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between d8c85ad8a474349e843475e578575c07a3a52494 and ebfe37f.
📒 Files selected for processing (10)
typescript/infra/config/docker.tstypescript/infra/config/environments/mainnet3/agent.tstypescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/mainnet3/helloworld.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.tstypescript/infra/config/environments/testnet4/agent.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/testnet4/helloworld.tstypescript/infra/src/rebalancer/helm.tstypescript/infra/src/warp/helm.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- typescript/infra/src/warp/helm.ts
- typescript/infra/config/environments/mainnet3/helloworld.ts
- typescript/infra/config/docker.ts
- typescript/infra/config/environments/testnet4/agent.ts
🧰 Additional context used
📓 Path-based instructions (1)
typescript/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
typescript/**/*.{ts,tsx}: UseChainMapfor per-chain configurations in TypeScript
Import types from@hyperlane-xyz/sdkwhen using TypeScript SDK types
Files:
typescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/mainnet3/agent.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.tstypescript/infra/src/rebalancer/helm.tstypescript/infra/config/environments/testnet4/helloworld.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6891
File: typescript/infra/config/environments/mainnet3/funding.ts:22-22
Timestamp: 2025-08-13T16:53:55.163Z
Learning: In Hyperlane mainnet3 configs, funding.ts uses 'gcr.io/abacus-labs-dev/hyperlane-monorepo' docker image while agent.ts uses 'gcr.io/abacus-labs-dev/hyperlane-agent' docker image. These are different images with independent tag cycles, so tag consistency across them is not expected.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:12.592Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, Docker image tags in Helm managers (e.g., typescript/infra/src/rebalancer/helm.ts) are intentionally hardcoded for reproducibility and explicit version control, rather than using dynamically generated CI tags.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/testnet_config.json in future code reviews as requested by paulbalaji.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/mainnet_config.json in future code reviews as requested by paulbalaji.
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/testnet_config.json:34-35
Timestamp: 2025-08-26T13:45:52.227Z
Learning: Skip reviewing mainnet_config.json and testnet_config.json configuration files in typescript/infra/config/ and rust/main/config/ directories as requested by paulbalaji to reduce review noise.
📚 Learning: 2025-08-13T16:53:55.163Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6891
File: typescript/infra/config/environments/mainnet3/funding.ts:22-22
Timestamp: 2025-08-13T16:53:55.163Z
Learning: In Hyperlane mainnet3 configs, funding.ts uses 'gcr.io/abacus-labs-dev/hyperlane-monorepo' docker image while agent.ts uses 'gcr.io/abacus-labs-dev/hyperlane-agent' docker image. These are different images with independent tag cycles, so tag consistency across them is not expected.
Applied to files:
typescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/mainnet3/agent.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.tstypescript/infra/src/rebalancer/helm.tstypescript/infra/config/environments/testnet4/helloworld.ts
📚 Learning: 2025-12-29T19:45:12.592Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:12.592Z
Learning: In the hyperlane-xyz/hyperlane-monorepo repository, Docker image tags in Helm managers (e.g., typescript/infra/src/rebalancer/helm.ts) are intentionally hardcoded for reproducibility and explicit version control, rather than using dynamically generated CI tags.
Applied to files:
typescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/mainnet3/agent.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.tstypescript/infra/config/environments/testnet4/helloworld.ts
📚 Learning: 2025-08-26T13:45:52.227Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/testnet_config.json:34-35
Timestamp: 2025-08-26T13:45:52.227Z
Learning: Skip reviewing mainnet_config.json and testnet_config.json configuration files in typescript/infra/config/ and rust/main/config/ directories as requested by paulbalaji to reduce review noise.
Applied to files:
typescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/mainnet3/agent.tstypescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.tstypescript/infra/src/rebalancer/helm.tstypescript/infra/config/environments/testnet4/helloworld.ts
📚 Learning: 2025-10-24T18:58:44.557Z
Learnt from: xeno097
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7253
File: typescript/infra/scripts/funding/fund-wallet-from-deployer-key.ts:285-289
Timestamp: 2025-10-24T18:58:44.557Z
Learning: In the Hyperlane funding script (typescript/infra/scripts/funding/fund-wallet-from-deployer-key.ts), tokens with 0 decimals are not valid and should be rejected. The truthy check on decimals is intentional and correct for this use case.
Applied to files:
typescript/infra/config/environments/mainnet3/funding.tstypescript/infra/config/environments/testnet4/funding.ts
📚 Learning: 2025-10-27T15:54:48.485Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7090
File: typescript/infra/src/utils/safe.ts:83-87
Timestamp: 2025-10-27T15:54:48.485Z
Learning: In the Hyperlane monorepo, safes are only used on mainnet3 environment with Hyperlane context, so hard-coded values for these parameters in safe-related functions are acceptable.
Applied to files:
typescript/infra/config/environments/mainnet3/funding.ts
📚 Learning: 2025-08-26T13:45:29.848Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: typescript/infra/config/environments/testnet4/ism/verification.json:3835-3939
Timestamp: 2025-08-26T13:45:29.848Z
Learning: Skip reviewing verification.json files in typescript/infra/config/environments/testnet4/ism/verification.json and similar verification.json files as requested by paulbalaji.
Applied to files:
typescript/infra/config/environments/testnet4/funding.tstypescript/infra/config/environments/testnet4/helloworld.ts
📚 Learning: 2025-10-07T12:58:38.429Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7166
File: typescript/sdk/src/consts/multisigIsm.ts:2167-2175
Timestamp: 2025-10-07T12:58:38.429Z
Learning: When deploying new chains to mainnet in the Hyperlane monorepo, the team bootstraps with a single validator (threshold: 1) initially, and then adds more validators in a subsequent PR before taking the chain to production.
Applied to files:
typescript/infra/config/environments/mainnet3/agent.ts
📚 Learning: 2025-12-18T22:36:13.445Z
Learnt from: CR
Repo: hyperlane-xyz/hyperlane-monorepo PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-18T22:36:13.445Z
Learning: Most deployments are config-driven; check `typescript/infra/config/` for deployment configuration examples
Applied to files:
typescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts
📚 Learning: 2025-12-29T19:45:05.429Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 7545
File: typescript/infra/src/rebalancer/helm.ts:82-83
Timestamp: 2025-12-29T19:45:05.429Z
Learning: In typescript/infra/src/rebalancer/helm.ts within the hyperlane-xyz/hyperlane-monorepo, Docker image tags should be hardcoded for reproducibility and explicit version control instead of relying on dynamically generated CI tags. When reviewing this file, verify that the code uses fixed tag strings (e.g., Docker image: 'typescript/infra:1.2.3' or similar) and avoid constructing image tags from CI-derived variables or timestamps. This ensures stable, auditable builds and predictable deployments.
Applied to files:
typescript/infra/src/rebalancer/helm.ts
📚 Learning: 2025-08-26T13:46:37.695Z
Learnt from: paulbalaji
Repo: hyperlane-xyz/hyperlane-monorepo PR: 6943
File: rust/main/config/mainnet_config.json:965-965
Timestamp: 2025-08-26T13:46:37.695Z
Learning: In the repository hyperlane-xyz/hyperlane-monorepo, skip reviewing the file rust/main/config/testnet_config.json in future code reviews as requested by paulbalaji.
Applied to files:
typescript/infra/config/environments/testnet4/helloworld.ts
🧬 Code graph analysis (3)
typescript/infra/config/environments/testnet4/funding.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)testnetDockerTags(40-48)
typescript/infra/config/environments/mainnet3/agent.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)mainnetDockerTags(27-38)
typescript/infra/src/rebalancer/helm.ts (1)
typescript/infra/config/docker.ts (2)
DockerImageRepos(1-6)mainnetDockerTags(27-38)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (60)
- GitHub Check: env-test-matrix (mainnet3, ethereum, igp)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
- GitHub Check: cli-evm-e2e-matrix (warp-check-2)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-hook-updates)
- GitHub Check: cli-evm-e2e-matrix (warp-init)
- GitHub Check: cli-evm-e2e-matrix (warp-check-3)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-ownership-updates)
- GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
- GitHub Check: cli-evm-e2e-matrix (warp-read)
- GitHub Check: cli-evm-e2e-matrix (warp-send)
- GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
- GitHub Check: cli-evm-e2e-matrix (warp-check-5)
- GitHub Check: cli-evm-e2e-matrix (warp-check-1)
- GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
- GitHub Check: cli-evm-e2e-matrix (core-check)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
- GitHub Check: cli-evm-e2e-matrix (core-deploy)
- GitHub Check: cli-evm-e2e-matrix (core-apply)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
- GitHub Check: cli-evm-e2e-matrix (warp-check-4)
- GitHub Check: cli-evm-e2e-matrix (status)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-rebalancing-config)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-simple-updates)
- GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
- GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
- GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
- GitHub Check: cli-evm-e2e-matrix (core-read)
- GitHub Check: cli-evm-e2e-matrix (relay)
- GitHub Check: cli-evm-e2e-matrix (core-init)
- GitHub Check: env-test-matrix (mainnet3, ethereum, core)
- GitHub Check: env-test-matrix (testnet4, sepolia, core)
- GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
- GitHub Check: env-test-matrix (mainnet3, optimism, core)
- GitHub Check: env-test-matrix (mainnet3, optimism, igp)
- GitHub Check: env-test-matrix (mainnet3, arbitrum, igp)
- GitHub Check: cli-radix-e2e-matrix (warp-deploy)
- GitHub Check: cli-cosmos-e2e-matrix (warp-read)
- GitHub Check: cli-cosmos-e2e-matrix (core-apply)
- GitHub Check: cli-cosmos-e2e-matrix (core-read)
- GitHub Check: cli-cosmos-e2e-matrix (core-check)
- GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
- GitHub Check: aleo-sdk-e2e-run
- GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
- GitHub Check: pnpm-test-run
- GitHub Check: cli-radix-e2e-matrix (core-deploy)
- GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
- GitHub Check: cli-radix-e2e-matrix (core-apply)
- GitHub Check: cli-install-test-run
- GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
- GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
- GitHub Check: cosmos-sdk-e2e-run
- GitHub Check: infra-test
- GitHub Check: build-and-push-to-gcr
- GitHub Check: e2e-matrix (evm)
- GitHub Check: agent-configs (mainnet3)
- GitHub Check: test-rs
- GitHub Check: lint-rs
- GitHub Check: lander-coverage
🔇 Additional comments (6)
typescript/infra/src/rebalancer/helm.ts (1)
13-13: LGTM! Centralized configuration makes life easier.The refactor moves hardcoded Docker image details to centralized constants while maintaining the reproducibility benefits of fixed tags. The import path and constant usage are correct.
Based on learnings, Docker image tags in Helm managers are intentionally hardcoded for reproducibility—this change preserves that by using fixed strings defined in
docker.tsrather than dynamic values.Also applies to: 91-92
typescript/infra/config/environments/testnet4/funding.ts (1)
4-4: Looks solid! Testnet config properly uses testnet tags.The import and usage of
DockerImageRepos.MONOREPOandtestnetDockerTags.keyFunderare correct. This aligns with the pattern where funding configs use the monorepo image rather than the agent image.Also applies to: 13-14
typescript/infra/config/environments/testnet4/helloworld.ts (1)
6-6: All good here! Both HelloWorld configs updated consistently.The import and usage of
DockerImageRepos.MONOREPOwithtestnetDockerTags.kathyare correct for bothhyperlaneHelloworldandreleaseCandidateHelloworldconfigs. Nice and clean.Also applies to: 16-17, 35-36
typescript/infra/config/environments/mainnet3/agent.ts (1)
40-40: Agent configs updated properly across all contexts.The import and usage of
DockerImageRepos.AGENTwith variousmainnetDockerTags(relayer, validator, scraper, relayerRC, validatorRC) are correct throughout. The separation of agent-specific tags maintains the distinct versioning for different agent roles.Based on learnings, agent configs correctly use the
hyperlane-agentimage (distinct from thehyperlane-monorepoimage used in funding configs).Also applies to: 896-897, 916-917, 927-928, 942-943, 965-966, 986-987
typescript/infra/config/environments/mainnet3/funding.ts (1)
6-6: Mainnet funding config properly updated with monorepo image.The import and usage of
DockerImageRepos.MONOREPOandmainnetDockerTags.keyFunderare correct. This maintains the proper separation between the monorepo image (used for funding) and the agent image (used in agent.ts).Based on learnings, funding configs use the
hyperlane-monorepoimage with independent tag cycles from the agent image.Also applies to: 39-40
typescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts (1)
2-2: Well, well, looks like we're consolidating things!The import and repo change are solid. Bringing everything into one swamp... er, config file makes sense for keeping things tidy.
Also applies to: 7-7
typescript/infra/config/environments/mainnet3/warp/checkWarpDeploy.ts
Outdated
Show resolved
Hide resolved
🐳 Monorepo Docker Image Built SuccessfullyImage Tags: |
|
@paulbalaji the new docker config was not applied to |
Summary
Centralizes all Docker image repository URLs and tags in a single file (
typescript/infra/config/docker.ts) for easier management and consistency across the infra package.Changes
New file:
config/docker.tsDockerImageReposconst with:AGENT,MONOREPO,WARP_MONITOR,REBALANCERmainnetDockerTagswith all service tags (agents + keyFunder, kathy, checkWarpDeploy, warpMonitor, rebalancer)testnetDockerTagswith base service tags (agents + keyFunder, kathy)Updated files to use centralized config:
config/environments/mainnet3/agent.tsconfig/environments/testnet4/agent.tsconfig/environments/mainnet3/funding.tsconfig/environments/testnet4/funding.tsconfig/environments/mainnet3/helloworld.tsconfig/environments/testnet4/helloworld.tsconfig/environments/mainnet3/warp/checkWarpDeploy.tssrc/warp/helm.tssrc/rebalancer/helm.tsBenefits
Summary by CodeRabbit
Refactor
New Features
✏️ Tip: You can customize this high-level summary in your review settings.
Greptile Summary
This PR consolidates all Docker image repositories and tags into a single configuration file (
config/docker.ts), replacing scattered hardcoded values across 10 files. The refactor creates a type-safe structure with separate mainnet and testnet tag configurations.Key improvements:
AgentDockerTags,BaseDockerTags,MainnetDockerTags)Files updated systematically:
The refactor is clean and straightforward - no logic changes, just centralization.
Confidence Score: 5/5
Important Files Changed
Sequence Diagram
sequenceDiagram participant Dev as Developer participant DC as docker.ts Config participant M3A as Mainnet3 Agent participant M3F as Mainnet3 Funding participant M3H as Mainnet3 HelloWorld participant M3W as Mainnet3 CheckWarpDeploy participant T4A as Testnet4 Agent participant T4F as Testnet4 Funding participant T4H as Testnet4 HelloWorld participant WM as Warp Monitor participant RB as Rebalancer Note over DC: New centralized config DC->>DC: Define DockerImageRepos DC->>DC: Define mainnetDockerTags DC->>DC: Define testnetDockerTags Note over M3A,M3W: Mainnet3 Services M3A->>DC: Import DockerImageRepos & mainnetDockerTags M3A->>M3A: Use for relayer, validator, scraper M3F->>DC: Import DockerImageRepos & mainnetDockerTags M3F->>M3F: Use for keyFunder M3H->>DC: Import DockerImageRepos & mainnetDockerTags M3H->>M3H: Use for kathy M3W->>DC: Import DockerImageRepos & mainnetDockerTags M3W->>M3W: Use checkWarpDeploy! Note over T4A,T4H: Testnet4 Services T4A->>DC: Import DockerImageRepos & testnetDockerTags T4A->>T4A: Use for relayer, validator, scraper T4F->>DC: Import DockerImageRepos & testnetDockerTags T4F->>T4F: Use for keyFunder T4H->>DC: Import DockerImageRepos & testnetDockerTags T4H->>T4H: Use for kathy Note over WM,RB: Mainnet-only Services WM->>DC: Import DockerImageRepos & mainnetDockerTags WM->>WM: Use for warpMonitor RB->>DC: Import DockerImageRepos & mainnetDockerTags RB->>RB: Use for rebalancer Note over Dev,RB: Result: Single source of truth for all Docker configs