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

Add install step for developers #1492

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

williamjallen
Copy link
Collaborator

The developer experience is currently rather poor for developers using our Docker environment. Without custom patches, the only way to test new code changes is to rebuild the image and start a new container.

Given that we now have separate production and development configurations, I thought it might be helpful to upstream an installation patch I have been using locally for some time. The source code directory is mounted as a read-only volume in /cdash_src, and the cdash_install alias runs a script which copies new code changes into the /cdash directory. This is particularly useful when paired with a separate terminal session running npm run watch-poll, which automatically compiles all of our static assets with mix whenever new changes are made.

The alternative to this approach is to to simply mount /cdash as a shared volume. The downside of mounting a shared volume to /cdash is that the volume must either be read-only, with all compilation occurring on the host side, and thus requiring the developer to have npm and php/composer installed, or to have a read-write volume with the potential for code running in the container to inadvertently overwrite the source code on the host. After accidentally writing files in the midst of my local source code several times, I found that mounting a read-only volume to /cdash_src and then copying the code to /cdash was the most effective way to develop CDash.

I've personally found that the changes in this PR vastly improve my productivity as a CDash developer but I'm interested in any comments other developers may have regarding this matter.

Copy link
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

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

Works well. Could be handy for those who choose to use it!

@williamjallen williamjallen added this pull request to the merge queue Aug 17, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 17, 2023
@williamjallen williamjallen added this pull request to the merge queue Aug 17, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Aug 17, 2023
@williamjallen williamjallen added this pull request to the merge queue Aug 17, 2023
Merged via the queue into Kitware:master with commit 1b508b7 Aug 17, 2023
2 checks passed
@williamjallen williamjallen deleted the dev-install branch August 17, 2023 20:43
github-merge-queue bot pushed a commit that referenced this pull request Nov 22, 2023
CDash administrators must run several commands to update a CDash system.
For administrators who are unfamiliar with CDash, this creates an
unnecessary burden.

This PR introduces a new global `cdash_install` script which runs all of
the necessary installation steps. It's worth noting that Laravel's
"maintenance mode" will be activated for the duration of the
installation. That will prevent users from accessing the system, and
will block submissions. In the future, I plan to update this script to
allow submissions to be accepted while the system is in maintenance
mode, but that is a significant undertaking which is beyond the scope of
this PR.

#1492 added a `cdash_install` script for developers to sync files
between the host and Docker container. That script has been renamed
`cdash_copy_source`. The new `cdash_install` script runs
`cdash_copy_source` before the regular installation script is run by
default when the container is build with development mode turned on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants