1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-10-27 20:34:20 +00:00
Commit Graph

32 Commits

Author SHA1 Message Date
marian cingel
277a59f1cb Support Clang/LLVM build on FBSD
- Update CMakeList to support installation to PREFIX directory
- FreeBSD does not support abstract sockets (unix-abstract:laminar),
  so explicit 'LAMINAR_BIND_RPC=IP:port' is required
- ld.lld requires explicit emulation for binary blobs, add a new
  variable LINKER_EMULATION_FLAGS for this purpose
2023-11-07 09:17:52 +13:00
Oliver Giles
06a5f3d8ef assign run numbers at queue time
This allows build chains to be traced in the common case where
an upstream job calls `laminarc queue' instead of `laminarc start'.
Incomplete job runs now have database entries, which requires
some adjustments in queries. Queued jobs can now be viewed in
the frontend and there is a corresponding status icon.
2020-09-25 15:29:30 +12:00
Oliver Giles
6d2c0b208b fix LAST_RESULT env var
the variable was set too late to be passed to the forked
process.

resolves #131
2020-09-20 09:15:03 +12:00
Oliver Giles
d6be7f5079 fix minor compile warnings 2020-07-03 17:31:44 +12:00
Oliver Giles
3fde38c6b8 job leader process
Implement a separate process, the "leader", which runs all the
scripts for a job run, instead of directly from the main laminard
process. This makes for a cleaner process tree view, where the
owning job for a given script is clear; also the leader process
acts as a subreaper to clean up any wayward descendent processes.

Resolves #78.
2019-12-23 07:56:37 +02:00
Oliver Giles
0384fc9a0a
Replace nodes/tags with contexts
The nodes/tags system has not been particularly successful, it's not as
intuitive as it could be, and in an attempt to be a single feature to address
many use cases, ends up addressing none of them particularly well.

This commit replaces nodes and tags with contexts.

Each job may define which context(s) the job may be associated with.
Laminar will only pop the job off the waiting queue when it can be assigned
to a context. A context defines an integer number of executors, which
represents how many runs can be simultaneously assigned to it. A context
may provide extra environment variables.

Essentially, a context replaces a node, and tags are gone. You just assign
jobs to contexts directly, and you can use a glob expression. This should be
more intuitive.

For grouping jobs in the WebUI, a separate mechanism called "groups" is provided.
2019-12-13 10:42:22 +02:00
Oliver Giles
39ca7e86cf replace websockets with sse and refactor
Large refactor that more closely aligns the codebase to the kj async
style, more clearly exposes an interface for functional testing and
removes cruft. There is a slight increase in coupling between the
Laminar and Http/Rpc classes, but this was always an issue, just until
now more obscured by the arbitrary pure virtual LaminarInterface class
(which has been removed in this change) and the previous lumping
together of all the async stuff in the Server class (which is now
more spread around the code according to function).

This change replaces the use of Websockets with Server Side Events
(SSE). They are simpler and more suitable for the publish-style messages
used by Laminar, and typically require less configuration of the
reverse proxy HTTP server.

Use of gmock is also removed, which eases testing in certain envs.

Resolves #90.
2019-10-05 20:06:35 +03:00
Oliver Giles
0c67d4c844 logging: strip full paths from __FILE__ at compile-time 2019-04-11 22:14:26 +03:00
Oliver Giles
77b8c8d601 resolves #69: job scripts as symlinks
Fixes some regressions introduced by the recent refactor
2018-10-14 22:16:42 +03:00
Oliver Giles
63301c73d9 resolves #61: clickable up/downstream triggers
Recognises triggers in build logs and converts them to
hyperlinks. Also separates upstream job from reason string
and allows both to be provided
2018-09-30 09:04:17 +03:00
Oliver Giles
08b3f25a22 Replace boost/filesystem with kj/filesystem
Lose the boost dependency since recent versions of capnproto's kj
also provide a nice filesystem library. Take the opportunity to
refactor the Run object to become more than POD and to encapsulate
some of the functionality that was done in the Laminar class

Part of #49 refactor
2018-09-28 12:43:40 +03:00
Oliver Giles
ab7be5a6c9 resolves #52: timeout prevents .after script
Mark .after scripts as executing even after a timeout abort
2018-09-09 12:15:23 +03:00
Oliver Giles
a81492e5bc use kj's onChildExit mechanism
This reduces code and allows for more idiosyncratic use of Promises.
Requires latest capnproto git.

Part of #49 refactor
2018-08-03 14:36:24 +03:00
Oliver Giles
4ffc22c657 use promises to control job runs
This is a refactor that more cleanly uses the kj framework for handling
processes spawned by Runs. This obviates the workaround introduced back in
ff42dae7cc, and incidentally now requires c++14.

Part of #49 refactor
2018-07-20 17:40:56 +03:00
Oliver Giles
9c256815e4 resolves #29: graceful shutdown
on SIGINT/SIGTERM:
1. stop accepting new connections
2. send SIGTERM to all child tasks
3. wait for processes to end
4. drop all websockets
2018-02-24 18:53:11 +02:00
Oliver Giles
3129f0e73b fix pedantic compiler warnings 2017-12-21 08:19:45 +02:00
Oliver Giles
74443c292a Fix copyright years
This reverts commit 4e911756bc.

In addition, copyright years are now expressed in the form of
(year file added)-(year file last changed)
2017-12-09 12:21:34 +02:00
Oliver Giles
91baf358da plain run vars override vars from parameterized triggers 2017-08-16 09:09:01 +03:00
Oliver Giles
636dfb8651 use shorter build vars in traditional style 2017-08-16 09:08:57 +03:00
Oliver Giles
4fc2310ed9 allow Run::addScript to accept a CWD for scripts 2017-08-07 08:07:50 +03:00
Oliver Giles
4e911756bc update copyright year 2016-07-25 15:00:49 +03:00
Oliver Giles
2ea27d46ed implement proper child cleanup 2016-07-25 14:59:45 +03:00
Oliver Giles
1eb6a9138e better message on execl failure 2015-12-06 12:41:38 +01:00
Oliver Giles
e7fe117426 don't log full file paths, remove use of KJ_DBG 2015-12-06 12:36:12 +01:00
Oliver Giles
f181c87d3b report running state, only show spinner when actually running 2015-12-06 12:15:05 +01:00
Oliver Giles
0df97e95fd support for job and node tags 2015-09-24 22:02:11 +02:00
Oliver Giles
79c3ee5fcb fix spelling mistake 2015-09-24 21:07:48 +02:00
Oliver Giles
1caeeabbfd expose lNode 2015-09-19 15:40:09 +02:00
Oliver Giles
291428ef2d add support for global, node and job level env files 2015-09-19 14:55:16 +02:00
Oliver Giles
cf10d5c795 expose lArchive 2015-09-19 13:40:00 +02:00
Oliver Giles
2147346493 expose lResult and lLastResult 2015-09-19 10:38:34 +02:00
Oliver Giles
a2701dcfd9 Initial commit 2015-09-13 22:25:26 +02:00