Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.

goland debug stack#114

Merged
webpiratt merged 1 commit into
mainfrom
local-debug-stack
Jul 3, 2025
Merged

goland debug stack#114
webpiratt merged 1 commit into
mainfrom
local-debug-stack

Conversation

@webpiratt

@webpiratt webpiratt commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Docker local stack prepared by @johnnyluo works perfect but it takes time to rebuild images, and it's hard to use breakpoints inside Docker. For convenient local development/debug I prepared shared configs to run backend services locally outside Docker

Closes vultisig/verifier#225

Summary by CodeRabbit

  • New Features

    • Added run configurations for Payroll Server, Payroll Worker, and Tx Indexer Worker, enabling easier local development and debugging.
    • Introduced a compound run configuration to launch multiple services simultaneously.
  • Documentation

    • Updated README with improved instructions for starting services and debugging using GoLand, including a new workflow and illustrative image.
  • Style

    • Minor formatting improvements in the Docker Compose file.

@coderabbitai

coderabbitai Bot commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This change introduces GoLand IDE run configurations for the payroll server, payroll worker, and tx_indexer worker components, along with a compound configuration to launch all three together. The README is updated with instructions for local debugging using these configurations. Minor formatting adjustments are made to the docker-compose.yaml file.

Changes

File(s) Change Summary
.run/[git] payroll server.run.xml,
.run/[git] payroll worker.run.xml,
.run/[git] tx_indexer worker.run.xml
Added GoLand run configurations for payroll server, payroll worker, and tx_indexer worker.
.run/[git] plugin stack.run.xml Added compound GoLand run configuration to launch payroll server, payroll worker, and tx_indexer worker together.
README.md Updated with instructions for using new GoLand run configurations and debugging backend services locally.
docker-compose.yaml Minor formatting: removed trailing space and added newline at end of file.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GoLand IDE
    participant PayrollServer
    participant PayrollWorker
    participant TxIndexerWorker

    Developer->>GoLand IDE: Select "[git] plugin stack" run config
    GoLand IDE->>PayrollServer: Start with env vars (payroll.server)
    GoLand IDE->>PayrollWorker: Start with env vars (payroll.worker)
    GoLand IDE->>TxIndexerWorker: Start with env vars (tx_indexer.worker)
    PayrollServer-->>GoLand IDE: Running
    PayrollWorker-->>GoLand IDE: Running
    TxIndexerWorker-->>GoLand IDE: Running
Loading

Assessment against linked issues

Objective Addressed Explanation
Add GoLand run configurations for backend services (payroll server, payroll worker, tx_indexer worker) [#225]
Add compound GoLand run configuration to launch all backend services together [#225]
Update README with instructions for running/debugging backend services locally using GoLand run configs [#225]

Possibly related PRs

  • Fix worker #68: Adds and fixes payroll worker's code and configuration files, directly related to payroll worker component.
  • Local docker compose #108: Adds Dockerfiles for payroll server and worker, related to environment setup for the same components.

Suggested reviewers

  • RaghavSood

Poem

A rabbit in code, with configs anew,
Hops through the fields where the payroll grew.
With GoLand at paw and breakpoints in sight,
Debugging is easy, the future is bright!
Stack runs together, all services in line—
🐇 Cheers to the code, and to devs, a good sign!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this 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.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🔭 Outside diff range comments (2)
docker-compose.yaml (1)

92-106: shared_network declared as external but README instructs to create shared-network – runtime breakage likely

docker-compose.yaml expects an existing external network named shared_network (underscore), however the README snippet added in this PR instructs developers to create shared-network (dash).
Docker will fail with network shared_network declared as external, but could not be found unless the correct name is used.

Diff-style fix for the README snippet (safer than changing compose, because other services may already rely on the underscore):

-# create shared network in docker
-docker network create shared-network
+# create shared network in docker
+docker network create shared_network

Please update either the compose file or the docs so the names match.

README.md (1)

92-108: Network name typo in setup instructions – will brick docker-compose up

The new “Start Services” section tells users to create shared-network, but the compose file expects shared_network. Update the docs or compose file to use a single canonical name (see comment in docker-compose.yaml).

🧹 Nitpick comments (2)
README.md (1)

105-113: Minor English & formatting nits

“backend services outside Docker” → “outside of Docker”;
Add Oxford comma and full stop to bullet list;
Consider turning the paragraph into a numbered step for clarity.

.run/[git] plugin stack.run.xml (1)

1-8: IDE-specific .run files in VCS – confirm team policy

.run XMLs are GoLand-specific metadata. Committing them can clutter the repo for non-JetBrains users and create merge noise.
Validate that the team has agreed to keep these files under version control; otherwise consider adding .run/ to .gitignore or moving the config into documentation.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6387cf5 and 4b0b4a2.

⛔ Files ignored due to path filters (1)
  • readme-static/goland-run.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • .run/[git] payroll server.run.xml (1 hunks)
  • .run/[git] payroll worker.run.xml (1 hunks)
  • .run/[git] plugin stack.run.xml (1 hunks)
  • .run/[git] tx_indexer worker.run.xml (1 hunks)
  • README.md (2 hunks)
  • docker-compose.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: RaghavSood
PR: vultisig/plugin#36
File: api/server.go:21-33
Timestamp: 2025-05-07T08:23:45.882Z
Learning: The import path `github.com/vultisig/verifier/plugin` refers to an external dependency that provides the plugin interface, and should not be changed to `github.com/vultisig/plugin/plugin` as these are distinct packages with different purposes.
🔇 Additional comments (4)
docker-compose.yaml (1)

100-104: Whitespace clean-up looks good

The removal of the trailing space after minio_data: is benign and keeps the YAML tidy.

.run/[git] payroll server.run.xml (1)

5-10: Hard-coded credentials & DSN mismatch with docker-compose

  1. The DSN targets database vultisig-plugin, whereas the compose-side server uses vultisig-payroll. Decide on one database name and keep it consistent.
  2. Exposing real credentials (myuser/mypassword) in VCS is acceptable for local dev but still worth masking (example/example) or moving to .env to avoid leaks.
.run/[git] payroll worker.run.xml (1)

5-8: BASE_FILE_PATH vs BASE_CONFIG_PATH – pick one

The server run config uses BASE_CONFIG_PATH while the worker uses BASE_FILE_PATH. Unless the code treats them separately, this asymmetry can break config loading.

-      <env name="BASE_FILE_PATH" value="etc/vultisig" />
+      <env name="BASE_CONFIG_PATH" value="etc/vultisig" />

Please verify which env key the worker actually reads.

.run/[git] plugin stack.run.xml (1)

3-5: Ensure referenced run configs are present

The compound config points to three individual configurations by name.
Double-check that the matching files ([git] payroll server.run.xml, etc.) are also committed; if they aren’t, this stack config will appear broken in GoLand.

Comment thread .run/[git] tx_indexer worker.run.xml
Comment thread .run/[git] payroll server.run.xml
Comment thread .run/[git] payroll worker.run.xml

@RaghavSood RaghavSood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@webpiratt
webpiratt merged commit b6d236d into main Jul 3, 2025
3 checks passed
@webpiratt
webpiratt deleted the local-debug-stack branch July 3, 2025 16:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add GoLand services configs

2 participants