Commit Graph

3289 Commits

Author SHA1 Message Date
Nick Mathewson 9fa93f961b Merge remote-tracking branch 'origin/mr/491' 2022-05-06 10:21:25 -04:00
Nick Mathewson 16eeb16b4c Clear semver_status now that 0.3.0 is coming out. 2022-05-06 10:08:08 -04:00
Nick Mathewson 7b93091f57 Bump the version of every* crate to 0.3.0
* Except for safelog and fs-mistrust, which are new.
2022-05-06 10:03:15 -04:00
Nick Mathewson 89b38b16c7 Change safelog version to 0.1.0.
(This is okay because we haven't published it yet, or any crate that
uses it.)
2022-05-06 09:59:13 -04:00
eta 3aca6a1915 CHANGELOG.md: resolve minor typos 2022-05-06 14:55:20 +01:00
Nick Mathewson 9447e69355 Update README.md files (automated). 2022-05-06 09:51:11 -04:00
Nick Mathewson 59cd3b8a53 CHANGELOG.md: light reformatting. 2022-05-06 09:42:23 -04:00
Nick Mathewson c763ef6743 Finish the CHANGELOG.md for 0.3.0 2022-05-06 09:41:37 -04:00
Nick Mathewson 013bb26040 Merge branch 'derive-builder-fork' into 'main'
Switch to derive_builder_arti_fork

Closes #446

See merge request tpo/core/arti!490
2022-05-06 13:07:51 +00:00
Ian Jackson 030289481f Switch to derive_builder_arti_fork
For reference, the git source for this crate (and the others in its
workspace) currently lives in my personal github account (ijackson).
If this fork turns out to be long-lived and gains features and/or
users, it would be good to move it to a gitlab somewhere.

I have granted Nick crate ownership on the crates.io system.
2022-05-06 13:36:40 +01:00
Nick Mathewson c302a29169 Merge branch 'safelogging' into 'main'
Implement a safe-logging facility.

Closes #189

See merge request tpo/core/arti!485
2022-05-06 12:06:43 +00:00
eta 373934efbf Punctuation fix. 2022-05-06 07:38:16 -04:00
Nick Mathewson b879125668 Disable safe-logging when logging to console. 2022-05-06 07:38:16 -04:00
Nick Mathewson 7e34692a65 arti: add support for safe-logging configuration
Here we add a config option to disable safe logging, and ensure that
safe logging is disabled when we are formatting an error message on
exit (since we assume it's safe to write sensitive info to stderr.)
2022-05-06 07:38:14 -04:00
Nick Mathewson 4679023c39 Apply `sensitive` in some info-level log messages.
This specifically applies the `sensitive` wrapper in the places
where we're logging target addresses at level "info" or higher.
2022-05-06 07:36:50 -04:00
Nick Mathewson 7aacc6e30c Implement a safe-logging facility.
This is a rough first-cut of an API that I think might help us with
keeping limited categories of sensitive information out of our logs.
I'll refine it based on experiences with using it.
2022-05-06 07:36:48 -04:00
trinity-1686a 98de5cff3c only deploy pages on main 2022-05-05 22:21:09 +02:00
trinity-1686a 3464cae490 use true instead of /bin/true
see https://gitlab.torproject.org/tpo/core/arti/-/issues/400#note_2800763
2022-05-05 21:05:42 +02:00
trinity-1686a 9ed5983c76 add schedulable job to generate aggregated coverage 2022-05-05 21:05:42 +02:00
trinity-1686a 5bd38ab6dc generate aggregated coverage reports 2022-05-05 18:35:34 +02:00
eta de2b23642d Merge branch 'typos-20220504' into 'main'
Fix typos (using the typos-cli tool).

See merge request tpo/core/arti!486
2022-05-05 15:55:22 +00:00
Nick Mathewson 62d159e3c4 Derive Clone and Debug for CheckedDir. 2022-05-05 09:47:13 -04:00
Nick Mathewson b9c54af707 gitlab-ci: Disable fs mistrust in integration test
The environment where the test runner does its thing seems to want
to run as root with umask 000, which naturally makes the fs
permissions checks freak out.
2022-05-05 09:47:13 -04:00
Nick Mathewson 5b9d71f708 Merge branch 'config-serde' into 'main'
Make config builders, not validated structs, [de]serialize

See merge request tpo/core/arti!487
2022-05-05 13:15:10 +00:00
trinity-1686a ee9730cab4 chutney test stop network when arti died or did not start 2022-05-05 13:12:30 +02:00
Ian Jackson acf38505ee semver notes: Fix a missing paren 2022-05-05 10:35:52 +01:00
Ian Jackson 31ce7f4bc0 semver note about serde attribute changes 2022-05-05 10:35:52 +01:00
Ian Jackson d47e94b459 config derive attrs: Make builders serde, and validated structs not
* Builders additionally derive: Debug, Serialize, Deserialize.

 * Validated structs no longer derive: Serialize, Deserialize
   and all related attributes deleted.

 * As a consequence, all the `#[serde(deny_unknown_fields)]`
   are gone.  That means that right now unknown fields are totally
   ignored.  This is good for compatibility but poor for useability.
   Doing something better here is arti#417, in progress.

 * As a consequence, delete tor_dirmgr::retry::default_parallelism.
   (The default value was already duplicated into a builder attr.)
2022-05-05 10:35:52 +01:00
Ian Jackson 6a39f9d8da serde attributes: A tiny bit of reordering
Having a consistent order will make the nest commit easier to read.
2022-05-05 10:19:29 +01:00
Ian Jackson 2c1282f537 Make LogRotation Serialize
We want to be able to serialise as well as deserialise configurations.
2022-05-05 10:19:29 +01:00
Nick Mathewson 08eba63a99 Start drafting a changelog for 0.3.0 2022-05-04 16:38:59 -04:00
Nick Mathewson fc33fc3efb Fix typos (using the typos-cli tool). 2022-05-04 14:41:50 -04:00
Nick Mathewson 66ee39995d Run "cargo update" in preparation for a release... next week? 2022-05-04 14:17:11 -04:00
Ian Jackson a334f17262 Merge branch 'socket-addr-list-builder' into 'main'
FallbackDir: orports: Introduce and use VecBuilder

See merge request tpo/core/arti!474
2022-05-04 18:13:45 +00:00
Ian Jackson df2813ed55 list_builder: Add some xrefs about macro_rules limitations
Apropos
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/474#note_2800481
2022-05-04 18:35:33 +01:00
Nick Mathewson cb892116dc Fix typo 2022-05-04 17:34:47 +00:00
Nick Mathewson 019b3b9c59 Merge branch 'guard-restriction-list' into 'main'
GuardUsage: restrictions: Use list builder

See merge request tpo/core/arti!475
2022-05-04 16:24:56 +00:00
Ian Jackson 4ad4cae418 FallbackDir: Use VecBuilder for orports
And drop the ad-hoc orport() method.  This brings FallbackDir's
orports field in line with our list builder API.

The general semver note in "configuation" seems to cover most of this.
2022-05-04 17:18:55 +01:00
Ian Jackson cc394ca9b9 FallbackDir: Do orport validation after autogenerated build
This avoids it having to recapitulate defaulting logic.
2022-05-04 17:18:55 +01:00
Ian Jackson 6791758d0b FallbackDir: Do not consider defaulted-empty orport list to be valid 2022-05-04 17:18:55 +01:00
Ian Jackson 4262a440b5 list_builder: Update semver note 2022-05-04 17:18:55 +01:00
Ian Jackson 2487a46ef0 list_builder: Provide VecBuilder
This is for lists of plain types (non-builder types).
2022-05-04 17:18:55 +01:00
Ian Jackson 221fe63430 list_builder: Use Educe to derive Default
This allows us to use this with an item builder type which doesn't
impl Default.  (Obviously this only makes sense for items which aren't
actually builders.)
2022-05-04 17:18:05 +01:00
Ian Jackson 578684f290 list_builder: Make helper capable of handling generics
It is Quite Vexing that we have to use [ ] rather than the < > around
the generics, particularly given that we are also using [ ] to signal
"this is arrayish".

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2022-05-04 17:17:46 +01:00
Ian Jackson 0c001ed60e list_builder: Actually honour attributes
The docs were a lie.  $docs_and_attrs was missing from the expander.

And add a note about how any supplied docs are handled.
2022-05-04 17:16:36 +01:00
Nick Mathewson 1f64613e17 Merge branch 'locked' into 'main'
CI: Check that the lockfile is up to date.

See merge request tpo/core/arti!484
2022-05-04 15:58:19 +00:00
Ian Jackson c84d60910d GuardUsage: restrictions Add semver note 2022-05-04 16:19:09 +01:00
Ian Jackson 015db3d78d GuardUsage: restrictions: Use list builder
Although these do not appear in the config, it does have a builder.
It seems sensible to get rid of this ad-hoc list manipulation site,
and replace it with our standard list builder API.

define_list_builder_helper requires that the builder element type be
Deserialize.  Currently GuardUsageRestriction is a transparent, public
enum, so we aren't really exposing anything.

We could introduce GuardUsageRestrictionBuilder now, but
since it's not in the config and thereofore only in the public API of
the lower crates, we can definitely put that off.
2022-05-04 16:16:38 +01:00
Ian Jackson ab979b0ba6 Merge branch 'list-builder-rework' into 'main'
Replace list builder API and do not expose ThingListBuilder as part of config API

See merge request tpo/core/arti!481
2022-05-04 13:53:38 +00:00
Ian Jackson 875f3e4352 CI: Check that the lockfile is up to date.
For at least one job, run the first cargo run with --locked.  This
will fail if the lockfile needs updating.

I have verified that this correctly detects this situation:
  https://gitlab.torproject.org/Diziet/arti/-/pipelines/37692
failed.  Now I have rebased this branch onto main to get the fix to
Cargo.lock.
2022-05-04 14:31:20 +01:00