Skip to content

Add plugin support#260

Merged
b-rowan merged 19 commits intomasterfrom
plugins
Aug 13, 2025
Merged

Add plugin support#260
b-rowan merged 19 commits intomasterfrom
plugins

Conversation

@b-rowan
Copy link
Copy Markdown
Member

@b-rowan b-rowan commented Feb 27, 2025

This adds plugin support for goosebit, allowing extending templates, static files, routing, config data hooks, and update hooks. This is everything we need for our internal plugins, and have been using a form of this for well over a month now with no issues. This is a slightly cleaner implementation of our system that uses a PluginSchema class to define what should be included in the main app.

Closes #15

@easybe easybe self-requested a review February 28, 2025 07:58
@easybe
Copy link
Copy Markdown
Collaborator

easybe commented Feb 28, 2025

Great to see that you were able to come up with a solution for this problem.

Would it be possible to whip up a very simple example plugin which we ideally could include in the demo setup? Or, at least some documentation on how to use this. It would make it a lot easier for me to review.

@b-rowan
Copy link
Copy Markdown
Member Author

b-rowan commented Feb 28, 2025

Sure, can do. Main thing I wanted here was confirmation of the concept, if the concept seems sound then I will work on the stuff that makes it easier for other people to use.

@b-rowan b-rowan force-pushed the plugins branch 2 times, most recently from 6f12a23 to 0715e85 Compare February 28, 2025 18:08
@b-rowan
Copy link
Copy Markdown
Member Author

b-rowan commented Feb 28, 2025

@easybe Added an example plugin under goosebit/example_plugin, if you follow the instructions in the readme for it you should be able to get it up and running. The main important parts of this PR are all under goosebit itself, but taking a look through the example plugin should help clarify how to use it.

@b-rowan b-rowan requested a review from tsagadar April 21, 2025 14:29
Copy link
Copy Markdown
Collaborator

@easybe easybe left a comment

Choose a reason for hiding this comment

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

Sorry for taking so long.

Seems like a good approach to me.

@b-rowan b-rowan force-pushed the plugins branch 4 times, most recently from 8589f11 to 451ef92 Compare August 12, 2025 15:24
@b-rowan
Copy link
Copy Markdown
Member Author

b-rowan commented Aug 12, 2025

@jkuri I can't figure out what is wrong with these tests... Getting the following error locally -

 goosebit  Built
 swupdate  Built
 Network s3_goosebit_network  Creating
 Network s3_goosebit_network  Error
failed to create network s3_goosebit_network: Error response from daemon: invalid pool request: Pool overlaps with other one on this address space

@easybe
Copy link
Copy Markdown
Collaborator

easybe commented Aug 12, 2025

@jkuri I can't figure out what is wrong with these tests... Getting the following error locally -

 goosebit  Built
 swupdate  Built
 Network s3_goosebit_network  Creating
 Network s3_goosebit_network  Error
failed to create network s3_goosebit_network: Error response from daemon: invalid pool request: Pool overlaps with other one on this address space

I was wondering why you are using static IP addresses. Why not just use Compose's default network and use host names for addressing? I.e.:

endpoint_url: http://minio:9000

instead of:

endpoint_url: http://172.20.5.100:9000 # example for self-hosted min.io

@jkuri
Copy link
Copy Markdown
Collaborator

jkuri commented Aug 12, 2025

@jkuri I can't figure out what is wrong with these tests... Getting the following error locally -

 goosebit  Built
 swupdate  Built
 Network s3_goosebit_network  Creating
 Network s3_goosebit_network  Error
failed to create network s3_goosebit_network: Error response from daemon: invalid pool request: Pool overlaps with other one on this address space

Maybe you didn't wait for them to complete or cancelling them with ctrl+c then forgot to docker compose -f /path/to/docker-compose.yml down.

@jkuri
Copy link
Copy Markdown
Collaborator

jkuri commented Aug 12, 2025

@jkuri I can't figure out what is wrong with these tests... Getting the following error locally -

 goosebit  Built
 swupdate  Built
 Network s3_goosebit_network  Creating
 Network s3_goosebit_network  Error
failed to create network s3_goosebit_network: Error response from daemon: invalid pool request: Pool overlaps with other one on this address space

I was wondering why you are using static IP addresses. Why not just use Compose's default network and use host names for addressing? I.e.:

endpoint_url: http://minio:9000

instead of:

endpoint_url: http://172.20.5.100:9000 # example for self-hosted min.io

I can update to dynamic ips configuration and use host addresses if you prefer.

@b-rowan
Copy link
Copy Markdown
Member Author

b-rowan commented Aug 12, 2025

I can update to dynamic ips configuration and use host addresses if you prefer.

I'm testing this locally right now. Getting a different error, but there's a good chance I have no idea what I'm doing.

@b-rowan
Copy link
Copy Markdown
Member Author

b-rowan commented Aug 12, 2025

goosebit stucks after running migrations and not bootstraping up, that's why container is unhealthy and e2e tests are not starting.

Any guesses how to fix this? I will push updates to this branch with the rebase so you ca take a better look.

@b-rowan b-rowan force-pushed the plugins branch 2 times, most recently from b7d4fe5 to 5e4ed29 Compare August 12, 2025 17:11
@easybe easybe removed the request for review from tsagadar August 12, 2025 17:13
@github-actions
Copy link
Copy Markdown

filepath function error SUBTOTAL
e2e/external_auth/tests/test_e2e_external_auth.py test_e2e_external_auth_smoke_and_health 1 1
e2e/external_auth/tests/test_e2e_external_auth.py test_e2e_device_registration_with_external_auth 1 1
e2e/s3/tests/test_e2e_s3.py test_e2e_smoke_setup_login_and_basic_routes 1 1
e2e/s3/tests/test_e2e_s3.py test_e2e_artifact_upload_and_minio_presence 1 1
e2e/s3/tests/test_e2e_s3.py test_e2e_device_update_rollout_to_version 1 1
TOTAL 5 58

@jkuri
Copy link
Copy Markdown
Collaborator

jkuri commented Aug 12, 2025

goosebit stucks after running migrations and not bootstraping up, that's why container is unhealthy and e2e tests are not starting.

Any guesses how to fix this? I will push updates to this branch with the rebase so you ca take a better look.

I'll find an issue and let you know.

@jkuri
Copy link
Copy Markdown
Collaborator

jkuri commented Aug 12, 2025

@b-rowan it should be fixed now, I needed to upgrade aerich more info tortoise/aerich#63 (comment)

@b-rowan b-rowan requested a review from easybe August 12, 2025 17:49
@b-rowan b-rowan requested a review from easybe August 12, 2025 19:28
@b-rowan b-rowan requested a review from easybe August 12, 2025 20:32
@b-rowan b-rowan requested a review from easybe August 12, 2025 21:13
@b-rowan b-rowan merged commit d944cf4 into master Aug 13, 2025
6 checks passed
@b-rowan b-rowan deleted the plugins branch August 13, 2025 15:56
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.

gooseBit plugin/module system design

4 participants