fix: resolve upgrade DB issue, production startup failure, add debug/stop commands#38
Open
MoYoez wants to merge 3 commits into
Open
fix: resolve upgrade DB issue, production startup failure, add debug/stop commands#38MoYoez wants to merge 3 commits into
MoYoez wants to merge 3 commits into
Conversation
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
…for better process handling
|
Same here. cc @Innei can we merge it? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



xin the brackets)Description
Before
First time I tried using "npm install -g @innei/kagura" to install the latest version of kagura, found that I cannot interact with slack bot, so I pull the main branch and built a version and linked to the latest version.
The problem is here, looks like the program itself will not migrate.
Looks like the program just exit and didnt run in the background,

After
Also I added a simple command prefix (--debug), to check whever the program work correctly.
Linked Issues
none
AI collaboration (required; say if you used none)
1. Workflow
I used AI to read the relevant startup, database, and CLI code paths, and run local verification.
I reviewed and adjusted the behavior through several iterations, especially around migration timing, debug output, daemon startup, and stop semantics.
2. Prompt (or equivalent task description)
Investigate why database table changes were not applied after a new build/release
Check what happened when using "Kagura" and application not response.
3. Reasoning and trade-offs
My local machine is Windows, and I cannot fully run the normal Slack workflow there, so I focused on inspecting the program behavior and adding better diagnostics.
I was not sure what happened after running the
kaguracommand, so I added a--debugmode to print startup diagnostics such as config paths, environment presence, database path, and migration path. During that investigation, I found that the CLI could return after startup instead of keeping the Slack Socket Mode process alive, so I changed the normal startup path to launch Kagura as a background daemon.To make local testing easier, and to avoid manually killing Node processes from Task Manager, I also added a
kagura stopcommand.While debugging startup, I also found that upgraded versions did not automatically apply database migrations before using newer tables or columns. I fixed that by running packaged Drizzle migrations during database initialization.
Additional context
btw I found that the when using "pnpm dev" after following the readme, looks like the .env didnt read correctly?
working platform is Windows 11