-
Notifications
You must be signed in to change notification settings - Fork 2
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(world-cli): Ensure the build flag defaults to true #61
Conversation
Your free trial has expired. To continue using Ellipsis, sign up at https://app.ellipsis.dev for $20/developer/month. If you have any questions, reach us at help@ellipsis.dev |
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61 +/- ##
==========================================
- Coverage 52.89% 52.45% -0.44%
==========================================
Files 9 9
Lines 692 692
==========================================
- Hits 366 363 -3
- Misses 259 263 +4
+ Partials 67 66 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Closes: WORLD-1063
Overview
Currently,
world cardinal start
will not rebuild the cardinal container when the code has been modified. Eitherworld cardinal start --build
orworld cardinal start --build=true
needs to be run. This PR makes it so the following 3 commands have the same behavior:Brief Changelog
Ensure the cfg.Build field is set to true by default.
Refactor the config source file to make the precedent ordering more clear.
Testing and Verifying
To manually test this, checkout this branch and navigate to the
world-cli/cmd/world
directory. Then run:go build -o newworld main.go
This creates an executable called
newworld
. This allows you to compare the behavior of the defaultworld
behavior to this branch.Navigate to the starter-game-template directory.
Run
world cardinal start
Docker containers will be built and started. Ctrl+c this process.
Modify the main.go file in the starter game template (e.g. add random newline).
Run
world cardinal start
again. This should start quickly (because the cardinal container was not rebuilt).Ctrl+c this process.
Run
<path-to-newworld>/newworld cardinal start
. This should take a little longer to run, because the cardinal container is actually getting rebuilt this time. You should see some log output signaling that a container is being built.Ctrl+c this process.
Run
<path-to-newworld>/newworld cardinal start
again. This should start quickly. While docker received the signal to build cardinal, cardinal hasn't been modified, so it should start quickly.