Commit graph

9903 commits

Author SHA1 Message Date
Vincent Ambo
c2507d91f8 feat(emacs): Install hydra 2018-06-19 15:21:34 +02:00
Eelco Dolstra
629398d05c
Merge pull request #2241 from dtzWill/feature/refresh-progress-bar
progress-bar: refresh occasionally even if no updates are received
2018-06-19 09:13:58 +02:00
Shea Levy
1fb475e7fc
Merge pull request #2240 from dtzWill/fix/use-utillinux-minimal
release-common: prefer utillinuxMinimal to reduce compile-time deps
2018-06-18 19:47:50 -04:00
Will Dietz
44de71a396 progress-bar: re-draw last update if nothing new for 1sec.
Slightly nicer behavior when updates are somewhat far apart
(during a long linking step, perhaps) ensuring things
don't appear unresponsive.

If we wait the maximum amount for the update,
don't bother waiting another 50ms (for rate-limiting purposes)
and just check if we should quit.

This also ensures we'll notice the request to quit within 1s
if quit is signalled but there is not an udpate.
(I'm not sure if this happens or not)
2018-06-18 17:54:09 -05:00
Will Dietz
f601bc0492 sync.hh: return cv_status instead of dropping it, in case useful. 2018-06-18 17:31:00 -05:00
Will Dietz
25cb1a6343 release-common: prefer utillinuxMinimal to reduce compile-time deps
Honestly could probably use busybox here instead, but at least
with utillinuxMinimal there's no build-time dependency on systemd.
2018-06-18 15:50:37 -05:00
Abseil Team
bd40a41cc1 --
f28d30df5769bb832dec3ff36d2fcd2bcdf494a3 by Shaindel Schwartz <shaindel@google.com>:

Internal change

PiperOrigin-RevId: 201046831

--
711715a78b7e53dfaafd4d7f08a74e76db22af88 by Mark Barolak <mbar@google.com>:

Internal fix

PiperOrigin-RevId: 201043684

--
64b53edd6bf1fa48f74e7f5d33f00f80d5089147 by Shaindel Schwartz <shaindel@google.com>:

Remove extra whitespace

PiperOrigin-RevId: 201041989

--
0bdd2a0b33657b688e4a04aeba9ebba47e4dc6ca by Shaindel Schwartz <shaindel@google.com>:

Whitespace fix.

PiperOrigin-RevId: 201034413

--
3deb0ac296ef1b74c4789e114a8a8bf53253f26b by Shaindel Schwartz <shaindel@google.com>:

Scrub build tags. No functional changes.

PiperOrigin-RevId: 201032927

--
da75d0f8b73baa7e8f4e9a092bba546012ed3b71 by Alex Strelnikov <strel@google.com>:

Internal change.

PiperOrigin-RevId: 201026131

--
6815d80caa19870d0c441b6b9816c68db41393a5 by Tom Manshreck <shreck@google.com>:

Add documentation for our LTS snapshot branches

PiperOrigin-RevId: 201025191

--
64c3b02006f39e6a8127bbabf9ec947fb45b6504 by Greg Falcon <gfalcon@google.com>:

Provide absl::from_chars for double and float types.  This is a forward-compatible implementation of std::from_chars from C++17.

This provides exact "round_to_nearest" conversions, and has some nice properties:

* Works with string_view (it can convert numbers from non-NUL-terminated buffers)
* Never allocates memory
* Faster than the standard library strtod() in our toolchain
* Uses integer math in its calculations, so is unaffected by floating point environment
* Unaffected by C locale

Also change SimpleAtod/SimpleAtoi to use this new API under the hood.

PiperOrigin-RevId: 201003324

--
542869258eb100779497c899103dc96aced52749 by Greg Falcon <gfalcon@google.com>:

Internal change

PiperOrigin-RevId: 200999200

--
3aba192775c7f80e2cd7f221b0a73537823c54ea by Gennadiy Rozental <rogeeff@google.com>:

Internal change

PiperOrigin-RevId: 200947470

--
daf9b9feedd748d5364a4c06165b7cb7604d3e1e by Mark Barolak <mbar@google.com>:

Add an absl:: qualification to a usage of base_internal::SchedulingMode outside of an absl:: namespace.

PiperOrigin-RevId: 200748234

--
a8d265290a22d629f3d9bf9f872c204200bfe8c8 by Mark Barolak <mbar@google.com>:

Add a missing namespace closing comment to optional.h.

PiperOrigin-RevId: 200739934

--
f05af8ee1c6b864dad2df7c907d424209a3e3202 by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 200719115
GitOrigin-RevId: f28d30df5769bb832dec3ff36d2fcd2bcdf494a3
Change-Id: Ie4fa601078fd4aa57286372611f1d114fdec82c0
2018-06-18 16:20:03 -04:00
Vincent Ambo
375cd8d93f chore(nix): Bump version to 1.0.0 2018-06-18 20:14:54 +02:00
Vincent Ambo
7557d8ff5b refactor(main): Move cursor file to /var/lib/journaldriver
This directory is the default for state directories managed by
systemd, which will be the main use-case of journaldriver when running
it on NixOS.

Relates to nixos/nixpkgs#42134
2018-06-18 20:12:43 +02:00
Vincent Ambo
f0dfc8b06d feat(functions): Add ivy-browse-repositories function
Quick helper to switch between all relevant projects.
2018-06-18 16:39:57 +02:00
Eelco Dolstra
b920b90857
Detect redirect loops
Fixes #2225.
2018-06-18 10:36:19 +02:00
Eelco Dolstra
2e244fb68f
Merge pull request #2234 from symphorien/esrch2
libstore/gc.cc: ignore ESRCH when reading symlinks in /proc
2018-06-18 09:01:55 +02:00
Vincent Ambo
9f29992d03 refactor(main): Split LOG_NAME & LOG_STREAM variables
Splitting these in two lets users better configure how the logs show
up in Stackdriver Logging.
2018-06-17 22:36:01 +02:00
Niklas Hambüchen
10ebcf8670
manual: distributed-builds: Mention - as default 2018-06-17 19:01:07 +02:00
Vincent Ambo
208b5dec2c chore: Bump to 1.0-rc1 2018-06-17 18:22:13 +02:00
Vincent Ambo
7b6f4cb89b docs(README): Add non-GCP instructions to README 2018-06-17 17:43:33 +02:00
Vincent Ambo
79afc5f474 feat(main): Support manually configured resource descriptors
Lets users specify environment variables to configure the monitored
resource descriptor. In combination with service account support this
can be used to configure journaldriver on non-GCP machines.

The supported environment variables are:

* `GOOGLE_CLOUD_PROJECT`: Project ID of the project to which to report
  logs
* `LOG_NAME`: Name of the Stackdriver Logging log into which to write
  entries
2018-06-17 17:43:33 +02:00
Vincent Ambo
62745db1a0 feat(main): Support static service account credentials
Adds support for authenticating towards Google's APIs by using static
service account credentials which can be retrieved from the GCP
console.

Users can toggle the behaviour by specifying the
`GOOGLE_APPLICATION_CREDENTIALS` environment variable.
2018-06-17 17:43:33 +02:00
Vincent Ambo
d56fedbe8d chore(cargo): Add dependency on medallion JWT library 2018-06-17 17:43:33 +02:00
Vincent Ambo
c2308b5ba1 chore(main): Bump chunk size to 750
Still slightly below the Stackdriver limit. However, previous errors
seem to have mostly been related to JSON payloads - which has been
fixed in the previous commit.
2018-06-17 15:46:05 +02:00
Vincent Ambo
05fa476929 fix(main): Correct name of JSON payload field 2018-06-17 15:46:05 +02:00
Vincent Ambo
68189d4872 refactor(main): Log error responses from Stackdriver
In some cases Stackdriver seems to return error responses for batched
inserts.

This change will log the error response body and status from
Stackdriver for all insertion errors.
2018-06-17 15:46:05 +02:00
Vincent Ambo
87ab3c806c feat(main): Parse timestamps out of journald entries
Instead of relying on Stackdriver's ingestion timestamps, parse
timestamps out of journal entries and provide those to Stackdriver.

If a timestamp could not be parsed out of a log entry, the ingestion
time is used as the fallback.
2018-06-17 15:46:05 +02:00
Vincent Ambo
f626d88438 chore(cargo): Enable chrono with serde as a dependency 2018-06-17 15:46:05 +02:00
Vincent Ambo
bd19132eff chore(main): Send logs in smaller chunks of 250 entries
In some cases sending 1000 entries seemingly results in a vague "Bad
request" error.

This reduces the chunk size to something that should be more
manageable.
2018-06-16 21:38:53 +02:00
Vincent Ambo
54b03a8dad fix(main): Attempt to read with next_record before waiting
Without this fix new records are only "pushed out" when something
appends to the journal.
2018-06-16 21:38:53 +02:00
Vincent Ambo
b6c0610278 feat(build): Add toggle for tests to Nix derivation 2018-06-16 21:38:53 +02:00
Vincent Ambo
e4b4830a04 feat(main): Persist & load persisted cursor positions
Adds support for persisting the cursor position in a file (by default
`/var/journaldriver/cursor.pos`, overridable via the environment
variable `CURSOR_POSITION_FILE`).

This lets journaldriver resume from a known journal position after
service restarts.

This closes #3
2018-06-16 21:38:53 +02:00
Vincent Ambo
03a6ea742c
Merge pull request #5 from aprilabank/feat/json-payloads
feat(main): Implement parsing of JSON payloads
2018-06-16 18:28:49 +02:00
Symphorien Gibol
ef8122064b libstore/gc.cc: ignore ESRCH when reading symlinks in /proc
readlink is also affected by the problem fixed for regular files in
c567afe355df
2018-06-16 18:04:09 +02:00
Vincent Ambo
10f23a9dfb feat(main): Implement parsing of JSON payloads
Stackdriver supports structured JSON payloads in addition to simple
plain-text payloads.

This commit introduces a new feature in which journaldriver will
attempt to parse incoming log messages into JSON vaues and forward
them as structured payloads if they are JSON objects.

Messages that can not be parsed into JSON objects will continue to be
forwarded as plain text messages.
2018-06-16 17:57:11 +02:00
Vincent Ambo
2e2e8379e9 fix(emacs): Fix ivy & prescient integration by manually pinning ivy
In the previous configuration the dependency on `ivy-pass` added a
second version of ivy to the load-path.

It is fixed by manually pinning ivy and its related packages and using
those to build ivy-pass.

This configuration should be temporary until the next time the MELPA
package set is updated in nixpkgs.

This caused the symptoms in raxod502/prescient.el#10
2018-06-16 16:37:17 +02:00
Vincent Ambo
8cc7d8da79 feat(packages): Pick VLC 3 from unstable
Finally!
2018-06-16 11:48:18 +02:00
Abseil Team
f44e1eed08 - d6b8d35be9659e1c99a5daca1af8c8587acaa044 Update bazel_toolchains to the latest commit. by Abseil Team <absl-team@google.com>
- 38311bf46f29bf1b20bdfe6c9b10c54e6258d28c Fix inlined_vector_benchmark when using libc++. libc++'s ... by Derek Mauro <dmauro@google.com>
  - 32178d067d4af7c3062532103d213eb7230c2be6 Adding sha256 hashes to dependencies in Abseil OSS WORKSP... by Daniel Katz <katzdm@google.com>
  - 13ac34416b326909f1ce0889ec0eb3bff3f3bebe Fix silly whitespace typo. by Daniel Katz <katzdm@google.com>

GitOrigin-RevId: d6b8d35be9659e1c99a5daca1af8c8587acaa044
Change-Id: I6be0d76930206edb79a10779bff3ffcc5ce856c9
2018-06-15 11:09:49 -04:00
Vincent Ambo
71f0afe4b5 fix(build): Update cargo dependency hash after deps change 2018-06-15 17:08:06 +02:00
Vincent Ambo
23286d13b9 docs: Add contribution guidelines
Adds contribution guidelines. These are a slightly modified version of
the guidelines I use for my personal projects.
2018-06-15 17:03:38 +02:00
Vincent Ambo
bb968ed8ed docs: Add code of conduct 2018-06-15 17:02:04 +02:00
Vincent Ambo
01ef180cff feat(build): Enable Nix builds in Travis.CI 2018-06-15 17:00:48 +02:00
Vincent Ambo
a47bd5675f chore: License under GPL 3.0 2018-06-15 17:00:26 +02:00
Vincent Ambo
e2504a2da9 docs(README): Add usage instructions & other information to README 2018-06-15 16:58:35 +02:00
Vincent Ambo
7258f31d29 feat(build): Add initial Nix build derivation 2018-06-15 16:47:48 +02:00
Vincent Ambo
4ef98fc2ba feat(main): Implement record conversion & flushing to API
This implements the "meat" of the initial version of journaldriver.

Records from journald are converted into the representation required
by Stackdriver and forwarded to the API.

In this initial version journaldriver is only supported on instances
running on GCP.
2018-06-15 16:45:17 +02:00
Vincent Ambo
b1d45f5b76 refactor(emacs): Use unstable channel directly in emacs module
Stores the unstable channel in the global package set to make it
available in the emacs module.

All emacs-related packages are now taken from the unstable channel.

Related changes:

* prescient is now built directly from git
* sly has been (temporarily) removed because the MELPA recipe is
  failing

Unfortunately the version bumps to prescient and ivy (& its related
packages) don't seem to help with raxod502/prescient.el#10
2018-06-15 13:56:47 +02:00
Vincent Ambo
24314a61d6 chore(packages): Remove unused Haskell packages 2018-06-15 13:55:27 +02:00
Vincent Ambo
2bc9d09eb7 chore(packages): Bump channel versions
emacs 26 is now included in unstable, so the extra pin has been
removed.
2018-06-15 13:54:51 +02:00
Vincent Ambo
e743ea28c5 feat(look-and-feel): Display EXWM workspace index in mode-line
Been waiting to do this since forever!
2018-06-15 01:32:34 +02:00
Vincent Ambo
9da4606162 style(look-and-feel): Use more compact battery display layout 2018-06-15 01:32:15 +02:00
Vincent Ambo
454cb9e506 feat(look-and-feel): Display unread mail telephone line segment
Defines a new highlight face and configures the telephone line
segments to display the unread count if there are unread mails.
2018-06-15 01:15:13 +02:00
Vincent Ambo
e543ddff2e style(look-and-feel): Use tan-shaped separators for telephone-line 2018-06-15 01:15:13 +02:00
Vincent Ambo
59aa338932 feat(mail): Implement unread count telephone-line segment
Implements a periodically updated telephone-line segment that displays
the current unread count for the two most important inboxes in the
mode-line, if there are unread mails.
2018-06-15 01:15:13 +02:00