-
Notifications
You must be signed in to change notification settings - Fork 39
Fix deployments #793
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
Fix deployments #793
Conversation
## 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 resultPossibly related PRs
Suggested reviewers
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
There was a problem hiding this 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
📒 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 indbservice
Correctly replaces the explicitpostgres:16tag with the reusable*x-postgres-image.
12-12: Reference Postgres anchor indb2service
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-imageanchor to avoid repeating the explicit image tag.
6-6: Use xmtpd-cli anchor inregister-node-1
Replaces the hard-coded image with the*xmtpd-cli-imagereference.
23-23: Use xmtpd-cli anchor inenable-node-1
Consistent reuse of the anchor for the secondary service.
41-41: Use xmtpd-cli anchor inregister-node-2
Ensures both register services pull from the same centralized image reference.
61-61: Use xmtpd-cli anchor inenable-node-2
Final service also references the shared anchor, maintaining uniformity.
Update Docker image versions and refactor configuration validation to fix deployments
📍Where to StartStart with the configuration validation changes in validation.go, which contains the core logic changes with the new validation functions Macroscope summarized 622c590. |
### 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 -->
Update xmtpd-cli Docker image to multichain version sha-d4e697c and refactor Docker Compose configurations using YAML anchors
xmtpd-cliDocker image fromsha-a96bf04tosha-d4e697cin docker-compose-register.yml📍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-cliimage version.Macroscope summarized 37bb42b.
Summary by CodeRabbit