| Age | Commit message (Collapse) | Author | Lines |
|
resolves #235
|
|
- 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
|
|
Originally reverted to prevent a crash when reading from an http
client raised ECONNRESET. Although this prevented a crash, laminar
stopped listening for http connections. That issue was resolved in
37bbf6ade4 (see #164), so make all exceptions fatal again.
This reverts commit 02810309fcfe09f1b4eb283625d656260d0690ef.
|
|
In real deployments, sometimes http connections break with ECONNRESET.
This causes the kj::HttpServer listener promise to break, which means
no more connections are accepted. Catch this exception and restart
the listener.
resolves #164
|
|
Realistically this is probably the permission mask you
want if you are using a unix socket for LAMINAR_BIND_RPC
or LAMINAR_BIND_HTTP.
resolves #160
|
|
turns out we can end up here when an http client unexpectedly
drops the connection, so it must not cause an exit()
|
|
|
|
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.
|
|
this is initial preparation for a larger refactor
|
|
Needed for musl
|
|
|
|
|
|
As discussed in #88, nginx will buffer the chunked transfer-encoding
unless the proxy_buffering directive is disabled, or the
X-Accel-Buffering header is set to no. Do the latter to reduce
configuration burden on frontend reverse-proxy setups.
|
|
badge urls were returning 404 and an exception message since
cec4721e. Fixed by correctly extracting the job name from the
request URL
|
|
use correct sqlite column name
remove redundant code, tidy implementation
|
|
|
|
|
|
|
|
Implements the following laminarc commands:
- show-jobs
- show-running
- show-queued
- abort
|
|
Part of #49 refactor
|
|
Add an example to the User Manual for using flock instead
|
|
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
|
|
Implements serving of an SVG badge at the url /badge/JOB.svg which
prettily shows the job's current status
|
|
This feature allows runs to be sorted by result, number, start time
or duration, in ascending or descending order, on the Job page. Request
is processed server-side so that the correct page division can be done.
Currently running jobs are not sorted.
|
|
This reduces code and allows for more idiosyncratic use of Promises.
Requires latest capnproto git.
Part of #49 refactor
|
|
This is a refactor that more cleanly uses the kj framework for handling
processes spawned by Runs. This obviates the workaround introduced back in
ff42dae7cc3, and incidentally now requires c++14.
Part of #49 refactor
|
|
The old implementation slurped the whole artefact into memory, and
did not ensure it remained allocated beyond the first call to write().
The new implementation uses mmap and ensures the mapping lasts until
the file has been delivered
|
|
The previous implementation meant that messages could get lost if
both sending and receiving were scheduled to be processed in the
same event loop cycle. This commit separates the two channels
more clearly, while still allowing the close event in the receive
side to cancel the whole pipeline
Part of #49 refactor
|
|
Now that capnp/kj provides http and websocket functions, replace
the excellent websocketpp library with the kj functions. This
removes a dependency and allows for more consistent idiomatic
code. Thanks websocketpp, it was great to have you along!
This should enable parts of the refactor described in #49
|
|
|
|
|
|
Add the ability to configure a timeout in seconds
after which a job run will be automatically aborted
|
|
Caddy (and probably other webservers) add a Content-Type header
when one was not supplied by the application backend. Under Chromium,
the css file is not interpreted if the webserver delivers it with
Content-Type: text/plain, althugh it does work if no Content-Type
header is set. To prevent the frontend proxy from adding the wrong
header, set it correctly in the first place
|
|
Reload the configuration if a change is detected
without requiring a server restart
|
|
|
|
|
|
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
|
|
Read or writes to bad file descriptors threw exceptions, just log
this instead. Also make sure that LaminarClients are removed from
the list of clients when a connection is aggressively dropped, and
add test
|
|
|
|
|
|
Now explicitly closed connections on the client side are
closed with a clean error code. This is motivated by upcoming
work to detect broken websockets and automatically reconnect
|
|
This reverts commit 4e911756bcca87111b3285aadc808dee3c32ec63.
In addition, copyright years are now expressed in the form of
(year file added)-(year file last changed)
|
|
This approach finally solves the crash under hardened gentoo
discussed in #19
|
|
|
|
|
|
Can't reproduce this locally, but looks like using a std::string
as an arbitrary buffer is causing problems. See #19
|
|
|
|
reading into a static buffer is a race condition that is only
manifested under load. There's no guarantee the clause in then()
will run before another task overwrites the buffer. Allocating
a local string is the only correct solution
|
|
|
|
|