Commit graph

1176 commits

Author SHA1 Message Date
Graham Christensen 3bc29be475
labeling: make log messages one-line 2020-04-06 10:52:32 -04:00
Graham Christensen 8e6f78607b
Merge pull request #453 from NixOS/handle-errs-better
Handle errs better
2020-04-06 07:20:57 -04:00
Graham Christensen a1e8dcc1e5
evaluate: handle evaluation errors, and posting errors while posting eval errors better 2020-04-06 07:05:56 -04:00
Graham Christensen 00478e9dee
update_status: also return a CommitStatusError 2020-04-06 07:02:49 -04:00
Graham Christensen f02c7382cc
commitstatus: distinguish internal and external error factors 2020-04-06 07:02:45 -04:00
Graham Christensen 2541d183bf
Merge pull request #452 from cole-h/logging
Logging cleanup
2020-04-06 06:00:48 -04:00
Cole Helbling c9d4bb1fd8
bin/*: replace {e,}println!s with log macros
May as well be consistent.
2020-04-05 23:52:21 -07:00
Cole Helbling 1b8cec63f2
treewide: replace {e,}println!s with log macros
Currently, our logs are a bit inconsistent, with some being
`{e,}println!`s and others utilizing macros from the `log` crate. One
line might look like `INFO:ofborg::tasks::evaluate: Removing labels:
[]`, while the next might look like `Already: []`.
2020-04-05 23:52:21 -07:00
Cole Helbling 5c1a85ca31
treewide: replace {:#?} with {:?}
Cleans up logging output so that things that belong together stay
together.
2020-04-05 12:32:19 -07:00
Graham Christensen e26497e49d
Merge pull request #451 from LnL7/eval-no-nixpkgs
rename nixpkgs entry in NIX_PATH
2020-04-05 15:06:55 -04:00
Daiderd Jordan f6c22bfc4f
rename nixpkgs entry in NIX_PATH
This ensures the local sources are still allowed in restricted mode, but
referencing <nixpkgs> in expressions inside nixpkgs is not.
2020-04-05 20:09:34 +02:00
Graham Christensen b55535a608
Merge pull request #450 from cole-h/silence-diffs
checkout: silence diffs when checking validity of a commit
2020-04-05 13:27:30 -04:00
Cole Helbling a907ffb488
checkout: silence diffs when checking validity of a commit
Otherwise, when people submit treewide PRs to nixpkgs, the logs get
cluttered with thousands of useless diffs.
2020-04-05 09:44:19 -07:00
Graham Christensen 91f6aee4d5
Merge pull request #449 from cole-h/ignore-remove-file
nixenv: warn when removing the stats file fails
2020-04-03 20:45:55 -04:00
Cole Helbling 9736cf08fe
nixenv: remove unnecessary single quotes
The debug representation of a `PathBuf` provides double quotes already.
2020-04-03 17:37:21 -07:00
Cole Helbling 42b4bb2118
nixenv: warn when removing the stats file fails
If the `nix` invocation fails, a stats file won't get created. We log a
warning, but it is generally safe to ignore this failure.
2020-04-03 17:25:58 -07:00
Graham Christensen 0db6f70714
Merge pull request #448 from cole-h/bump
Bump hubcaps
2020-04-03 19:55:28 -04:00
Cole Helbling 2649658fe8
Bump hubcaps
New hubcaps update makes `created_at` and `updated_at` fields optional,
because sometimes they just aren't there.
2020-04-03 16:39:52 -07:00
Graham Christensen 85988113aa
Merge pull request #447 from cole-h/nix-env-describe
nixenv: describe what went wrong when io fails
2020-04-03 14:07:14 -04:00
Cole Helbling 9dc0fd123a
match -> map_err 2020-04-03 10:51:02 -07:00
Cole Helbling 2b2b675011
nixenv: describe what went wrong when io fails
Instead of just propagating a raw `std::io::Error`, wrap that in our own
`Error` enum to provide more context for what actually went wrong.
2020-04-03 10:34:01 -07:00
Graham Christensen f9086a62ec
upgrade hubcaps for nullable target URLs 2020-04-02 11:37:23 -04:00
Graham Christensen fa5d6425fe
Build release=false 2020-04-02 10:27:07 -04:00
Graham Christensen d4d4da9eee
Debug a bit more status errors 2020-04-02 09:31:10 -04:00
Graham Christensen 1c1ccc8c7e
Provide some debug info for if posting a status update fails 2020-04-02 09:12:40 -04:00
Graham Christensen 9548a495d5
Merge pull request #395 from ryantm/leaf
add label for exactly 1 rebuild
2020-04-01 20:44:25 -04:00
Graham Christensen bb7ca7e6ea
Merge pull request #433 from fgaz/move-fgaz-to-trusted-users
Move fgaz to trusted users
2020-04-01 20:43:43 -04:00
Graham Christensen c5239bcc2f
Merge pull request #424 from nh2/patch-1
config.public.json: add nh2 to trusted_users
2020-04-01 20:43:23 -04:00
Graham Christensen ba020b6383
Merge pull request #430 from worldofpeace/tag-cinnamon
Tag cinnamon pkgs
2020-04-01 20:42:30 -04:00
Graham Christensen 1a9267c876
Merge pull request #428 from ryantm/typofix
make check_outpaths error message after merging grammatical
2020-04-01 20:41:32 -04:00
Graham Christensen 87bf9b66fe
Merge pull request #435 from bhipple/nitpick/readme
Cleanup whitespace in markdown table
2020-04-01 20:41:04 -04:00
Graham Christensen 9d8c4d9da1
Merge pull request #438 from Infinisil/lib-tests
Add check for lib tests
2020-04-01 20:40:14 -04:00
Graham Christensen 4093eaeeee
Merge pull request #410 from Ekleog/run-passhtru-tests
nixpkgs-rs: build .passthru.tests too
2020-04-01 20:37:03 -04:00
Graham Christensen 7be15ba6d1
Merge pull request #444 from cole-h/2018
2018-ification
2020-04-01 07:56:46 -04:00
Cole Helbling a87225519e
Silence cargo pedantry 2020-03-31 20:37:30 -07:00
Cole Helbling c37b652882
2018-ify carnix
Ran `nix-shell -p carnix --run ./nix/update-carnix.sh`.
2020-03-31 20:23:25 -07:00
Cole Helbling cbe2e62162
More 2018-ification and minor formatting changes
2018-ification changes include:
* replacing `extern crate` imports (except for ones annotated with
`#[macro_use]` to prevent touching more files; maybe in a follow-up)
* removing standalone imports; for example, `use serde_json;` -- the
code already uses `serde_json::*` where necessary

Minor formatting changes include:
* collapsing imports from the same root (e.g. `use std::io::Read; use
std::io::BufRead` -> `use std::io::{BufRead, Read};`
* separating `crate` imports from external imports from `std` imports --
this is how many project seem to order their imports, most notably the
official Rust repo
* moving some `use`s from the first line to below the file's doc comment
* changing file-level doc comments from `///` to `//!` (so they actually
show up as documentation)
* `rustfmt` messing with the `nom` macros in `src/commentparser.rs`

Most of the 2018-ification was done by `cargo fix --edition-idioms`, but
all changes were manually inspected to catch any detrimental changes,
and `cargo test`/`cargo check` still succeed.
2020-03-31 19:54:19 -07:00
Daiderd Jordan c7978aca74
fix incompatibilities with edition 2018 module changes
With this we could add `edition = "2018"` to enable new features like
async/await.
2020-03-31 19:29:41 -07:00
Graham Christensen c2ea19fe47
nixenv: unwrap the statsfile read later, after checking the return status 2020-03-31 19:42:07 -04:00
Graham Christensen 90fda07cf2
commitstatus: handle errors intsead of expecting them (mostly) 2020-03-31 19:05:18 -04:00
Graham Christensen 750bc88e5f
commitstatus: error: make debug 2020-03-31 19:04:38 -04:00
Graham Christensen 85649b0c79
Revert "Revert "commitstatus: return an error if we fail to set a status""
This reverts commit cf28b411f2.
2020-03-31 18:46:34 -04:00
Graham Christensen a8eb1743b0
evaluation: use ? to handle errors 2020-03-31 18:45:19 -04:00
Graham Christensen 0b936ea1cc
task/evaluate: move evaluation to its own class 2020-03-31 18:02:30 -04:00
Graham Christensen be7bc06238
Revert "evaluate: start to use error returns"
This reverts commit 9f383f4954.
2020-03-31 17:44:03 -04:00
Graham Christensen 9f383f4954
evaluate: start to use error returns 2020-03-31 17:43:55 -04:00
Graham Christensen 39af0ae208
evaluate task: move evaluation leg work in to another function, and just call it from the consumer implementation 2020-03-31 17:26:15 -04:00
Graham Christensen ea2f7cf474
commitstatus: fixup formatting 2020-03-31 17:25:53 -04:00
Graham Christensen cf28b411f2
Revert "commitstatus: return an error if we fail to set a status"
This reverts commit 0ae112f976.
2020-03-31 17:23:23 -04:00
Graham Christensen 0ae112f976
commitstatus: return an error if we fail to set a status 2020-03-31 17:23:20 -04:00