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

feat: add world cardinal dev command #10

Merged
merged 7 commits into from
Oct 31, 2023
Merged

feat: add world cardinal dev command #10

merged 7 commits into from
Oct 31, 2023

Conversation

smsunarto
Copy link
Member

@smsunarto smsunarto commented Oct 31, 2023

Closes: WORLD-467

This is a simplified version of the dev command, in the future we want the multiplexer but keeping it simple for now.

What is the purpose of the change

  • Add world cardinal dev command to run cardinal in development mode

Testing and Verifying

  • Run world cardinal dev

Caveat

  • Restarting dev mode after it's killed will often fail because the websocket port is not unbound after terminate. cc @pyrofolium

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (f0bc858) 0.00% compared to head (456fcdb) 0.00%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main     #10   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          5       5           
  Lines        292     284    -8     
=====================================
+ Misses       292     284    -8     
Files Coverage Δ
common/tea_cmd/docker.go 0.00% <0.00%> (ø)
common/tea_cmd/git.go 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@pyrofolium pyrofolium left a comment

Choose a reason for hiding this comment

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

Not sure if it's already sent with these commands, but sending sigterm or sigint to the running cardinal server will trigger shutdown procedures.

These shutdown procedures aren't hooked into the event system yet but this is the pathway to trigger it and to eventually get rid of that port problem.

I'm approving, but typically I would request that signal to be sent (or to verify that the signal is being sent) to properly shutdown cardinal from the cli. Then I would make some ticket to integrate eventhub into the cardinal shutdown. Actually I'll make one now.

@pyrofolium
Copy link
Contributor

Closes: WORLD-467

This is a simplified version of the dev command, in the future we want the multiplexer but keeping it simple for now.

Multiplexer is uncommon in clis. Doesn't mean it's bad though, but users are definitely more used to a UI that's more common to CLIs. This is definitely the right path to go to build this first. Should we want the multiplexer it's just a rendering loop on top of the commands you already made.

@smsunarto
Copy link
Member Author

Closes: WORLD-467
This is a simplified version of the dev command, in the future we want the multiplexer but keeping it simple for now.

Multiplexer is uncommon in clis. Doesn't mean it's bad though, but users are definitely more used to a UI that's more common to CLIs. This is definitely the right path to go to build this first. Should we want the multiplexer it's just a rendering loop on top of the commands you already made.

I agree. I now prefer the traditional logging-style interface. I think i was overzealous after finding out about bubbletea

@smsunarto smsunarto merged commit 3e4e3dc into main Oct 31, 2023
7 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.

2 participants