770 Commits (f40c1d00e5fb2e4d1dc6582375c806265d7870d0)

Author SHA1 Message Date
Sayan Nandan 750d054144
Don't unnecessarily obtain arc clones 3 years ago
Sayan Nandan 5d9ef41c31
Fix length checks
Also improve panic messages in `dbtest` tests.
3 years ago
Sayan Nandan 4c46ff3c2b
Simplify action error propagation 3 years ago
Sayan Nandan b59243eec1
Fix try_from_slice impl 3 years ago
Sayan Nandan 31d4cbb34d
Enable login and add login tests 3 years ago
Sayan Nandan 2fc77e0393
Use smaller size for random bytes
A sample space of 40 provides enough randomness so that the
likelihood of two tokens being the same is almost entirely
ruled out. And even if they are, it shouldn't be a problem
since they correspond to different accounts, although the
possibility itself is as good as impossible due to the
possible number of permutations being 8.560685103E+94, so
we can safely ignore this "risk".

40 is a sensible balance between what clients have to send
and the level of security we're expecting to provide, than
64 bytes.
3 years ago
Sayan Nandan c8ccfca09b
Implement `AuthProvider` 3 years ago
Sayan Nandan 3a6083b3f1
Add `AuthProvider` definition 3 years ago
Sayan Nandan 7285d63908
Simplify `Once` implementation 3 years ago
Sayan Nandan 6ed994fe19
Add `Once` implementation 3 years ago
Sayan Nandan 53d4c2b529
Use `TcpBackoff` in `SslListener` as well 3 years ago
Sayan Nandan d2e297e367
Use dedicated backoff algorithm for busy loops
Also use `util::exit_error` whenever possible to reduce
duplication.
3 years ago
Sayan Nandan 57f05e9788
Simplify TCP backoff impl 3 years ago
Sayan Nandan 96f817d31e
Simplify `resp` impls
The `RespCode` impl is no longer used, so it was removed.
3 years ago
Sayan e9620d0a8c
Release 0.7.3 (#238)
* Bump version

* Upgrade deps
3 years ago
Sayan Nandan 49fae295d1
Simplify termination signal handling
Yeah, signal handling is not one of the best things to do, and it
definitely is one of the messiest things to do. This commit
simplifies the way we handle "termination signals" which can be
SIGTERM or SIGINT on POSIX-compliant systems or can be Ctrl+C
or Ctrl+Break on Windows systems; whenever we receive any of these,
we'll attempt to terminate the database server.

Now, instead of waiting for multiple futures to complete, we create
a different `TerminationSignal` type that is a `Future`, which on
polling checks whether either of the signals have been received
or closed. We return the poll state for either.
3 years ago
Sayan Nandan ed66e4f291
Decrement threshold on first call 3 years ago
Sayan Nandan 0b87452b97
Listen to SIGTERM while in save-on-termsig retry loop 3 years ago
Sayan Nandan 2d6d776edc
Cleanup code and ensure strong_count of `Corestore` is 1
I suppressed some lints, but all of them will be removed very
soon. (use a TODO finder or something to see what all need to
be removed)
3 years ago
Sayan Nandan 33b0693fcb
Fix infinite loop on save failure during termination 3 years ago
Sayan Nandan 9b296cbf9b
Bump version 3 years ago
Sayan Nandan c961548b01
Upgrade deps and bump version 3 years ago
Sayan Nandan e9369a40ef
Simplify recipes 3 years ago
Sayan Nandan 0b54ea1cb3
Bump up version 3 years ago
Sayan Nandan b52f0d42ca
Fix tests
Also remove certs that were incorrectly added
3 years ago
Sayan Nandan 2340a0239e
Add tests for list's range 3 years ago
Sayan Nandan 4186eda627
Add range to lists 3 years ago
Sayan Nandan 84134ed240
Remove `upgrade` subcommand and log on restore
The `upgrade` subcommand from `skyd` which was removed in 0.7, but was
erroneously accepted in the CLI parameters has been removed. This
was silently ignored.
3 years ago
Sayan Nandan 36b02e9099
Fix backup restoration and simplify `arbiter::run` 3 years ago
Sayan Nandan d550e0d7a7
Expect `noart` in production mode
This might make one think that we are being outrageously strict,
but at the end of the day, it can help investigate crashes
or inspect logs without artwork all over the place.

Following some discussions, the `user` mode was renamed to `dev`
mode.

This commit also upgrades some deps, other than clap which has
deprecated yaml support (we will continue to use 2.x).

Finally, the CHANGELOG was updated.
3 years ago
Sayan Nandan 46c048f855
Fix rlimit check on Windows
Windows (obviously) doesn't have libc's rlimit so simply avoid
any references to it
3 years ago
Sayan Nandan d121fa96fb
Enable config evaluation for prod mode 3 years ago
Sayan Nandan 0d2a143e12
Fix warningstack_fmt test 3 years ago
Sayan Nandan d2d96e745e
Improve maxcon diagnostic 3 years ago
Sayan Nandan 481509d927
Fix rlimit impl for 32-bit 3 years ago
Sayan Nandan 6b54217fb2
Add production-mode setting evaluation 3 years ago
Sayan Nandan 4325cf9065
Add method to check number of open files on unix-based systems 3 years ago
Sayan Nandan 857e05529a
Add CLI config tests and improve diagnostic tests 3 years ago
Sayan Nandan 59a67ba0c5
Add cfg file tests 3 years ago
Sayan Nandan 53218ee98a
Add tests for types that implement `TryFromConfigSource` 3 years ago
Sayan Nandan 647d6ce05c
Add tests for config impl 3 years ago
Sayan Nandan ce7d7bef25
Fix config change checks and error messages 3 years ago
Sayan Nandan 86b9ac3dee
Switch to using new config framework 3 years ago
Sayan Nandan b46a5ac13f
Add method for chaining configuration sets 3 years ago
Sayan Nandan d820ef910d
Add config file impl using new config impl 3 years ago
Sayan Nandan afcd8031c2
Fix missing checks for server.noart and server.maxcon for CLI config 3 years ago
Sayan Nandan a48b3fd423
Rewrite CLI config using new config impl 3 years ago
Sayan Nandan 3861a32c2e
Rewrite `cfgenv` using new config impl 3 years ago
Sayan Nandan d46d73301b
Add config impls for `bgsave`, `snapshot` and `ssl` 3 years ago
Sayan Nandan 09afcd3e74
Add new config impl for server section 3 years ago
Sayan Nandan bd56ee2db5
Add `FeedbackStack`, `ErrorStack` and `WarningStack` 3 years ago
Sayan Nandan 0b1ed6af6e
Add `ErrorStack` definition 3 years ago
Sayan Nandan 85e789a1ee
Upgrade deps 3 years ago
Sayan 2cdabfc43e
Automatically package Debian packages on release (#235)
* Add debian package generation

* Install cargo-deb on `make deb`

* Reload systemd daemon on postinst

* Add auto upload for Debian packages

* Consider using runner.os for simplicity
3 years ago
Sayan Nandan 88a8095f42
Upgrade deps 3 years ago
Sayan Nandan c68d3ea3f4
Upgrade deps
All deps except for `clap` has been upgraded. Due to the removal of
the `args` field in `ArgMatches` in v3, and our dependence on the
field, we cannot upgrade to the latest version.

A PR has been created and once it is merged or a workaround
suggested, we can upgrade. (see clap-rs/clap#3265)
3 years ago
Sayan Nandan 1c16e43d3d
Upgrade deps 3 years ago
Sayan Nandan 7c9058a02e
Upgrade deps 3 years ago
Sayan Nandan 6800b5eb0a
Use native endian for testing
Add changelog
3 years ago
Sayan Nandan 87f260d6b2
Support writing in native endian 3 years ago
Sayan Nandan c0497e4339
Support reading data from a different endian 3 years ago
Sayan Nandan 50eb183f46
Upgrade deps 3 years ago
Sayan Nandan 93d1004c80
Add changelog and switch to using rustc edition 2021 3 years ago
Sayan Nandan 769378f7ce
Fix tests for `whereami` 3 years ago
Sayan Nandan 1deac63fb9
Use typed non-null array for `whereami` 3 years ago
Sayan 76f493753b
Add the `whereami` action (#232)
* Move macros into module

* Add the `whereami` action to identify the current entity

* Show entity group in the skysh prompt

* Add tests and actiondoc for `whereami`

* Add changelog entry

* Upgrade deps
3 years ago
Sayan Nandan ce8b6e2340
Disable caching on ARM64 CI
Caching only adds latency to the entire workflow, so we'll disable
it until GitHub fixes the issue with their caching on IPv6.
3 years ago
Sayan Nandan b63d90fa58
Add benches for skyd::protocol
This was added under the 'nightly' feature gate
3 years ago
Sayan Nandan 9656d7d9f6
Upgrade deps
Also added changelog entry
3 years ago
Sayan Nandan cac9a9225f
Add a sanity test for errors in pipelines 3 years ago
Sayan Nandan 048e79df2c
Fix pipeline impl and add basic pipeline tests
The pipeline impl had a bug which caused a parse error; this happened
because we directly wrote the length as an integer (with the tsymbol)
when we were supposed to only write the integer in its string form
to the stream. This was fixed.

Also, some preliminary tests were added for pipelines.
3 years ago
Sayan Nandan 12db246725
Implement basic pipelines
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 9b132f4351
Upgrade deps
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 2814bdb151
Bump up version to 0.7.1
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 90276e3ead
Upgrade deps
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 18a0f557a0
Merge branch 'config/env' into next 3 years ago
Sayan Nandan 374ba57133
Add support for environment variable configuration
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 2387103c5c
Fix missing check for durations in config
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 468b1460e4
Fix conflict check tests
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan ef652befc9
Add env var `ConfigError` variant and rename ident
The `ParsedConfig` struct was renamed to `ConfigurationSet` because it
is more clear in contexts as parsing can be an ambiguous term in several
places.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 29a154f70e
Add tests for configuration conflict
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan f56610123e
Fix check of host and port values in config file
43bef62a incorrectly dismissed the check for host/port config in the
case of a non-TLS setup. This commit fixes that.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 9a6bf82408
Simplify configuration handling
The previous configuration handling was rather messed up,
which however is something that this commit attempts to
simplify.

The check for configuration conflict was resolved with a far
more feasible approach and the handling of CLI/config file
configuration was also simplified greatly.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 43bef62a9e
Simplify config generation from cfg file
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan 788b3073c0
Remove unnecessary use of `Box`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan b5a0e02091
Move config file de into module
This really helps us reduce the grand clutter we created earlier.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
3 years ago
Sayan Nandan a43e1183b3 Bump up version 3 years ago
Sayan Nandan eb037fcd62 Add basic `env` config module 3 years ago
Sayan Nandan 4dbcce6e04 Upgrade deps 3 years ago
Sayan Nandan f85effc1c0 Fix empty list tests 3 years ago
Sayan Nandan 2ee227a5dc Add `lget last` and `lget first` tests 3 years ago
Sayan Nandan b368db2407 Add methods `FIRST` and `LAST` 3 years ago
Sayan Nandan b9c60b4cc7 Use ptr offsets for accesses to reduce bloat 3 years ago
Sayan Nandan ee78f9b1ce Avoid excessive const inlining
Also removed unnecessary assembly bloat resulting from the generic index
accesses through (unck get)
3 years ago
Sayan Nandan c3d977c703 Simplify `lmod clear` return 3 years ago
Sayan Nandan a41fd7fa7f Fix `lmod` bug resulting in return of wrong rcode 3 years ago
Sayan Nandan c34f241f2e Fix encoding check in list actions 3 years ago
Sayan Nandan c5a58dec3d Fix `is_empty` impl for `AnyArrayIter`
The impl was erroneously checking the base boxed slice for its length
when what we actually needed was the iter len (remainder).
3 years ago
Sayan Nandan e1ee9314f5 Add `is_empty` to `AnyArrayIter` for specificity 3 years ago
Sayan Nandan b34d059cd5 Add `Sync` trait bounds for ease with manual afns 3 years ago