79 Commits (ff6e2175d35b67b2e1c3f54bbe1d944f0cef5ff7)

Author SHA1 Message Date
Sayan 956d3beb53
Bump up version, add changelog and update scripts (#159)
* Bump up version, add changelog and update scripts

* Fix actiondoc

* Drop all `since` keys

Since our docs are now well versioned and doesn't read these keys
anymore, we can safely remove them.
3 years ago
Sayan 790558d2c7
Improve reliability, simplicity and recoverability of BGSAVE (#153)
* Create a new file on writing to flock-ed file

This fix is a very important one in two ways. Say we have an user A.
They go ahead and launch skyd. skyd creates a data.bin file. Now A just
deletes the data.bin file for fun. Funny enough, this never causes flock
to error!
Why? Well because the descriptor/handle is still valid and was just
unlinked from the current directory. But this might seem silly since
the user exits with a 'successfully saved notice' only to find that the
file never existed and all of their data was lost. That's bad.
There's a hidden problem in our current approach too, apart from this.
Our writing process begins by truncating the old file and then writing
to it by placing the cursor at 0. Nice, but what if this operation just
crashes. So we lost the current data AND the old data. Not good.

This commit does a better thing: it creates a new temporary file, locks
it before writing and then flushes the current data to the temporary
file. Once that succeeds, it replaces the old data.bin file with the
newly created file.

This solves both the problems mentioned here for us:
1. No more of the silly error
2. If BGSAVE crashes in between, we can be sure that at least the last
data.bin file is in proper shape and not half truncated or so.

This commit further moves the background services into their
own module(s) for easy management.

* Fix CI scripts

Fixes:
1. Our custom runner (drone/.ci.yml) was modified to kill the skyd
process once done since this pipeline is not ephemeral.
2. GHA for some reason ignores any error in the test step and proceeds
to kill the skyd process without erroring. Since GHA runners are
ephemeral, we don't need to do this manually.
3 years ago
Sayan Nandan 8d3d878b81 Build binary before attempting to run it
The background process may or may not complete before the testing begins
3 years ago
Sayan Nandan 34134aa29b Fix using old binary for testing on Windows 3 years ago
Sayan Nandan 53a0082890 Make sure skyd is killed after testing on Windows 3 years ago
Sayan Nandan 6b47279b1b Fix CI script and improve terminal artwork 3 years ago
Sayan Nandan bcca83c7ff Use single thread for all tests 3 years ago
Sayan Nandan 5d617eae84 Start the database server before running the tests 3 years ago
Sayan Nandan 6ab73958f2 Fix release script
We accidentally tried to build linux-gnu (x86_64) on Windows!
3 years ago
Sayan Nandan 3699cc4720
Add support for MUSL x86_64 and fix CI scripts (#145) 3 years ago
Sayan Nandan 63708d58f4 Fix release script 3 years ago
Sayan Nandan 44e88518cf Fix artifact packaging
The upload-release-asset action only supports files and not entire dirs.
I had expected it to zip an item if it were a directory; but I was wrong
This commit zips everything before attempting to upload the artifacts
3 years ago
Sayan Nandan 16a19106cb Fix release script to hardcode artifact names
GHA doesn't support using env for matrix.include vars
3 years ago
Sayan Nandan 99826b8b02
Add release script for 32-bit targets (#138) 3 years ago
Sayan Nandan 379660f14c
Add testing for new Tier 1 targets (#135)
* Add support for new T1 platforms

This commit adds support for the following Tier-1 (T1) platforms:
- i686-unknown-linux-gnu
- i686-pc-windows-msvc

* Fix channel and add explicit target in cargo test

* Use `target add` to add $matrix.rust target

* Use actions-rs/toolchain to install rust

* Install musl-tools to test musl

* Simplify matrix

* Add 32-bit targets and refactor workflow

* Fix build matrix

* Explicitly specify target in cargo test

* Use rustup to install toolchain

* Install 32 bit tools on Linux

* Remove ports in [49000,50000] on Windows
3 years ago
Sayan Nandan a2d98c2bcb
Revert "Create Dependabot config file (#27)" (#134)
This reverts commit c4f00de5b5.
3 years ago
Sayan Nandan f379807365 Disable high port blocking 3 years ago
Sayan Nandan f151927f8a Add crt-static to RUSTFLAGS for Windows 3 years ago
Sayan Nandan 70ca5c143c Enable artifact generation on every commit 3 years ago
Sayan Nandan 32f76e3964
Update usage of `add-path` to use $GITHUB_PATH
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 9543ac3a1e
Use GNU tar instead of BSD tar for macOS caching
The discussion from #115 should explain a few things

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 740ba03ecc
Upgrade deps and remove caching on macOS again
Closes #113 and closes #114

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan a9f3d082b9
Restore caching on macOS runners
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 9df39187d1
Upgrade deps, add changelog entry and bump version
This closes #107, closes #108 and closes #109.

The configuration template was updated to include TLS/SSL and the
corresponding tests were also updated.

It also renames `sdb` to `skyd` for streamlining binary names.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan d7fbf0e10e
Perl setup is no longer required
As per the runner docs Perl is already installed on the runners.
This is why explicit setup is not required.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 859614a84f
Fix release script to use `sky-bench`
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 5392f27fdd
Improve builds and fix release builds (#105)
* Checkout the PR branch if triggered by a PR

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>

* Use `cmd` as the shell on Windows to fix builds

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>

#104 did this for pushes; this will do it for releases.

* Fix Windows release script

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>

* No need to checkout to head.ref for PRs

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan ce46e318f1
Fix Windows builds by defaulting to `cmd` (#104)
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 43779eb08e
And now we're Skytable
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 367ee86aa5
Fix docker image repo link
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan a3398f1d07
Rebrand from TerrabaseDB to Skybase (#90)
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 8736db1034
Code cleanup and added auto-sync with repo mirror
Dependencies were upgraded

A mirror sync badge was added. Also README was revised and workflow badge was fixed.

Signed-off-by: Sayan Nandan nandansayan@outlook.com
4 years ago
Sayan Nandan 052898ee9e
Fix binary build step
Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 357f57250b
Add binary build step for docker image
The binary needs to be built before it can be copied into the container.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan 5391f2a694
Re-enable docker image builds
This commit re-enables docker image builds which was moved to a different CI server in a previous commit.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan c7b4a8396b
Stop using ubuntu image to reduce build times
We were previously using the ubuntu image and then manually installing
rust. From now on, we'll use the rust docker image instead to avoid huge
build times

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan f68b8f26a2
Skip builds on pushes to tags
There's no point of running tests on tags since we only create tags
after the build for the corresponding commit has succeeded.

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan d23c4ee947
Fix issues with the Dockerfile
Using the configuration file has been a bad idea and this is why we're
switching to using command line args.

Also links and docs were updated

Signed-off-by: Sayan Nandan <nandansayan@outlook.com>
4 years ago
Sayan Nandan 3d1dd04b0d
Improved testing to use custom compiler macros
Also, multi-threaded tests were re-enabled
4 years ago
Sayan 8270a5543b
Don't build docker image on PR
There's no point of building docker images when a PR is created, since we rely on the compiler and not docker
4 years ago
Sayan c4f00de5b5
Create Dependabot config file (#27)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
4 years ago
Sayan Nandan 2d04a4f841
Enable build skips on PRs
Iff no source files are changed - skip the compute-intensive build
4 years ago
Sayan 16304cc4f7 Use bash as the default shell in `test-push` 4 years ago
Sayan Nandan 986c5e9784
Don't build docker image if src hasn't changed 4 years ago
Sayan Nandan 2a9fa9ffcf Fix script to skip builds iff md files are changed
In previous commits, we ignored the fact that bools are strings in bash
This caused the workflow to proceed wrongly and this commit fixes that
Also, auto builds for actions docs were added
4 years ago
Sayan Nandan 336115e493
Fix builds on macOS 4 years ago
Sayan Nandan 0468d0d921
Fix environment variables 4 years ago
Sayan d3e37cfa55
Fix CI script 4 years ago
Sayan Nandan 207b5e58d1
Fix push script 4 years ago
Sayan Nandan f5b91fdc18
Fix `test-push` script 4 years ago