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

added set memory limit by user and added missing instance sizes #248

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

MuhammadQadora
Copy link
Contributor

@MuhammadQadora MuhammadQadora commented Feb 11, 2025

fix #244

Summary by CodeRabbit

  • New Features
    • Expanded memory configuration options with additional instance types for improved resource management.
    • Introduced a new custom setting that allows users to override default memory allocations for enhanced control.
    • Added a new environment variable MEMORY_LIMIT to enhance service configurability.

@MuhammadQadora MuhammadQadora linked an issue Feb 11, 2025 that may be closed by this pull request
Copy link

coderabbitai bot commented Feb 11, 2025

Walkthrough

This pull request updates the memory configuration in three files. The modifications include adding new instance type memory mappings in the cluster and node entrypoint scripts and introducing a new environment variable, MEMORY_LIMIT, in the node script and the YAML configuration. The logic for determining memory limits based on the instance type has been extended to include e2-standard-2, e2-standard-4, m6i.large, and m6i.xlarge, while preserving the original flow and structure.

Changes

File(s) Change Summary
falkordb-cluster/cluster-entrypoint.sh Updated set_memory_limit to add new mappings for e2-standard-2 (6GB), e2-standard-4 (14GB), m6i.large (6GB), and m6i.xlarge (14GB).
falkordb-node/node-entrypoint.sh Updated memory_limit_instance_type_map to include new entries for e2-standard-2, e2-standard-4, m6i.large, and m6i.xlarge; modified logic to check MEMORY_LIMIT.
omnistrate.startup.yaml Introduced a new environment variable MEMORY_LIMIT in the node-s service to allow dynamic setting of memory requests and limits.

Assessment against linked issues

Objective (Issue #) Addressed Explanation
Memory limit for startup tier (#244)

Possibly related PRs

  • 190 add aws support for pro and enterprise tiers #191: The changes in the main PR and the retrieved PR are related as both modify the falkordb-node/node-entrypoint.sh script to enhance memory limit handling, specifically by adding new instance types and updating the logic for setting memory limits.
  • Added a new variable for the max memory and fixed get_memory_limit fu… #168: The changes in the main PR and the retrieved PR are related as both modify the falkordb-cluster/cluster-entrypoint.sh and falkordb-node/node-entrypoint.sh scripts to update memory limit handling, specifically adding new instance type mappings and modifying the logic for setting memory limits.
  • updated instance types #238: The changes in the main PR are related to the modifications in the retrieved PR as both introduce new instance types (e2-standard-2, e2-standard-4, m6i.large, and m6i.xlarge) but in different contexts (memory limits vs. instance type configurations).

Suggested labels

enhancement

Suggested reviewers

  • dudizimber

Poem

In the land of code I hop with cheer,
Mapping memory limits far and near.
A new env var joins the team,
Helping our scripts to smoothly stream.
With whiskers twitching in coding delight,
I celebrate updates under the moonlight 🐇.
CodeRabbit sings—our changes are just right!


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c52609b and 084ba19.

📒 Files selected for processing (2)
  • falkordb-node/node-entrypoint.sh (1 hunks)
  • omnistrate.startup.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • omnistrate.startup.yaml
🔇 Additional comments (2)
falkordb-node/node-entrypoint.sh (2)

42-42: LGTM! Well-structured memory limit configuration.

The changes provide flexible memory limit configuration while maintaining backward compatibility:

  1. Users can override instance-based limits using MEMORY_LIMIT
  2. Falls back to instance-based limits if MEMORY_LIMIT is not set
  3. Uses default memory limit as a final fallback

Also applies to: 234-246


217-218: LGTM! Appropriate memory limits for new instance types.

The memory limits are well-calibrated for the new instance types, leaving sufficient headroom for system operations:

  • e2-standard-2 (8GB RAM): 6GB limit
  • e2-standard-4 (16GB RAM): 14GB limit
  • m6i.large (8GB RAM): 6GB limit
  • m6i.xlarge (16GB RAM): 14GB limit

Also applies to: 226-227


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>, please review it.
    • 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 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 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 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 for this PR. (Beta)
  • @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 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.

@MuhammadQadora MuhammadQadora merged commit 2150396 into main Feb 12, 2025
57 checks passed
@MuhammadQadora MuhammadQadora deleted the 244-memory-limit-for-startup-tier branch February 12, 2025 08:00
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.

memory limit for startup tier
2 participants