Skip to content

fix wasmdir typo#1125

Closed
dimiandre wants to merge 1 commit intomainfrom
release/v28
Closed

fix wasmdir typo#1125
dimiandre wants to merge 1 commit intomainfrom
release/v28

Conversation

@dimiandre
Copy link
Copy Markdown
Member

@dimiandre dimiandre commented Feb 24, 2025

Summary by CodeRabbit

  • Refactor
    • Revised the underlying directory configuration to use a unified data path for enhanced consistency, setting the stage for smoother future enhancements.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 24, 2025

Walkthrough

In app/keepers/keepers.go, the NewAppKeepers function has been updated. The wasmDir variable that previously formed a subdirectory path for the WebAssembly keeper has been removed. Its usage has been replaced by the more general dataDir parameter when calling wasmkeeper.NewKeeper. The overall logic and structure of the function remain unchanged.

Changes

File Change Summary
app/keepers/keepers.go Removed wasmDir variable definition; replaced its use in the call to wasmkeeper.NewKeeper by passing dataDir directly.

Sequence Diagram(s)

sequenceDiagram
    participant AppKeepers as NewAppKeepers
    participant WasmKeeper as wasmkeeper.NewKeeper
    AppKeepers->>WasmKeeper: Call with dataDir instead of wasmDir
Loading

Poem

I'm a rabbit with a coding beat,
Hopping through changes oh so neat.
"wasmDir" hopped away without a trace,
Now "dataDir" leads the chase.
In my burrow of bytes, I celebrate with grace! 🐇✨


📜 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 985d259 and 75bb6c6.

📒 Files selected for processing (1)
  • app/keepers/keepers.go (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (18)
  • GitHub Check: e2e-tests (ictest-clock)
  • GitHub Check: e2e-tests (ictest-cwhooks)
  • GitHub Check: e2e-tests (ictest-burn)
  • GitHub Check: e2e-tests (ictest-feepay)
  • GitHub Check: e2e-tests (ictest-drip)
  • GitHub Check: e2e-tests (ictest-unity-deploy)
  • GitHub Check: e2e-tests (ictest-ibc)
  • GitHub Check: e2e-tests (ictest-globalfee)
  • GitHub Check: e2e-tests (ictest-pfm)
  • GitHub Check: e2e-tests (ictest-feeshare)
  • GitHub Check: e2e-tests (ictest-ibchooks)
  • GitHub Check: e2e-tests (ictest-statesync)
  • GitHub Check: e2e-tests (ictest-basic)
  • GitHub Check: Analyze
  • GitHub Check: juno-images
  • GitHub Check: juno-images
  • GitHub Check: juno-images
  • GitHub Check: Analyze
🔇 Additional comments (1)
app/keepers/keepers.go (1)

551-551:

Details

❓ Verification inconclusive

Verify the directory path change for Wasm files.

The change from wasmDir (previously filepath.Join(dataDir, "wasm")) to dataDir modifies where WebAssembly files are stored. Let's verify this change is correct.


🌐 Web query:

What is the correct directory path for CosmWasm files in wasmd?

💡 Result:

The correct directory path for CosmWasm files in wasmd depends on configuration settings:

  1. Default directory:
    The node's config and data are stored in ~/.wasmd by default[1][6].

  2. Custom configuration:
    Developers can override this path using compile-time flags:

    -X github.com/CosmWasm/wasmd/app.NodeDir=<custom-path>

    For example, setting .corald instead of the default creates a local config directory[1][6].

  3. Docker deployments:
    When using Docker containers, data volumes are typically mounted at /root inside containers by default[1][3]. Example mount configuration:

    --mount type=volume,source=wasmd_data,target=/root

The path configuration allows flexibility between local development (using home directories) and containerized environments (using volume mounts)[1][6].

Citations:


Verify the correct directory path for CosmWasm files

The change replaces a subdirectory path (previously built as filepath.Join(dataDir, "wasm")) with the raw dataDir argument in the call to wasmkeeper.NewKeeper. Since the correct path for CosmWasm files can vary with configuration (defaulting to ~/.wasmd but configurable via compile-time flags or container settings), please confirm that using dataDir directly correctly reflects the intended file structure. Specifically, verify that:

  • The removal of the explicit "wasm" subdirectory does not disrupt file discovery or loading of CosmWasm files.
  • This change aligns with both local development and any containerized deployment configurations.
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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.

@dimiandre dimiandre enabled auto-merge (rebase) February 24, 2025 18:09
@vexxvakan
Copy link
Copy Markdown
Member

fixes are included in #1141 because of a merge delay from #1131 - changes already released as v28.0.1

@vexxvakan vexxvakan closed this Mar 14, 2025
auto-merge was automatically disabled March 14, 2025 13:08

Pull request was closed

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