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

ci: add flownode in docker compose #4306

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

zyy17
Copy link
Collaborator

@zyy17 zyy17 commented Jul 6, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

NOTE: Wait for the latest nightly release.

  1. Add flownode in cluster that created by docker compose.

  2. Refactor the Makefile target naming:

    • make start-cluster: Create the greptimedb cluster by using docker compose;
    • make stop-cluster: Stop the greptimedb cluster that created by the docker compose;

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.

Summary by CodeRabbit

  • New Features

    • Added a new target to stop the greptimedb cluster using Docker Compose.
  • Improvements

    • Renamed the target for starting the greptimedb cluster to start-cluster.
    • Enhanced Docker Compose configurations with new health checks and port configurations for datanode0, frontend0, and flownode0.
  • Configuration Changes

    • Updated ETCD-related variable names for better clarity.
    • Introduced a new image reference for greptimedb.

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Jul 6, 2024
Copy link
Contributor

coderabbitai bot commented Jul 6, 2024

Walkthrough

The recent changes streamline the management of the greptimedb cluster with etcd using Docker Compose. The Makefile has renamed and added new targets for starting and stopping the cluster, while the Docker Compose file has seen variable name changes, a new image reference, and additional health checks and configurations.

Changes

Files Change Summary
Makefile Renamed run-cluster-with-etcd to start-cluster; added stop-cluster
docker/docker-compose/cluster-with-etcd... Renamed ETCD variables; added new image reference for greptimedb; introduced health checks and ports for services

Poem

In the land of code where clusters dwell,
A change has come, a tale to tell.
Start and stop with newfound grace,
Services checked, no need to chase.
Greptimedb stands strong and free,
Amidst the waves of Docker, see?
All hail the realm of harmony.
🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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 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 for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@zyy17 zyy17 marked this pull request as ready for review July 8, 2024 07:37
@zyy17 zyy17 requested a review from a team as a code owner July 8, 2024 07:37
@zyy17 zyy17 requested review from tisonkun, WenyXu and discord9 and removed request for a team July 8, 2024 07:38
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3f4928e and 370c6b6.

Files selected for processing (2)
  • Makefile (1 hunks)
  • docker/docker-compose/cluster-with-etcd.yaml (5 hunks)
Additional comments not posted (8)
docker/docker-compose/cluster-with-etcd.yaml (6)

2-6: LGTM!

Renaming variables to more descriptive names and adding a new image reference improves clarity and maintainability.


Line range hint 10-26:
LGTM!

The addition of a health check for the etcd0 service is a good practice. The variable renaming aligns with the x-custom section updates.


Line range hint 38-55:
LGTM!

The addition of a health check for the metasrv service is a good practice. The image reference update aligns with the x-custom section updates.


113-127: LGTM! But verify the correctness of the health check and port configuration.

The addition of the flownode0 service is consistent with the PR objectives. The health check and port configuration should be verified to ensure they are correctly implemented.


60-79: LGTM! But verify the necessity of the additional port configuration.

The addition of a health check for the datanode0 service is a good practice. The image reference update aligns with the x-custom section updates.

However, ensure that the additional port configuration (5000:5000) is necessary and correctly implemented.

Verification successful

The additional port configuration (5000:5000) is necessary and correctly implemented.

The references to port 5000 in the docker/docker-compose/cluster-with-etcd.yaml file indicate its use for the HTTP address and health check, confirming its necessity.

  • docker/docker-compose/cluster-with-etcd.yaml
    • - 5000:5000
    • - --http-addr=0.0.0.0:5000
    • test: [ "CMD", "curl", "-f", "http://datanode0:5000/health" ]
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the necessity of the additional port configuration (5000:5000) for datanode0 service.

# Test: Search for the usage of port 5000 in the codebase. Expect: Relevant code references.
rg --type yaml --type dockerfile '5000'

Length of output: 74


Script:

#!/bin/bash
# Description: Verify the necessity of the additional port configuration (5000:5000) for datanode0 service.

# Test: Search for the usage of port 5000 in the codebase. Expect: Relevant code references.
rg '5000'

Length of output: 25312


Line range hint 87-111:
LGTM! But verify the necessity of the multiple port configurations.

The addition of a health check for the frontend0 service is a good practice. The image reference update aligns with the x-custom section updates.

However, ensure that the multiple port configurations (4000-4003) are necessary and correctly implemented.

Verification successful

Multiple port configurations for frontend0 service are necessary and correctly implemented.

The ports 4000-4003 are referenced across various configuration and test files, indicating their importance for different services and functionalities (HTTP, RPC, MySQL, PostgreSQL).

  • docker/docker-compose/cluster-with-etcd.yaml
  • config/frontend.example.toml
  • config/standalone.example.toml
  • config/config.md
  • Various test files
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the necessity of the multiple port configurations (4000-4003) for frontend0 service.

# Test: Search for the usage of ports 4000-4003 in the codebase. Expect: Relevant code references.
rg --type yaml --type dockerfile '400[0-3]'

Length of output: 80


Script:

#!/bin/bash
# Description: Verify the necessity of the multiple port configurations (4000-4003) for frontend0 service.

# Test: Search for the usage of ports 4000-4003 in YAML files.
rg --type yaml '400[0-3]'

# Test: Search for the usage of ports 4000-4003 in Dockerfiles.
rg '400[0-3]' $(fd -e Dockerfile)

Length of output: 25990

Makefile (2)

208-210: LGTM!

The start-cluster target is consistent with the PR objectives and is correctly implemented.


212-214: LGTM!

The stop-cluster target is consistent with the PR objectives and is correctly implemented.

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.90%. Comparing base (4f0984c) to head (f3154e4).
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4306      +/-   ##
==========================================
- Coverage   85.25%   84.90%   -0.35%     
==========================================
  Files        1058     1060       +2     
  Lines      186975   188643    +1668     
==========================================
+ Hits       159398   160173     +775     
- Misses      27577    28470     +893     

@zyy17 zyy17 force-pushed the ci/add-flownode-in-docker-compose branch from 370c6b6 to f3154e4 Compare July 9, 2024 11:47
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 370c6b6 and f3154e4.

Files selected for processing (2)
  • Makefile (1 hunks)
  • docker/docker-compose/cluster-with-etcd.yaml (5 hunks)
Files skipped from review as they are similar to previous changes (2)
  • Makefile
  • docker/docker-compose/cluster-with-etcd.yaml

@zyy17 zyy17 requested a review from WenyXu July 9, 2024 14:51
@zyy17 zyy17 enabled auto-merge July 9, 2024 14:51
@zyy17 zyy17 added this pull request to the merge queue Jul 10, 2024
Merged via the queue into GreptimeTeam:main with commit 20417e6 Jul 10, 2024
63 checks passed
@zyy17 zyy17 deleted the ci/add-flownode-in-docker-compose branch July 10, 2024 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants