1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-09-28 22:40:45 +00:00
Commit Graph

115 Commits

Author SHA1 Message Date
Oliver Giles
41ddd8fe4f allow adding job to front of queue
laminarc now supports {queue,start,run} --next to place the job at the
front of the queue instead of at the end.

resolves #162
2022-01-22 15:18:43 +13:00
Oliver Giles
e1686d454b display run number for queued jobs
in the frontend and in laminarc queue/show-queued. This makes
it much easier to abort/unqueue runs which have not yet started.

resolves #155
2021-12-05 13:42:27 +13:00
Oliver Giles
a50514a135 frontend: better dynamic update of graphs
react to jobCompletion messages by updating graphs in
more cases so manual refresh is not necessary to see
most up to date representation.
2021-07-09 10:04:20 +12:00
Oliver Giles
d01cf1c9b0 failure to remove rundir should not abort the jobrunner
kj::Directory::remove will throw if it fails to remove some files, e.g. in
case of insufficient permissions. Catch this and move right along.

resolves #156
2021-05-23 14:42:06 +12:00
Jan-Benedict Glaw
7e77ec1211 Allow subdirs in artifacts directory
Extend populateArtifacts() with a subdir parameter (default initialized to ".")
to allow for recursive calls. With subdirs encountered, call recursively.
2021-03-08 20:30:59 +13:00
vrein
c42b6d4207 Pass reason and queuedAt to Home page 2021-02-22 08:53:05 +13:00
Oliver Giles
ec237f475e deprecate custom css
replaced by custom index html page
2020-12-05 13:54:35 +13:00
Oliver Giles
c274e321df fetch average runtime as double, not int
only makes a difference for very short jobs, but nice
to have more accurate graphs
2020-12-05 13:51:25 +13:00
Oliver Giles
3e993d35a0 no badges for unfinished runs
do not attempt to generate badges for runs which have not
yet finished.

resolves #134
2020-11-13 14:02:00 +13:00
Oliver Giles
4fb95fcb4f allow contexts to specify accepted jobs
using a glob expression, the same way jobs can specify
contexts. This allows more flexibility in situations where
there are many jobs sharing limited contexts because it
may obviate the need to create a conf file for each job.

resolves #124
2020-11-13 13:47:02 +13:00
Oliver Giles
1ea9713536 implement wallboard view
resolves #51
2020-10-09 13:06:03 +13:00
Oliver Giles
746ab24676 move buildTimeDist chart to examples
too esoteric for the front page, converting it to an example
of querying laminar db directly and using gnuplot should provide
more value to those needing deeper insights into job behaviour.
2020-09-26 15:12:02 +12:00
Oliver Giles
9862affd98 fix warnings under clang++ 2020-09-26 11:33:36 +12: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
e29568f627 improve layout on large screens 2020-09-04 13:08:34 +12:00
Oliver Giles
d6be7f5079 fix minor compile warnings 2020-07-03 17:31:44 +12:00
Oliver Giles
09a208ebeb report version and usage messages
add -h|--help usage messages to laminarc and laminard

add a mechanism to compile in a version number, and display the
version in the help messages and in the frontend.

resolves #119
2020-07-03 15:13:11 +12:00
Oliver Giles
de948c149e don't report latestNum of non-existent job
navigating to a non-existent job in the frontend caused a
mutating change to the buildNums map, and returing the latestNum
field caused the frontend to repeatedly try to fetch the latest
run, which could overload the backend
2020-06-20 15:46:18 +12:00
Cameron Eagans
2e54773e83
Add the ability to customize index.html (#113)
User may provide a custom index.html template file to be used instead
of the built-in version. Changes to this file are watched by laminard
using inotify in order to load and compress the custom file for gzip
delivery, reusing the existing method for serving static assets.

This feature obviates the custom css feature, so remove references from
the manual and add a deprecation warning if it is used.

Add a section to the UserManual describing how to use this feature and
including a link to an example using Semantic UI.
2020-03-10 19:40:14 +02:00
Oliver Giles
2bf04d8157 allow setting a job description
adding DESCRIPTION=foo to $JOBNAME.conf will display "foo"
in the job overview page on the frontend

Resolves #97
2019-12-25 14:37:16 +02: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
ba472711be refactor: remove run page json type hack
this hack tried to avoid sending unnecessary data to the frontend,
but it was more trouble than it's worth
2019-11-01 07:27:34 +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
Vaclav Valicek
303fe7c6ae resolves #87: Fix archive url: missing slash
Terminate default URL with slash, add slash to custom URL when absent
2019-03-27 09:00:13 +02:00
Oliver Giles
b15166e83b resolves #82: implement /latest endpoint
for run page on webui and archive (via symlink)
2019-02-18 23:06:11 +02:00
Oliver Giles
807901c719 additional fixes for #79: chunked http log
use correct sqlite column name
remove redundant code, tidy implementation
2019-02-17 22:51:11 +02:00
Oliver Giles
cec4721e52 resolves #79: serve logs over plain chunked http 2019-02-15 19:05:44 +02:00
Oliver Giles
5c7421c833 minor valgrind fixes 2019-02-15 18:24:36 +02: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
7cee824cee resolves #67: laminarc list jobs
Implements the following laminarc commands:
- show-jobs
- show-running
- show-queued
- abort
2018-10-12 17:22:21 +03:00
Oliver Giles
7c600c679f fix node/tag bugs introduced with fs refactor 2018-10-12 17:01:42 +03:00
Oliver Giles
787f8f1681 badge svg: define root element dimensions
This prevents default 300x150 sizing
2018-10-12 12:56:16 +03:00
Oliver Giles
0bacaf2a3e fix ambiguous SQL query
Query did not always return the last run as required due to
implementation-defined behaviour of mixing aggregate and
non-aggregate columns with group-by
2018-09-30 13:08:34 +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
132d40e6a3 resolves #50: badge url
Implements serving of an SVG badge at the url /badge/JOB.svg which
prettily shows the job's current status
2018-09-10 14:51:43 +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
a2d30ad2ea resolves #62: add average line to build time graphs 2018-09-08 21:02:58 +03:00
Oliver Giles
010af57ed4 resolves #45: new graphs
- regressions and recoveries: list of jobs whose run status changed,
  ordered first by currently failing jobs, secondly by count of jobs
  since the status change, descending for currently failing jobs and
  ascending for currently passing jobs
- low pass rates: list of the jobs with the worst pass rates calculated
  over all time
- run time changes: jobs with the largest changes in build time. This
  is calculated as the difference between the range and the standard
  deviation over the past 10 runs.
- average run time distribution: shows the number of jobs in the
  system divided into buckets based on their average runtime
2018-09-08 18:16:30 +03:00
Oliver Giles
2349791676 resolves #47: jobs don't refresh on jobs page
The computed list of filtered jobs wasn't updated when a notification
was received from the server. Switch to using a method rather than a
computed property to fix this. Also add tags to jobs reported in
job_started and job_completed notifications
2018-08-24 13:10:00 +03:00
Oliver Giles
8bcce4d5cc resolves #40: implement frontend sorting
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.
2018-08-24 12:15:40 +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
d29715c0ec Reuse MappedFileImpl for reading custom css
This is nicer than slurping and removes a whole function. A further
improvement could be to retain the mapping permanently open.

Part of #49 refactor
2018-07-06 13:45:13 +03:00
Oliver Giles
758b5f2e46 resolves #37: closed connection on large files
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
2018-07-06 13:18:04 +03:00
Oliver Giles
2a14567b79 resolves #54: page number remembered between jobs 2018-06-16 17:07:04 +03:00
Oliver Giles
a0f586581d resolves #38: implement pagination for the job page 2018-06-01 14:51:34 +03:00