Skip to content

Conversation

@fbac
Copy link
Collaborator

@fbac fbac commented May 14, 2025

Update xmtpd-cli Docker image to multichain version sha-d4e697c and refactor Docker Compose configurations using YAML anchors

📍Where to Start

Start with the image version update and YAML anchor definition in docker-compose-register.yml, as this contains the primary functional change of updating the xmtpd-cli image version.


Macroscope summarized 37bb42b.

Summary by CodeRabbit

  • Chores
    • Centralized Docker image version references in Docker Compose files for easier maintenance.
    • Updated service definitions to use shared image anchors for consistency.
    • Reorganized and annotated environment variables in local configuration, adding a new contract address variable.
    • Improved configuration validation with modular checks and added validation for pruning options.

@fbac fbac requested a review from a team as a code owner May 14, 2025 09:26
@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 14, 2025

## Walkthrough

The changes update Docker Compose files to use YAML anchors for centralizing image references, replacing direct image tags for both application and database services. The environment configuration file was modified to add a new contract address variable and reposition deprecated variables with updated annotations. Configuration option tags and descriptions related to the rates manager contract were updated. Validation logic was refactored into modular functions and new validation for prune options was added.

## Changes

| File(s)                                       | Change Summary                                                                                                                             |
|-----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| dev/docker/docker-compose-register.yml        | Introduced an anchor for the `xmtpd-cli` image; all services now reference this anchor for image specification, replacing old image tags.  |
| dev/docker/docker-compose.yml                  | Added a YAML anchor for the `postgres:16` image; both `db` and `db2` now use this anchor for image specification.                         |
| dev/local.env                                  | Added new environment variable `XMTPD_CONTRACTS_RATES_MANAGER_ADDRESS`; repositioned and re-annotated deprecated contract-related variables.|
| pkg/config/options.go                          | Updated environment variable tag and description for `RateRegistryContractAddress` to `XMTPD_CONTRACTS_RATES_MANAGER_ADDRESS` and related descriptions. |
| pkg/config/validation.go                       | Refactored server options validation into modular functions; added new `ValidatePruneOptions` function; added conditional validation for rates manager fields. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant ConfigValidator
    participant HelperFuncs

    User->>ConfigValidator: Call ValidateServerOptions
    ConfigValidator->>HelperFuncs: validateBlockchainConfig
    HelperFuncs->>HelperFuncs: validateAppChainConfig
    HelperFuncs->>HelperFuncs: validateSettlementChainConfig
    ConfigValidator->>ConfigValidator: normalizeSingleChainConfig (if single-chain)
    User->>ConfigValidator: Call ValidatePruneOptions
    ConfigValidator-->>User: Return validation result

Possibly related PRs

Suggested reviewers

  • mkysel

<!-- walkthrough_end -->
<!-- This is an auto-generated comment: all tool run failures by coderabbit.ai -->

> [!WARNING]
> There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.
> 
> <details>
> <summary>🔧 golangci-lint (1.64.8)</summary>
> 
> Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2
> Failed executing command with error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2
> 
> 
> 
> </details>

<!-- end of auto-generated comment: all tool run failures by coderabbit.ai -->

<!-- announcements_start -->

> [!TIP]
> <details>
> <summary>⚡️ Faster reviews with caching</summary>
> 
> - CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure `Review - Disable Cache` at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the `Data Retention` setting under your Organization Settings.
> 
> Enjoy the performance boost—your workflow just got faster.
> 
> </details>

<!-- announcements_end -->

---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 37bb42bb80ab2a0c9327286ec537c19f79033460 and 622c5909fec9b2d4ac3d150a434e045a1b16be79.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `dev/local.env` (1 hunks)
* `pkg/config/options.go` (1 hunks)
* `pkg/config/validation.go` (2 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* dev/local.env

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (4)</summary>

* GitHub Check: Push Docker Images to GitHub Packages (xmtpd-cli)
* GitHub Check: Test (Node)
* GitHub Check: Push Docker Images to GitHub Packages (xmtpd)
* GitHub Check: Upgrade Tests

</details>

<details>
<summary>🔇 Additional comments (7)</summary><blockquote>

<details>
<summary>pkg/config/options.go (2)</summary>

`22-22`: **Environment variable and description updated for rates manager**

The environment variable tag and description for the `RateRegistryContractAddress` field have been updated to reflect the new "rates manager" terminology. This is consistent with the PR's goal of updating to a newer multichain version.

---

`25-25`: **Updated description to reference rates manager**

Description for `RatesRefreshInterval` now references "rates manager" instead of "rates contract", maintaining terminology consistency with the field above.

</details>
<details>
<summary>pkg/config/validation.go (5)</summary>

`14-18`: **Simplified validation flow**

The validation logic has been refactored to be more modular. The previous monolithic approach has been replaced with a cleaner pattern that checks deployment type first, then delegates to specialized validation functions.

---

`58-75`: **Added validation for prune options**

New validation function for prune-specific options to ensure required arguments are provided. The function follows the same error collection pattern used elsewhere in the codebase.

---

`82-102`: **Added modular validation for blockchain configuration**

The `validateBlockchainConfig` function improves code organization by delegating to specialized validation functions and adds conditional validation for rate registry fields when replication or sync features are enabled.

---

`104-134`: **Added dedicated validation for app chain configuration**

This function extracts app chain validation logic into a dedicated function, improving code organization and maintainability. All necessary fields are properly validated.

---

`136-161`: **Added dedicated validation for settlement chain configuration**

Similar to the app chain validation, this function extracts settlement chain validation logic into a dedicated function, improving code organization and maintainability.

</details>

</blockquote></details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNxU3bABsvkCiQBHbGlcABpIcVwvOkgAIgBlAHd1BlgI/Ehmb3FU7SwAD2ZcblowBi94WPQMegcBZnUaejlIbERKSAAzATQGdGRbSAxHAQ6AdgBOAGZw7BLqaQjYEkgAA0Li0vL4VcgAEXwGAG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gwV/1VhcJPSaLISdT4LgSeiGzviqyFhWCy40KhysxMLBI0ZvpBSsAojyFcLnAVhYz+kBRI1MhWL+CXzwMfjqMyMvYwUJ03gW1nSiTiU0T/QMcZTOKfS/gMhEAvTogKBwhEwGAdL3jVY21tRnLsDMZeBlyNyAq0CXQKTGJDRgrhFOQN4Zp9Sy4ZArycosAOFqAnKyMLgdFEEB9ipEiMEBNCiEV8FkVlEeAqVyEaUcVF90LI0BTaAvjBy+hRzfiJzlzpyQ5SYEiswuqpzRDeZPz4xxCXCb9NT5CisGq5Kmq41Wq4N4qDiRRjiei+rRDIAAAqGst4Hqz+TIJAdoqEwcbgAAbUfNxAAF1DKABvAAXzfjaAIGYBOvOHOsuqIBuocrEAeu5nGskMmpMoUmmpYMat1zoEWolIhP+O4BEsRI2uEx2omIoH2vCH/OOpICkR5Auv9BDG+vR1+sesYGepYDepxs+oJoxz+oBuvx6O2imofzBrmohparWDaviqhJhLknhvWv6vQWRtrNRs3MOoAtxHJo+rxuuruuJt8p0jJqxtOtxoAWlp+twBpqTQkLprcK20ZoUOFTWzWg6k0RyjArwH6iVRLRGnKhowmhcWYxIMahUDUCWjalWgMGNpGnUFHR+EQFHRVNuDoFHR0mcA1nSg9sykgCmDGFUFhB3lUAAA56QVAd40B6QGBpgd4xgd4E6ERRAABWaOhgaeCYToSYekKYKYWEBEekFaQwY2hEHeHeBgfOiYekUu0QCYAQHeOEXoKYWgaefO5O2EKukgRkfOtAaeAQGpUYSYOu9aKAL23AH22gP2gOu4WgUdbKOuoAA= -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=xmtp/xmtpd&utm_content=793):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Explain this complex logic.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai explain this code block.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and explain its main purpose.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@graphite-app
Copy link

graphite-app bot commented May 14, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
dev/docker/docker-compose.yml (1)

1-1: Centralize Postgres image version using YAML anchor
Excellent use of a top‐level anchor to DRY out the Postgres image declaration.

Consider extending this pattern to other frequently bumped images (e.g., contracts, prometheus, grafana) to further simplify version updates.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4e697c and 37bb42b.

📒 Files selected for processing (3)
  • dev/docker/docker-compose-register.yml (4 hunks)
  • dev/docker/docker-compose.yml (1 hunks)
  • dev/local.env (0 hunks)
💤 Files with no reviewable changes (1)
  • dev/local.env
🔇 Additional comments (7)
dev/docker/docker-compose.yml (2)

5-5: Reference Postgres anchor in db service
Correctly replaces the explicit postgres:16 tag with the reusable *x-postgres-image.


12-12: Reference Postgres anchor in db2 service
Consistent application of the YAML anchor for the secondary database.

dev/docker/docker-compose-register.yml (5)

1-1: Centralize xmtpd-cli image version using YAML anchor
Defines a top‐level &xmtpd-cli-image anchor to avoid repeating the explicit image tag.


6-6: Use xmtpd-cli anchor in register-node-1
Replaces the hard-coded image with the *xmtpd-cli-image reference.


23-23: Use xmtpd-cli anchor in enable-node-1
Consistent reuse of the anchor for the secondary service.


41-41: Use xmtpd-cli anchor in register-node-2
Ensures both register services pull from the same centralized image reference.


61-61: Use xmtpd-cli anchor in enable-node-2
Final service also references the shared anchor, maintaining uniformity.

@fbac fbac changed the title Switch to multichain xmtpd-cli Fix deployments May 14, 2025
@macroscopeapp
Copy link

macroscopeapp bot commented May 14, 2025

Update Docker image versions and refactor configuration validation to fix deployments

  • Updates xmtpd-cli Docker image from sha-a96bf04 to sha-d4e697c in docker-compose-register.yml and introduces YAML anchors for consistent image versioning
  • Introduces YAML anchor for Postgres image version in docker-compose.yml
  • Renames rate registry environment variable to XMTPD_CONTRACTS_RATES_MANAGER_ADDRESS in options.go
  • Restructures configuration validation in validation.go with new functions validateBlockchainConfig, validateAppChainConfig, and validateSettlementChainConfig
  • Reorganizes environment variables in local.env and adds new rates manager address

📍Where to Start

Start with the configuration validation changes in validation.go, which contains the core logic changes with the new validation functions validateBlockchainConfig, validateAppChainConfig, and validateSettlementChainConfig.


Macroscope summarized 622c590.

@fbac fbac merged commit 353f1b5 into main May 14, 2025
10 checks passed
@fbac fbac deleted the 05-14-update_xmtpd_cli branch May 14, 2025 15:58
fbac pushed a commit that referenced this pull request May 16, 2025
### Update xmtpd-cli Docker image to multichain version sha-d4e697c and
refactor Docker Compose configurations using YAML anchors
* Updates the `xmtpd-cli` Docker image from `sha-a96bf04` to
`sha-d4e697c` in
[docker-compose-register.yml](https://github.com/xmtp/xmtpd/pull/793/files#diff-a1e7ac7430bed8c9bdd26624200229b35a1eeb5363eb27128ae4eb71bad7f83c)
* Introduces YAML anchors for image definitions in both
[docker-compose-register.yml](https://github.com/xmtp/xmtpd/pull/793/files#diff-a1e7ac7430bed8c9bdd26624200229b35a1eeb5363eb27128ae4eb71bad7f83c)
and
[docker-compose.yml](https://github.com/xmtp/xmtpd/pull/793/files#diff-6a25daaa729d7279e0cda8eb92399f1a82d4a91f961e1955bb5745e9c99f3c6e)
* Removes legacy environment variables from
[local.env](https://github.com/xmtp/xmtpd/pull/793/files#diff-8f5c74fc1c72e37751a8a758aad091605c7771b2bb5d5a772d51c97836d85161)
that were previously required for backward compatibility

#### 📍Where to Start
Start with the image version update and YAML anchor definition in
[docker-compose-register.yml](https://github.com/xmtp/xmtpd/pull/793/files#diff-a1e7ac7430bed8c9bdd26624200229b35a1eeb5363eb27128ae4eb71bad7f83c),
as this contains the primary functional change of updating the
`xmtpd-cli` image version.

----

_[Macroscope](https://app.macroscope.com) summarized 37bb42b._

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Centralized Docker image version references in Docker Compose files
for easier maintenance.
- Updated service definitions to use shared image anchors for
consistency.
- Reorganized and annotated environment variables in local
configuration, adding a new contract address variable.
- Improved configuration validation with modular checks and added
validation for pruning options.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants