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

Feature s6 overlay #8886

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Feature s6 overlay #8886

wants to merge 1 commit into from

Conversation

stumpylog
Copy link
Member

Proposed change

This PR transitions to Docker image away from supervisord to use s6, as provided by s6-overlay.

What

s6 is a process supervision suite of tools, and s6-overlay is a nice implementation wrapping them up into useful settings for Docker use. It's the same set of tools used by the LinuxServer.io team for their base images.

The previous 2 bash scripts have been broken apart into distinct oneshot services handling a single thing, with dependencies as required. For the most part, start up ordering is identical, with some gains for doing a few init actions in parallel. I've included a flowchart in the folder of how the startup dependencies are setup.

Why

In the second paragraph of the supervisord documentation, it is noted to not be a proper replacement for PID 1. s6 is a proper PID 1 process supervision suite with some nice utilities for process control as well. It's good to have a proper PID 1 for signal handling, clean shutdowns and reaping zombies properly.

All the s6 services, oneshot or longrun can have dependencies defined between them, ensuring and enforcing a valid ordering of startup. This includes more correct handling of optional services like flower, which previously was kind of hacky and just allowed to exit, even if it should have started.

I'm sure this will break someone's workflow, but hopefully not too badly.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain)

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@github-actions github-actions bot added the enhancement New feature or enhancement label Jan 23, 2025
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.68%. Comparing base (2c28348) to head (5a16463).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff            @@
##              dev    #8886    +/-   ##
========================================
  Coverage   97.68%   97.68%            
========================================
  Files         489      489            
  Lines       20934    20934            
  Branches     1601     1717   +116     
========================================
  Hits        20450    20450            
+ Misses        484      481     -3     
- Partials        0        3     +3     
Flag Coverage Δ
backend 96.56% <ø> (ø)
frontend 98.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shamoon
Copy link
Member

shamoon commented Jan 23, 2025

Cool stumpy, I've been looking at this branch of yours for a while, reading a little about it. I dont pretend to understand all of the benefits but certainly seems it could be helpful given the complexity of the project. Thanks for taking it on, dont know that I'll have much to add (huge diff!) when its ready but will of course test etc.

@stumpylog
Copy link
Member Author

Besides the technical stuff, it does feel like things start faster. Perhaps due to some parallel actions.

Ideally, everything in the original 2 scripts is mostly replicated into the smaller units. I think I captured every recent update to the startup, but that's good to double check me on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants