Greet new terminals in the dev container, and restart the backend - #32
Open
Decipher wants to merge 1 commit into
Open
Greet new terminals in the dev container, and restart the backend#32Decipher wants to merge 1 commit into
Decipher wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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.
Stacked on #31.
Summary
Open a terminal in the dev container and nothing greets you. This ports the
mechanism from the druxt.js contributor dev container (gitlab.local MR !47) so
it does.
Why nothing printed
The splash and the next-steps block do exist:
scripts/postinstall.mjsprintsboth. They just never reach a person.
postinstallruns fromnpm install, which this container runs insidepostCreateCommand, so its output goes to the container creation log. ApostAttachCommandwould be no better: its output goes to whatever launched thecontainer, and DevPod prints that to its own CLI log, outside the container
entirely.
The shell's own rc file is the only place that reliably reaches someone who has
just opened a terminal.
Changes
.devcontainer/WELCOME.txt, the greeting: what is running, what ports areforwarded, and the handful of commands worth knowing.
post-create.shappends a hook to both~/.bashrcand~/.zshrc. Both,because the base image ships bash and zsh and which one a terminal opens
depends on the client. On every interactive shell rather than once, because a
one-shot marker gets spent by whichever shell the editor opens first, which is
rarely the one the user is looking at. It also prints the guide at the end of
post-create, for anyone watching the creation log..devcontainer/post-start.shand apostStartCommand. The container hadno start hook at all, so stopping and resuming it left the frontend pointing
at a backend that was no longer listening. That looks like a broken install
rather than a stopped process. It skips with a pointer when the site was never
provisioned, so one broken create does not also fail every start.
SPLASHinscripts/lib.mjsstays as it is:setup.mjsandpostinstall.mjsboth use it, and they are still the right place for it when someone runs setup
by hand.
Test plan
devpod up github.com/druxt/quickstart-druxt-serverless@feature/devcontainer-welcome --id qds-pr32 --ide openvscode