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

fix: enable celestia-app to run in Vercel Go runtime #4428

Merged
merged 8 commits into from
Mar 25, 2025

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Mar 19, 2025

Closes #4427

The only important change is ignoring the error returned by os.UserHomeDir(). The rest of the diff is a refactor for legibility. I re-ordered celestiaHome in arguments and test cases first because it takes precedence over userHome.

cc: @lzrscg

@rootulp rootulp self-assigned this Mar 19, 2025
@rootulp rootulp requested a review from a team as a code owner March 19, 2025 03:30
@rootulp rootulp requested review from cmwaters and evan-forbes and removed request for a team March 19, 2025 03:30
Copy link
Contributor

coderabbitai bot commented Mar 19, 2025

📝 Walkthrough

Walkthrough

The pull request modifies the initialization logic in the application to improve compatibility with Vercel’s Go runtime environment, where the user's home directory may not be set. In the init function, error handling when retrieving the home directory is changed to log a warning instead of panicking, and the parameter order for the getDefaultNodeHome function has been swapped so that a custom home directory (celestiaHome) takes precedence. Corresponding tests in app/init_test.go have been updated to reflect these changes and improve naming clarity.

Changes

File(s) Change Summary
app/init.go Updated comments to clarify that DefaultNodeHome points to the app directory containing .celestia-app. Modified the init function to log a warning for errors from os.UserHomeDir (supporting Vercel compatibility) and swapped parameter order in calls to getDefaultNodeHome.
app/init_test.go Renamed test case descriptions for clarity and reordered test struct fields and function call parameters to match the updated getDefaultNodeHome signature.
go.mod Updated the version of the github.com/cosmos/ibc-go/v6 dependency from v6.2.4 to v6.2.5.
test/interchain/go.mod Updated the version of the github.com/cosmos/ibc-go/v6 dependency from v6.2.4 to v6.2.5.

Assessment against linked issues

Objective Addressed Explanation
Support custom user home directory for Vercel compatibility (#4427)

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5fa0a8 and be4d079.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (1)
  • go.mod (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Summary

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

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.

rach-id
rach-id previously approved these changes Mar 19, 2025
rach-id
rach-id previously approved these changes Mar 19, 2025
@rootulp
Copy link
Collaborator Author

rootulp commented Mar 25, 2025

Going to add one commit to this PR to bump to the latest celestiaorg/ibc-go release which contains a fix for the same issue.

@celestia-bot celestia-bot requested a review from rach-id March 25, 2025 15:44
@rootulp rootulp enabled auto-merge (squash) March 25, 2025 15:44
@celestia-bot celestia-bot requested a review from rach-id March 25, 2025 17:24
@rootulp rootulp merged commit 6df74af into celestiaorg:main Mar 25, 2025
28 checks passed
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.

Allow setting user home directory via build flag for Vercel compatibility
3 participants