- use tranquil_pds not comms since the validate email and templates are reexported from pds package
- implement handlebars syntax
- update templates to be transport agnostic, email, discord, telegram with handlebar examples with conditions
- refactor template and notice logic from PR #269, and #299 to be self contained enforcing all substitutions to be defined within the enum properties
- fix open TODOs, store.rs uses get_string within the ids.rs get_built_ins method
- UTC logging for User facing notices restored
- new api error for verification channel requires bot
- fix tests to use metadata for html body...
- remove unwrap and handle template rendering error explicitly
- update verify_link to use handlebars trusted url syntax {{{verify_link}}}
- fix verification enqueueing to include channel in template rendering
- use locale enum for validation and display instead of string array separately maintained
- support text only templates for signal and discord
- fix missing verify_link and verify_page in migration and signup verification templates with unit tests
- consolidated body and subject notice methods into a single rendered function
Instead of moving :latest, this adds :main for the intrepid adventurers who wish to live dangerously.
And then we can have :latest track the latest proper release instead.
We were just using them for S3 support. This PR switches us over to the s3 crate which works the same way, with some minor differences.
The main implication of this change is that we're no longer doing all the AWS stuff, like checking aws profile in home directory, or automatic discovery of metadata.
This change is covered by our brand new s3 test suite, but I also did the old school `just test-full` with minio.
Introduces s3s and s3s-fs to run an in-memory s3 server in tests. With this we can promote s3 tests to run in `just test`, they won't need containers, and they're super fast. Adds `just test-s3` to run them more easily.
```
Nextest run ID db9a9530-738e-4c92-ad3a-23289252cac2 with nextest profile: default Starting 6 tests across 1 binary PASS [ 0.356s] tranquil-storage::s3 put_stream_error_aborts_upload PASS [ 0.356s] tranquil-storage::s3 put_stream_empty_aborts_upload PASS [ 0.358s] tranquil-storage::s3 copy PASS [ 0.360s] tranquil-storage::s3 put_get_head_delete PASS [ 0.360s] tranquil-storage::s3 put_stream PASS [ 0.447s] tranquil-storage::s3 put_stream_multipart ──────────── Summary [ 0.448s] 6 tests run: 6 passed, 0 skipped
```
Also optimizes more hashing functions because it matters in tests.
We can make this test only by adding a feature for it and checking, but it didn't seem immediately worth it to me. Ping me if you want me to change it.
Shaves about 15-20% off of a j2 test run, because we spent about 200ms on every one of the 500 tests against the server just initializing the governor clock.
We've got a bunch of tests that never pass because they time out on their own, or that take 10s because they test a 10s timeout, that we can rethink. Together they introduce a lot of slowness.
This puts anything over 10s in CI into test jail.
This removes the old workflows that had not been working for a while and introduces a new microvm based one that does some basic checks and runs the default test suite.
All of the codebase uses ring explicitly or implicitly, but the HTTP client used for S3 requests was using aws-lc instead. This commit removes that extra dependency.
Anecdotally it shaves 10s off a dev build on my machine, but slower machines would benefit more from it.
Many of these don't finish anyway on my computer, I gave up around 40 minutes. But for the ones that did, it's a big speed up! For the others I guess they need more love.
gauntlet-pr: 67.9s with it, 120.9s without
test-store: 508.8s with it, still running at 1313s (I gave up)
test-store-sim-nightly: ran for like 40 minutes each attempt without finishing. I just gave up.
test-store-asan: only linux? but no reason why we can't apply the fix here too
Overall `just test` runs about 10-20s faster on this branch than current main, for me, with around 170s instead of around 180-190s. But the cool thing is the compile time. Making a simple edit to any file involved and running `just test` on main takes about 60s to recompile the test binaries. On this branch it takes less than 15s.
This is done by replacing a ton of separate test binaries with a single megabinary.
Only test files that looked safe have been included, avoiding ones that do stuff like setting env.
Summary [ 166.110s] 1453 tests run: 1453 passed (1 slow), 15 skipped
Above is before this commit, below is after.
Summary [ 140.410s] 1453 tests run: 1453 passed, 15 skipped
The mechanism here is the same as for the metastore tests. By skipping fsync we can run the tests much faster, and fsync doesn't matter in tests. Unless you're testing postgres itself I guess
Replace sleeps with the existing polling function instead. Exposes that the stress test isn't much of a stress test, it probably needs more data or something, but if it's heavy it should maybe not be part of `just test`
`just test` doesn't use docker, but the cleanup was still pruning containers over and over. This switches to only cleaning up containers created by the tests.
test-unit was building a second copy of the code with different features, and then the main test command ran the same tests anyway, so we just built and ran the tests twice
Locally shaves a minute off of a full build+test, on this branch (so both runs include the fsync change etc)
We're at [ 173.444s] overall for `just test` now