cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.56k stars 259 forks source link

temporal: add temporal service #633

Closed sagikazarmark closed 11 months ago

sagikazarmark commented 11 months ago

Fixes #632

sagikazarmark commented 11 months ago

I'm open to feedback, particularly about the ephemeral option. Not sure that's the right name/structure, especially since there are other state related parameters (eg. sqlite-pragma) that might make sense to be exposed.

sagikazarmark commented 11 months ago

Would this be better compared to the current ephemeral option?

{
    state = {
        ephemeral = true|false;
        sqlite-pragma = {
            # ...
        };
    };
}
sagikazarmark commented 11 months ago

I added a separate section for state config matching the above.

sagikazarmark commented 11 months ago

Hm, that bind: address already in use error is weird. Any chance these tests run in parallel on those machines? Would it make sense to randomize ports?

Maybe it just needs a retry.

shyim commented 11 months ago

Does temporal run in foreground so it can be properly stopped?

sagikazarmark commented 11 months ago

It does, but the shutdown process may not be instantaneous.

sagikazarmark commented 11 months ago

I tried changing the port, maybe there is a collision.

sagikazarmark commented 11 months ago

Apparently, there is something running on that port. Changing the port fixes the problem. I also fixed the script, so hopefully it's going to work now.

sagikazarmark commented 11 months ago

Breaking jobs seem unrelated to me. I think this is ready.

shyim commented 11 months ago

seems related to https://github.com/NixOS/nixpkgs/issues/233265

sagikazarmark commented 11 months ago

Can I get a review on this? Since the breaking builds are unrelated, any chance this can get merged?