Skip to content

bug: improve garage service and startup + tests#2846

Open
gabyx wants to merge 8 commits into
cachix:mainfrom
gabyx:fix/garage-service
Open

bug: improve garage service and startup + tests#2846
gabyx wants to merge 8 commits into
cachix:mainfrom
gabyx:fix/garage-service

Conversation

@gabyx
Copy link
Copy Markdown
Contributor

@gabyx gabyx commented May 19, 2026

Closes #2840

Copilot AI review requested due to automatic review settings May 19, 2026 15:20
@gabyx gabyx force-pushed the fix/garage-service branch from bff62fd to 5974bb1 Compare May 19, 2026 15:21
Comment thread src/modules/services/garage.nix
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to ensure Garage’s configureScript is executed reliably when using process-compose, addressing issue #2840 where the configuration step was not being run.

Changes:

  • Refactors the Garage module header/formatting and introduces a dedicated processes.garage-configure process to run the configuration script after Garage becomes ready.
  • Adjusts process/task ordering so the Garage process runs after a setup task creates the state directories.
  • Renames the module’s option namespace from services.garage to custodian.services.garage.
Comments suppressed due to low confidence (2)

src/modules/services/garage.nix:11

  • The module option path was changed from services.garage to custodian.services.garage, which is a breaking change and will also break existing in-repo usage (e.g. tests/garage/devenv.nix still configures services.garage). Unless there is a broader rename, this should stay under services.garage; otherwise add a compatibility shim (e.g. mkRenamedOptionModule) and update all internal references accordingly.
  types = lib.types;

  parsePort = addr: lib.toInt (lib.last (lib.splitString ":" addr));

src/modules/services/garage.nix:71

  • Because the option path was renamed here, make sure all user-facing strings and internal references are updated to match (e.g. the assertion messages later in this module still mention services.garage.*). If the intention is not to rename the public API, please revert back to options.services.garage/config.services.garage instead.

    package = lib.mkOption {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/services/garage.nix
Comment thread src/modules/services/garage.nix Outdated
Comment thread src/modules/services/garage.nix
@gabyx
Copy link
Copy Markdown
Contributor Author

gabyx commented May 19, 2026

@sandydoo: Thanks for merging this. Improves Garage, and adds the missing bucket test.

@gabyx gabyx changed the title fix: improve garage service bug: improve garage service and startup + tests May 19, 2026
@gabyx
Copy link
Copy Markdown
Contributor Author

gabyx commented May 20, 2026

@sandydoo : this needs further improvements. I am working on it. since the whole setup is not good.

also lib.writeShellScriptBin should ahve been used for user friendliness with shellcheck etc etc...

@gabyx
Copy link
Copy Markdown
Contributor Author

gabyx commented May 20, 2026

Is good to be merged, IMO.

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.

bug: garage service does not execute configureScript with process-compose

2 participants