Skip to content

Conversation

@2stinkysocks
Copy link
Contributor

Adds base functionality for including multiple dojos in a single repository (CURRENTLY UNFINISHED).

As of now, the dojo.yml can optionally have a dojos key, which is a list of standard dojo yml objects. All modules live in the base directory, and are loaded conditionally per dojo yml object. (https://github.com/2stinkysocks/example-monorepo-dojo)

Current issues:
All dojos in a shared repository must not exist during dojo creation, or they will all fail.
There is no mechanism for migrating existing dojos into a single repository.
I have not tested a lot of existing features, and there may be some side effects I haven't found.
I have not tested github ci at all.

Currently working:
Shared repositories can be loaded as usual, multiple dojos will be created.

Updating dojos will update only the one for which update was clicked. The files for shared repositories are updated any time any dojo is updated, but the database will only be changed for the dojo which update was called on (I don't think this has side effects, needs further testing). The git hash for all dojos in a single repo will be the same in the admin page.
Files for shared repos are stored under the same directory, with the format shared-{repository_url_md5}

Promoting dojos works (single boolean column change).

2stinkysocks and others added 8 commits September 8, 2025 17:16
dojo.yml has optional "dojos" key which is a list of dojos (normal dojo ymls)
creating dojos works, files are stored internally under shared-repo hash
updating is broken
promoting is working
challenges are working
nothing for migration yet
all dojos must not exist already, if any dojo fails all will fail during creation (have not tested behavior)
@2stinkysocks
Copy link
Contributor Author

Note: going to change this functionality so creating a dojo has another extra field to specify a dojo yml path, so only one dojo will be created from the create page at a time

@2stinkysocks
Copy link
Contributor Author

New info:

Added an extra field in dojo create to specify a dojo yml path. Dojo creation only loads a single dojo which may be part of a larger monorepo.

Repositories are duplicated on disk (one per dojo) and are updated when the specific dojo is updated.

@2stinkysocks 2stinkysocks marked this pull request as ready for review September 30, 2025 18:30
@ConnorNelson
Copy link
Member

We want to make sure there's no symlink/path-traversal shenanigans.

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