1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
Commit Graph

90 Commits

Author SHA1 Message Date
Rick Winfrey
2ff5d92d01 Alignment 2017-03-28 09:44:19 -07:00
Rick Winfrey
5aebd2006a Rework loading of env vars 2017-03-28 09:41:16 -07:00
Rick Winfrey
1399166ed0 Print IO exception to stderr
- Printing to stdout will cause JSON parsing issues on the dotcom side
2017-03-27 15:27:03 -07:00
Rick Winfrey
3d20fe58a3 Update comment formatting 2017-03-27 14:16:08 -07:00
Rick Winfrey
f935e1542f Use BangPatterns 2017-03-27 14:15:58 -07:00
Rick Winfrey
12616f961c Print IO exceptions rather than swallow them 2017-03-27 14:13:21 -07:00
Rick Winfrey
cc0288f431 Inline error handling for getCurrentDirectory 2017-03-27 14:13:01 -07:00
Rick Winfrey
862c335213 snake_case -> camelCase 2017-03-27 10:21:28 -07:00
Rick Winfrey
e801ac3f07 Use void for safeGitmonIO 2017-03-27 10:11:30 -07:00
Rick Winfrey
7258550221 🔥 Data.Text pack 2017-03-27 10:11:09 -07:00
Rick Winfrey
397d061ff9 Use Data.Char.toLower 2017-03-24 13:14:54 -07:00
Rick Winfrey
9263008b15 Rename socket' -> sock; use void 2017-03-24 11:29:38 -07:00
Rick Winfrey
69e791c4a1 🔥 disabling of unused do bind 2017-03-24 11:29:19 -07:00
Rick Winfrey
fa206dc250 🔥 note about BangPatterns 2017-03-24 11:29:02 -07:00
Rick Winfrey
3b8553f912 Trying to surface error 2017-03-23 17:05:57 -07:00
Rick Winfrey
1604f6ca34 Add back strictness 2017-03-23 16:50:34 -07:00
Rick Winfrey
9fe095474f Strictness not required 2017-03-23 16:39:06 -07:00
Rick Winfrey
f60f90045d Remove "\n" 2017-03-23 16:12:11 -07:00
Rick Winfrey
c6300449df This is equivalent to Ruby regex \A and \Z for treating start of line and end of line the start of input and end of input, and ignores newlines 2017-03-23 11:32:49 -07:00
Rick Winfrey
95e751f0e0 🔥 whitespace 2017-03-23 09:38:36 -07:00
Rick Winfrey
37e6929d3b Use safeGitmonIO for connecting to Unix socket 2017-03-23 09:26:54 -07:00
Rick Winfrey
a176dda44a combine safeIO and timeout functionality into a single function 2017-03-22 17:23:36 -07:00
Rick Winfrey
58ce25aa30 Send CPU time in milliseconds, not nanoseconds 2017-03-22 17:23:02 -07:00
Rick Winfrey
bcdf17e0ab Restrict communication with Gitmon to a single socket connection
- Gitmon perceives a socket closing as EOF in the database, and
terminates the record created with the `update` command. This means
that when the `finish` command is issued, the Gitmon database attempts
to insert the process stats as a new record in the Gitmon db.
2017-03-22 17:22:41 -07:00
Rick Winfrey
5ddc4f7074 Manually specify JSON structure (to avoid inclusion of tag) 2017-03-21 14:51:23 -07:00
Rick Winfrey
4207e5f901 Rework the way we read a userID or repoID from the environment
- TIL : mkRegexWithOpts documentation is misleading. The first boolean
option is described as enforcing beginning of line (`^`) and end of
line (`$`) matching, along with not matching newline characters with
`.`. From my testing, I discovered this is not true, and in order to
enforce that regex behavior, I needed to explicitly add `^…$` to my
regex. Because the `mkRegexWithOpts` function was no longer doing what
I wanted, I opted for the simpler `mkRegex` function.

- readInt now returns a `Maybe Int` and expects a single `Just [s]`
match  supplied to attempt reading. This function is not general
purpose enough to be safe to use elsewhere, but is safe to use within
the context of `readIntFromEnv` because of the way the regex enforces
matches.
2017-03-21 10:39:14 -07:00
Rick Winfrey
7d48f6b8ad Convert to nano secs once 2017-03-20 18:13:11 -07:00
Rick Winfrey
c902c7f393 Send userID and repoID with schedule Gitmon request 2017-03-20 18:12:59 -07:00
Rick Winfrey
b28b8faa05 Add readIntFromEnv function
- Allows us to read the Integer value for user_id and repo_id set in
the env when they are prefixed with `uint:`
2017-03-20 18:12:13 -07:00
Rick Winfrey
8737cd0fcc Add repoID and userID to ProcessUpdateData 2017-03-20 18:10:22 -07:00
Rick Winfrey
d0c6a219e6 🔥 error 2017-03-10 15:30:43 -08:00
Rick Winfrey
10af2e4715 Add 📝 use of BangPatterns 2017-03-09 13:52:30 -08:00
Rick Winfrey
7799f3f5ee Wrap sending of process stats to gitmon with timeout
- In the event sending to the socket blocks we can timeout the
operation.
2017-03-08 11:36:44 -08:00
Rick Winfrey
0192162adb Wrap connecting to socket with timeout 2017-03-08 11:35:06 -08:00
Rick Winfrey
6dc35dc455 Update gitmon fail status spec 2017-03-08 11:10:57 -08:00
Rick Winfrey
c4dd79717f Add withGitmonStatus 2017-03-08 10:49:44 -08:00
Rick Winfrey
5df5581507 Add GitmonException 2017-03-08 10:30:32 -08:00
Rick Winfrey
dd7fb995f1 Add safeGetCurrentDirectory
- If an exception is thrown performing the `getCurrentDirectory` IO
action, this defaults to an “” String value
2017-03-08 10:19:52 -08:00
Rick Winfrey
165dfcae04 Merge branch 'gitmon-support' into gitmon-support-with-socket 2017-03-07 10:36:43 -08:00
Rick Winfrey
bf2ed8a32a Remove user_id 2017-03-07 10:33:18 -08:00
Timothy Clem
bf48e443f4 Swap over to new reportGitmon and update tests to match 2017-03-07 08:46:44 -08:00
Timothy Clem
9959025d3b Use RankNType to implement socket factory 2017-03-06 14:19:48 -08:00
Timothy Clem
23a5374f4a Use a withSocket approach 2017-03-06 13:51:38 -08:00
Rick Winfrey
87014ed03a We don't need to track repo id 2017-03-06 11:09:24 -08:00
Timothy Clem
ef6ba4b673 Formatting 2017-03-02 14:08:16 -08:00
Timothy Clem
55faa92182 Quote message received from Gitmon 2017-03-02 14:01:13 -08:00
Timothy Clem
5c437cd253 Report specific message from gitmon 2017-03-02 13:59:13 -08:00
Timothy Clem
695afb494d Formatting and remove commented out code 2017-03-02 13:58:57 -08:00
Timothy Clem
443b4de54a Just some formatting 2017-03-02 13:35:51 -08:00
Timothy Clem
a676885ff0 Continue gitCommand if gitmon takes more than 1 sec to respond 2017-03-02 13:30:35 -08:00