Skip to content

Conversation

@jmoggr
Copy link
Collaborator

@jmoggr jmoggr commented Nov 21, 2025

No description provided.

@github-actions github-actions bot temporarily deployed to netlify-preview November 21, 2025 16:50 Destroyed
@github-actions github-actions bot temporarily deployed to netlify-preview November 21, 2025 16:56 Destroyed
@github-actions github-actions bot temporarily deployed to netlify-preview November 21, 2025 17:49 Destroyed
@github-actions github-actions bot temporarily deployed to netlify-preview November 21, 2025 18:12 Destroyed
@github-actions github-actions bot temporarily deployed to netlify-preview November 21, 2025 18:26 Destroyed
@jmoggr jmoggr marked this pull request as ready for review November 24, 2025 17:49
@jmoggr jmoggr requested a review from epatters November 24, 2025 18:00
@epatters epatters requested a review from kasbah November 25, 2025 00:49
@epatters epatters added documentation Improvements or additions to documentation backend Backend, including web server and database labels Nov 26, 2025
Base automatically changed from frontend-tests-ci to main December 2, 2025 00:45
Copy link
Member

@kasbah kasbah left a comment

Choose a reason for hiding this comment

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

I've started seeing how I can use these scripts in my own development workflow so thanks for developing and documenting them.

In general I am a bit apprehensive at the prospect of maintaining this much bash. We should run shellcheck on it in CI at the very least. In the future we should think about starting to use a more robust scripting language (or even non-scripting language?) for things like this.

As you will see I got to the point just short of actually running the VM in a useful way. I will continue to try and use these tools and do a second pass at review for sure.

Comment on lines +23 to +26
**Preview remote branch:**
```bash
cc-utils vm start my-feature-branch --db cached
```
Copy link
Member

Choose a reason for hiding this comment

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

It might just be me but I was confused by the combination of the words "remote branch" and the lack of an origin/ prefix. When I saw a comment later calling it a "Github branch" it cleared it up for me. I think we should use the words "Github branch" everywhere. Maybe we should even explicitly say "CatColab Github repo branch"

The other thing this has without any explanation is the --db cached thing. Maybe that shouldn't be in the quickstart?

@@ -0,0 +1,40 @@
# Developer Documentation
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason this is a separate document from CONTRIBUTING.md? It should at least be linked from it.

@@ -0,0 +1,52 @@
# cc-utils DB Commands Reference

The `cc-utils db` commands provide tools for managing databases across environments (local, staging, production, vm).
Copy link
Member

Choose a reason for hiding this comment

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

As mentioned at dev meeting we need to document how to get cc-utils onto your path i.e. mention nix develop and any alternatives.

Learn how to run integration tests, test deployments, and debug test failures with a progressive isolation strategy.

### [Development Workflows](docs/workflows.md)
Example workflows demonstrating how to use `cc-utils` script for common development tasks.
Copy link
Member

Choose a reason for hiding this comment

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

Small thing but running just cc-utils on my system prints:

/home/kaspar/projects/topos/CatColab/infrastructure/scripts/cc-utils: line 29: $1: unbound variable

but exits with 0 i.e. success status while doing nothing. cc-utils db etc seems to be working. Would be nice to exit with -1 and print "Error: no command given" and then show the help.

**Examples:**
```bash
# Start local VM with fresh staging DB
cc-utils vm start
Copy link
Member

@kasbah kasbah Dec 2, 2025

Choose a reason for hiding this comment

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

My experience running this so far is it building a lot of things and timing out.

Starting local VM...
Logs: cc-utils vm logs
Waiting for VM to start...
Error: Timeout waiting for VM to be available
Check logs: /home/kaspar/.cache/catcolab/vm.log

In the background it's still building and I can tail that log

  1. I think this should log to stdout so I can see what's going on
  2. The timeout needs to be adjusted or something, maybe there should be separate build and start commands?

Copy link
Member

Choose a reason for hiding this comment

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

When I run it today it seems to use the built VM and completes instantly and I can do cc-utils vm connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend, including web server and database documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants