1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-14 11:57:30 +00:00
Commit graph

333 commits

Author SHA1 Message Date
Zhaofeng Li
2a6b9c592b .editorconfig: Fix indentation 2024-06-01 13:47:27 -06:00
Zhaofeng Li
4ffeb50f50 Cargo.lock: Update 2024-06-01 13:47:27 -06:00
Zhaofeng Li
a1a521c32f flake.lock: Update crane 2024-06-01 13:47:27 -06:00
Zhaofeng Li
ff3ce2c0b8 attic/build.rs: Fix filename in workaround comment 2024-06-01 13:47:27 -06:00
Zhaofeng Li
6603ee14ed
Merge pull request #134 from srhb/trim-token-file
trim token-file contents
2024-06-01 08:51:22 -06:00
Zhaofeng Li
ec0469cad0
Merge pull request #135 from cole-h/token-use-indexmap
token: switch to using IndexMap for consistent ordering of entries
2024-06-01 08:24:31 -06:00
Zhaofeng Li
0558269391
Merge pull request #137 from cole-h/log-stream-errors
Log stream errors
2024-06-01 08:17:54 -06:00
Zhaofeng Li
3907b31157
Merge pull request #116 from ixmatus/parnell/fix-gc-bug
gc.rs: `LIMIT` number of `orphan_chunks`, fixes #115
2024-06-01 08:13:20 -06:00
Cole Helbling
a4f2cae9dd Log stream errors 2024-05-28 11:32:43 -07:00
Cole Helbling
18dedcc30b token: switch to using IndexMap for consistent ordering of entries
Because of the random ordering of HashMap, if you have
overlapping token permissions, it is possible to randomly pick
one that leads to some operation working intermittently (see
https://github.com/zhaofengli/attic/issues/133 for an example of this).

By using an IndexMap instead, we make "iteration order of the key-value
pairs [...] independent of the hash values of the keys" (from the
indexmap crate docs [1]), which leads to more predictable behavior.

[1]: https://docs.rs/indexmap/latest/indexmap/
2024-05-25 11:26:40 -07:00
Cole Helbling
f18f581188 token: test that permissions iteration order is consistent 2024-05-25 11:26:40 -07:00
Sarah Brofeldt
a2a2011b5f trim token-file contents
Any ordinary file will contain at least a trailing newline which cannot
be included in the bearer header. Trim all leading/trailing whitespace.
2024-05-15 08:17:59 +02:00
Zhaofeng Li
4dbdbee457
Merge pull request #123 from winterqt/fix-build-on-newer-nix
Fix build on Nix 2.19+
2024-03-29 14:01:00 -06:00
Winter
657db64e51 Fix build on Nix 2.19+
Nix 2.19 introduced a change [0] that broke how we compile our libnixstore
bindings, which requires adding an additional include directory when
we compile them.

[0]: b461cac21a
2024-03-29 11:59:20 -06:00
Winter
8e64f8ba45 Revert "Fix build on Darwin"
This reverts commit bdafd64910, as this
workaround is no longer required on newer Nixpkgs.
2024-03-27 17:20:19 -04:00
Winter
60db437df0 Update nixpkgs 2024-03-27 17:20:19 -04:00
Parnell Springmeyer
d3ffcf885c
Choose a more sensible limit for MySQL, suggested by @baloo 2024-02-28 14:06:31 -08:00
Parnell Springmeyer
2705d1d90b
Limit the chunk finding query, not the GC mark query 2024-02-28 12:53:27 -08:00
Parnell Springmeyer
47f17e0900
gc.rs: LIMIT number of orphan_chunk_ids; fixes #115 2024-02-28 10:37:36 -08:00
Cole Helbling
c943b5230f fixup: missing field 2024-02-26 11:48:26 -08:00
Cole Helbling
41b42b62d5 Merge remote-tracking branch 'upstream/main' into rs256-support 2024-02-26 11:45:09 -08:00
Cole Helbling
756fef8d5f Support pubkey-only JWT configuration 2024-02-26 11:44:04 -08:00
Zhaofeng Li
6eabc3f02f
Merge pull request #111 from jsoo1/restart-atticd-on-failure
nixos: restart atticd on failure
2024-02-14 07:47:33 -07:00
John Soo
8f5e3c1035
nixos: restart atticd on failure 2024-02-08 11:39:38 -07:00
Zhaofeng Li
fbe252a5c2
Merge pull request #105 from JRMurr/fix-lint
Remove un-used import
2024-01-18 15:31:32 -07:00
Zhaofeng Li
a7c878bffc
Merge pull request #49 from icewind1991/module-readwritepaths
nixos: add storage path to ReadWritePaths
2024-01-18 15:30:49 -07:00
John Murray
857c71671c
fix lint 2024-01-14 15:32:42 -05:00
Robin Appelman
c98be70263 nixos: Add non-default storage path to ReadWritePaths
This prevents "read-only storage" errors when setting a non-default
local storage path. The non-default path must exist beforehand.

Co-authored-by: Zhaofeng Li <hello@zhaofeng.li>
2024-01-13 14:23:32 -07:00
Zhaofeng Li
e6bedf1869 flake.nix: Remove non-existent overrides 2024-01-01 18:34:19 -07:00
Zhaofeng Li
52f956a864
Merge pull request #60 from cole-h/docker-db-migrations-first
docker: default to monolithic mode
2024-01-01 18:28:05 -07:00
Zhaofeng Li
8c8d9d9006
Merge pull request #74 from lheckemann/nixos-module-mode
nixos: allow setting mode
2024-01-01 18:25:12 -07:00
Zhaofeng Li
40b869ba2c
Merge pull request #51 from icewind1991/token-file
client: allow storing the client token in a separate file
2024-01-01 16:04:56 -07:00
Zhaofeng Li
9a9e2c0ce1
Merge pull request #98 from Mic92/sharding
implement sharding
2024-01-01 09:17:18 -07:00
Zhaofeng Li
bdafd64910 Fix build on Darwin
Working around https://github.com/NixOS/nixpkgs/issues/166205
2023-12-19 00:04:32 -07:00
Zhaofeng Li
b6f0503a92 flake.lock: Update crane 2023-12-19 00:04:32 -07:00
Zhaofeng Li
75c0482e85 integration-tests/basic: Fix Postgres permissions
See also https://github.com/NixOS/nixpkgs/pull/266270.
2023-12-18 14:50:33 -07:00
Zhaofeng Li
e7a5828192 flake: Update deps 2023-12-18 14:50:33 -07:00
Zhaofeng Li
a8cacb0057 .github: Update workflow deps 2023-12-18 14:50:33 -07:00
Zhaofeng Li
b12e485ef7 flake.nix: Add riscv64-linux 2023-12-18 14:50:33 -07:00
Zhaofeng Li
7b133bca83 server: Upgrade sea-orm to 0.12.10
Co-authored-by: Francesco Gazzetta <fgaz@fgaz.me>
2023-12-18 09:28:58 -07:00
Zhaofeng Li
4945d00e20 Cargo.lock: Update
Co-authored-by: Francesco Gazzetta <fgaz@fgaz.me>
2023-12-18 09:28:54 -07:00
Zhaofeng Li
ab4040a267 Trivial semver-incompatible upgrades
Co-authored-by: Francesco Gazzetta <fgaz@fgaz.me>
2023-12-18 09:28:43 -07:00
Zhaofeng Li
9c79f6f5cb server: Upgrade aws-sdk-rust
Co-authored-by: Francesco Gazzetta <fgaz@fgaz.me>
2023-12-18 09:28:43 -07:00
Cole Helbling
fdb9d06ff6 Cargo.toml: set resolver = 2
There are some 2021-edition crates that Cargo was warning about.
2023-12-18 09:28:43 -07:00
Cole Helbling
26234c294a cargo fmt 2023-12-18 09:28:43 -07:00
Zhaofeng Li
51d5121a5c integration-tests/basic: Dump schema after test
Not doing anything with the dumped schema yet, but we will
have automated checks to ensure the schema isn't changed
in an incompatible way.
2023-12-18 09:28:43 -07:00
Cole Helbling
0a9d4938ef Move back to jwt_simple
This effectively reverts commit 3e0b65a4c3.

Because jwt_simple doesn't have a unified type / trait that allows
signature and verification, I had to add a SignatureType enum to
approximate that.
2023-11-12 12:19:22 -08:00
Cole Helbling
32e6d858fa server: fixup oobe random secret generation 2023-11-12 11:19:34 -08:00
Cole Helbling
d0c726dc22 book: update nixos config example 2023-11-12 11:19:34 -08:00
Cole Helbling
bd30211ac5 attic-token: use Not trait instead of is_false function for skipping serializing false permissions 2023-11-12 11:19:34 -08:00