Stargazer is a flexible vtuber tracker, reborn

Overview

Stargazer

Stargazer is a flexible vtuber tracker, reborn.

It's the second attempt to rewrite pystargazer. The first attempt is stargazer-rs, of which the development has been stalled for a while.

This new version attempts to utilize a more modern microservice architecture, and is meant to be stable and simple to develop and deploy.

License

This project is licensed under MIT License - see the LICENSE file for details.

Comments
  • Several refactors and fixes in core

    Several refactors and fixes in core

    When implementing middlewares, I've found several design flaws and bugs in core. To fix them, I must introduce some breaking changes.

    Models

    1. Event::from_serializable now accepts unit type as fields input.
    2. New method Event::from_serializable_with_id accepts id, kind, entity and fields to create an Event. It's merely for test code.

    MQ

    1. MessageQueue is extracted out as a trait. The original implementation is now called RabbitMQ.
    2. A new type Middlewares is added. It represents a chain of middlewares.
    3. A new method consume is added to MessageQueue. It accepts an optional string to filter related events. Returns a stream of (Middlewares, Event), in which Middlewares is the preceding middleware chain (self excluded).
    4. RabbitMQ implementation was once connected to exchange events rather than stargazer-reborn, and it was hard-coded. Now its constructor accepts an exchange name to connect to.
    5. There's a new mock MessageQueue implementation for tests.
    6. Tests are added against MessageQueue. There are currently two properties that must hold for an implementation:
      • messages must be received in the same order as they were sent
      • only messages intended for this middleware are consumed
    opened by PhotonQuantum 8
  • MongoDB cannot deserialize `Entity` correctly

    MongoDB cannot deserialize `Entity` correctly

    Minimum reproducible case

    #[tokio::test]
    async fn test_fetch_entity_from_db() {
        let client = Client::with_uri_str("...")
            .await
            .unwrap();
        let db = client.database("...");
        let col = db.collection::<Entity>("...");
    
        col
            .find_one(doc! { "meta.name.name": { "$gt": {} } }, None)
            .await
            .unwrap();
    }
    

    Error

    thread 'server::context::test_fetch_entity_from_db' panicked at 'called `Result::unwrap()` on an `Err` value: Error { kind: BsonDeserialization(DeserializationError { message: "invalid type: string \"en\", expected enum LanguageCode" }), labels: {}, wire_version: None }'
    

    When meta.name.name is empty, this can be deserialized correctly.

    In DB

    Data in db:

    > db.entities.find({ "meta.name.name": { $gt: {} } }).pretty()
    {
    	"_id" : ObjectId("623fa43e3e7438502c11c416"),
    	"id" : UUID("b40c53a7-742a-4493-9bcf-b6231143666d"),
    	"meta" : {
    		"name" : {
    			"name" : {
    				"en" : "Test"
    			},
    			"default_language" : "en"
    		},
    		"group" : null
    	},
    	"tasks" : [
    		UUID("1f715edb-1cf0-4c4b-9d94-03787eecf92b")
    	]
    }
    
    bug 
    opened by George-Miao 8
  • chore(deps): bump axum from 0.5.6 to 0.5.10

    chore(deps): bump axum from 0.5.6 to 0.5.10

    Bumps axum from 0.5.6 to 0.5.10.

    Release notes

    Sourced from axum's releases.

    axum - v0.5.10

    • fixed: Make Router cheaper to clone (#1123)
    • fixed: Fix possible panic when doing trailing slash redirect (#1124)

    #1123: tokio-rs/axum#1123 #1124: tokio-rs/axum#1124

    axum - v0.5.9

    • fixed: Fix compile error when the headers is enabled and the form feature is disabled (#1107)

    #1107: tokio-rs/axum#1107

    axum - v0.5.8

    • added: Support resolving host name via Forwarded header in Host extractor (#1078)
    • added: Implement IntoResponse for Form (#1095)
    • change: axum's MSRV is now 1.56 (#1098)

    #1078: tokio-rs/axum#1078 #1095: tokio-rs/axum#1095 #1098: tokio-rs/axum#1098

    axum - v0.5.7

    • added: Implement Default for Extension (#1043)
    • fixed: Support deserializing Vec<(String, String)> in extract::Path<_> to get vector of key/value pairs (#1059)
    • added: Add extract::ws::close_code which contains constants for close codes (#1067)
    • fixed: Use impl IntoResponse less in docs (#1049)

    #1043: tokio-rs/axum#1043 #1049: tokio-rs/axum#1049 #1059: tokio-rs/axum#1059 #1067: tokio-rs/axum#1067

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @PhotonQuantum.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 6
  • Authentication

    Authentication

    Background

    There are three centralized component in this system: api, mq, coordinator. We need to add an authentication mechanism to ensure no unauthorized entity may access the resources.

    Design

    Each client must provide a valid user:pass pair when connecting to any central component after a secure connection is established (through tls). The credential contains a set of permissions of the client. A permission set is represented as a partial function whose domain are central components and codomain are read-only and read-write.

    Example:

    {
        "API": "ro",
        "MQ": "rw"
    }
    

    Note that the example client has read-only permission to API, read-write permission to MQ, and no permission to coordinator.

    Bots are supposed to have read-write permission to API and read-only permission to MQ.

    Workers are supposed to have read-only permission to coordinator.

    Middlewares are supposed to have read-write permission to MQ.

    Implementation

    Database Schema

    Add a new collection auth to MongoDB. Its schema is defined as follows:

    {
        "username": <string>,
        "hash": <pbkdf2 derived key>,
        "permissions": {<permissions map>}
    }
    

    Only API, coordinator, and rmq auth server have read-only access to this collection.

    Authentication Crate

    A new crate is implemented to query the db with given credential and return granted permissions.

    Coordinator & API

    Credentials are attached through HTTP Basic Authentication. Only requests with proper permissions can be accepted and processed.

    RabbitMQ

    An rmq auth server is implemented to integrate the authentication mechanism into RabbitMQ.

    See https://github.com/rabbitmq/rabbitmq-auth-backend-http.

    RFC 
    opened by PhotonQuantum 6
  • chore(deps): bump rstest from 0.14.0 to 0.15.0

    chore(deps): bump rstest from 0.14.0 to 0.15.0

    Bumps rstest from 0.14.0 to 0.15.0.

    Release notes

    Sourced from rstest's releases.

    0.15.0

    Fix bug on timeout tests that doesn't accept values that without copy trait.

    Changelog

    Sourced from rstest's changelog.

    [0.15.0] 2022/06/27

    Fixed

    • Timeout not compile if one of its test arguments il not a copy type [see #154]
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @PhotonQuantum.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 5
  • chore(deps): bump mongodb from 2.2.2 to 2.3.0-beta

    chore(deps): bump mongodb from 2.2.2 to 2.3.0-beta

    Bumps mongodb from 2.2.2 to 2.3.0-beta.

    Release notes

    Sourced from mongodb's releases.

    v2.3.0-beta

    The MongoDB Rust driver team is pleased to announce the v2.3.0-beta release of the mongodb crate.

    Highlighted Changes

    The following sections detail some of the major changes included in this release. For a full list of changes, see the Full Release Notes section below.

    MSRV Increase (RUST-1263)

    The minimum supported Rust version (MSRV) for this crate is now Rust 1.53.

    MongoDB 6.0 Support

    This release adds support for a number of new features added in MongoDB 6.0, including change streams with document pre- and post-images and clustered collections.

    The latest release candidate for MongoDB 6.0 is currently available for download here as well as on MongoDB Atlas.

    Changes to mongodb::Collection::estimated_document_count implementation (RUST-1216)

    When adding support for MongoDB 5.0, the driver's implementation of estimated_document_count was changed from using the count command to the aggregate command with the $collStats aggregation stage. This change first appeared in our 2.0.0-alpha.1 release. This change inadvertently broke support for using this method on views, as they do not support using $collStats. In this release, we have reverted that change, and estimated_document_count is now once again implemented using the count command. Please note that due to an oversight, count was omitted from the MongoDB Stable API version 1 in MongoDB server versions 5.0.0-5.0.8 and 5.1.0-5.3.1. Consequently, users of the Stable API who use estimated_document_count are recommended to either upgrade their MongoDB clusters to 5.0.9+ or 5.3.2+ (if on Atlas), or to set ClientOptions.server_api.strict to false when constructing Clients.

    New ConnectionString type

    RUST-1193 introduced a new public mongodb::options::ConnectionString type, which models a MongoDB connection string. This type can be used to parse a connection string and inspect and manipulate its contents, and to initialize a mongodb::options::ClientOptions, and in turn a mongodb::Client.

    For example:

    use mongodb::{
        Client,
        options::{ClientOptions, ConnectionString},
    };
    

    let mut conn_str = ConnectionString::parse("mongodb://localhost:27017/?appName=myApp1")?; println!("{:?}", conn_str.app_name); // prints: Some("myApp1") conn_str.app_name = Some("newAppName".to_string()); println!("{:?}", conn_str.app_name); // prints: Some("newAppName")

    let options = ClientOptions::parse_connection_string(conn_str).await?; let client = Client::with_options(options)?;

    The differences between a ConnectionString and ClientOptions are that:

    1. ConnectionString only contains client options that are universal across MongoDB drivers and can be set via a MongoDB connection string, whereas ClientOptions also contains Rust driver-specific options,
    2. When using a mongodb+srv connection string, initializing a ClientOptions will perform SRV and TXT lookup, whereas initializing a ConnectionString will not. Note that if a ConnectionString is initialized and then used to construct a ClientOptions or a Client, SRV/TXT lookup will be performed at that time.

    Included Tickets

    Below are a selected list of tickets with user impact; for a full list of completed tickets see this Jira query.

    Bug

    • [RUST-332] - Operations don't report errors for invalid setName in single topologies
    • [RUST-1274] - commitTransaction retry sometimes fails with InvalidOptions error
    • [RUST-1328] - ServerDescriptionChangedEvents for servers with errors always emitted even when description does not change
    • [RUST-1337] - Significant performance regression in large reads

    ... (truncated)

    Commits
    • 514ee4a RUST-1339 release v2.3.0-beta (#675)
    • f752f87 Fix Evergreen task for MSRV compilation with async-std (#672)
    • 3e49a6f RUST-1193 Minor adjustment to ConnectionString -> ClientOptions API (#673)
    • 6a82f53 RUST-1299, RUST-1316: Update server versions tested on Evergreen (#671)
    • 7b0e259 RUST-1337 Use tokio's AsyncRead and AsyncWrite traits (#668)
    • 6d89243 RUST-1090 Fix serverless tests (#666)
    • de3a594 RUST-1193 Provide a public ConnectionString type (#642)
    • 10cf58d RUST-855 Sync timeout change for wait queue timeout tests (#664)
    • 9258b9d RUST-1327 Restrict change stream tests to replsets (#665)
    • 0be1d67 RUST-690 Include openssl attribution in readme (#662)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @PhotonQuantum.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 5
  • chore(deps): bump axum from 0.4.8 to 0.5.4

    chore(deps): bump axum from 0.4.8 to 0.5.4

    Bumps axum from 0.4.8 to 0.5.4.

    Release notes

    Sourced from axum's releases.

    axum - v0.5.4

    • added: Add response::ErrorResponse and response::Result for IntoResponse-based error handling (#921)
    • added: Add middleware::from_extractor and deprecate extract::extractor_middleware (#957)
    • changed: Update to tower-http 0.3 (#965)

    #921: tokio-rs/axum#921 #957: tokio-rs/axum#957 #965: tokio-rs/axum#965

    axum - v0.5.3

    • added: Add AppendHeaders for appending headers to a response rather than overriding them (#927)
    • added: Add axum::extract::multipart::Field::chunk method for streaming a single chunk from the field (#901)
    • fixed: Fix trailing slash redirection with query parameters (#936)

    #901: tokio-rs/axum#901 #927: tokio-rs/axum#927 #936: tokio-rs/axum#936

    axum - v0.5.2

    Yanked, as it contained an accidental breaking change.

    axum - v0.5.1

    • added: Add RequestParts::extract which allows applying an extractor as a method call ([#897)

    #897: tokio-rs/axum#897

    axum - v0.5.0

    • added: Document sharing state between handler and middleware (#783)

    • added: Extension<_> can now be used in tuples for building responses, and will set an extension on the response (#797)

    • added: extract::Host for extracting the hostname of a request (#827)

    • added: Add IntoResponseParts trait which allows defining custom response types for adding headers or extensions to responses (#797)

    • added: TypedHeader implements the new IntoResponseParts trait so they can be returned from handlers as parts of a response (#797)

    • changed: Router::merge now accepts Into<Router> (#819)

    • breaking: sse::Event now accepts types implementing AsRef<str> instead of Into<String> as field values.

    • breaking: sse::Event now panics if a setter method is called twice instead of silently overwriting old values.

    • breaking: Require Output = () on WebSocketStream::on_upgrade (#644)

    • breaking: Make TypedHeaderRejectionReason #[non_exhaustive] (#665)

    • breaking: Using HeaderMap as an extractor will no longer remove the headers and thus they'll still be accessible to other extractors, such as axum::extract::Json. Instead HeaderMap will clone the headers. You should prefer to use TypedHeader to extract only the headers you need (#698)

      This includes these breaking changes:

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once it's up-to-date and CI passes on it, as requested by @PhotonQuantum.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • chore(deps): bump parking_lot from 0.12.0 to 0.12.1

    chore(deps): bump parking_lot from 0.12.0 to 0.12.1

    Bumps parking_lot from 0.12.0 to 0.12.1.

    Changelog

    Sourced from parking_lot's changelog.

    parking_lot 0.12.1 (2022-05-31)

    • Fixed incorrect memory ordering in RwLock. (#344)
    • Added Condvar::wait_while convenience methods (#343)

    parking_lot_core 0.9.3 (2022-04-30)

    • Bump windows-sys dependency to 0.36. (#339)

    parking_lot_core 0.9.2, lock_api 0.4.7 (2022-03-25)

    • Enable const new() on lock types on stable. (#325)
    • Added MutexGuard::leak function. (#333)
    • Bump windows-sys dependency to 0.34. (#331)
    • Bump petgraph dependency to 0.6. (#326)
    • Don't use pthread attributes on the espidf platform. (#319)

    parking_lot_core 0.9.1 (2022-02-06)

    • Bump windows-sys dependency to 0.32. (#316)
    Commits
    • 336a9b3 Release parking_lot 0.12.1
    • b69a054 Merge pull request #343 from bryanhitc/master
    • 3fe7233 Merge pull request #344 from Amanieu/fix_rwlock_ordering
    • ef12b00 small test update
    • fdb063c wait_while can't timeout fix
    • 26e19dc Remove WaitWhileResult
    • d26c284 Fix incorrect memory ordering in RwLock
    • 0458283 Use saturating_add for WaitWhileResult
    • 686db47 Add Condvar::wait_while convenience methods
    • 6f6e021 Merge pull request #342 from MarijnS95/patch-1
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.

    Dependabot will merge this PR once CI passes on it, as requested by @PhotonQuantum.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 4
  • chore(deps): bump uuid from 0.8.2 to 1.0.0

    chore(deps): bump uuid from 0.8.2 to 1.0.0

    Bumps uuid from 0.8.2 to 1.0.0.

    Release notes

    Sourced from uuid's releases.

    1.0.0

    This release includes a huge amount of work from a lot of contributors. These notes are duplicated from 1.0.0-alpha.1 since they're relevant for anybody moving from 0.8.2 to 1.0.0.

    Changes since the last release

    https://github.com/uuid-rs/uuid/compare/0.8.2...main

    Contributions since the last release

    ... (truncated)

    Commits
    • 9e0dc29 Merge pull request #596 from KodrAus/cargo/1.0.0
    • 286134f prepare for 1.0.0 release
    • 43905eb Merge pull request #595 from spruceid/remove-and
    • 444ef96 Remove unnecessary AND
    • 5f649d7 Merge pull request #592 from uuid-rs/KodrAus-patch-1
    • 92ad25f update contact details in the CoC
    • 767f519 Merge pull request #591 from uuid-rs/fix/macro-diagnostics
    • 8b043af use the parsed literal as the span source for errors
    • f0d5956 Merge pull request #587 from uuid-rs/feat/fast-sha1
    • 165b7eb move to sha1_smol as the new name for the current library
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies suspended 
    opened by dependabot[bot] 4
  • Middleware

    Middleware

    Closes #39.

    Core

    • [x] Change exchange type from fanout to topc
    • [x] Helper for consuming events

    Translate

    Translate specific fields of an event.

    Routing key

    #.translate

    Attributes

    x-translate-fields(required) - fields to translate, in json pointer format. (e.g., /body)

    • [x] Translate through Baidu translate API
    • [x] Unit tests
    • [x] Integration tests

    Delay

    Deliver an event later.

    Routing key

    #.delay

    Attributes

    x-delay-id(required) - id of the delay request. Don't to be confused with event id. Can be used to cancel this delivery. Multiple deliveries with the same delay request id will cause previous events to be discarded. x-delay-cancel - if set to true, cancel the delivery with given id. x-delay-at(required if x-delay-cancel is not set to true) - deliver the message at given timestamp. Invalid timestamps (e.g., earlier than now) will be ignored and won't overwrite an existing event.

    • [x] Add new delayed message
    • [x] Cancel a delivery
    • [x] Unit tests
    • [x] Integration tests
    feature 
    opened by PhotonQuantum 4
  • chore(deps): bump diesel from 1.4.8 to 2.0.1

    chore(deps): bump diesel from 1.4.8 to 2.0.1

    Bumps diesel from 1.4.8 to 2.0.1.

    Release notes

    Sourced from diesel's releases.

    Diesel 2.0.1

    This is a bugfix release containing the following fixes:

    • Fixed an issue with diesel_cli generating incompatible type names for the generate_missing_sql_type_definitions feature on PostgreSQL
    • Fixed an issue how diesel_cli handles sqlite urls while checking if a given database exists
    • Fixed an issue with PgConnection becoming unusable after hitting a database error in certain situations
    • Fixed an issue with diesel generating invalid SQL for certain INSERT … ON CONFLICT queries
    • Fixed diesel_derives generating code that triggers the disabled by default unused_qualifications lint

    This release includes updated versions of diesel, diesel_cli and diesel_derives

    Diesel 2.0.0 contains the contributions of more than 130 people. More than 1700 commits were submitted over a span of 3 years.

    As part of this release we introduced numerous new features and rewrote large parts of the internal structure. Check out our changelog for a complete list of changes. As this is a new major Diesel release it contains a number of breaking changes. Checkout our migration guide for details about how to handle those breaking changes.

    This release contains the following parts:

    • diesel 2.0.0-rc.0
    • diesel_derives 2.0.0-rc.0
    • diesel_migrations 2.0.0-rc.0
    • diesel_cli 2.0.0-rc.0
    • diesel_dynamic_schema 0.2.0-rc.0

    This release marks a first prerelease of the upcoming Diesel 2.0 release. We ask you for your help to finalise the release. Checkout the "Timeline for a Diesel 2.0 release" section for details about how you can help us finishing the release.

    Features

    As a highlight Diesel 2.0.0 adds support for the following features:

    • Fully type checked GROUP BY support
    • Support for table aliasing
    • Support for defining select clauses via a corresponding type
    • Support for UNION/INTERSECT queries

    Support for GROUP BY clauses

    Diesel 2.0 adds support for GROUP BY clauses for select queries.

    This means queries like the following one will just work.

     users::table.inner_join(posts::table)
        .group_by(users::id)
        .select((users::name, count(posts::id)))
    

    ... (truncated)

    Changelog

    Sourced from diesel's changelog.

    [2.0.1] 2022-10-07

    Fixed

    • Fixed an issue with diesel_cli generating incompatible type names for the generate_missing_sql_type_definitions feature on PostgreSQL
    • Fixed an issue how diesel_cli handles sqlite urls while checking if a given database exists
    • Fixed an issue with PgConnection becoming unusable after hitting a database error in certain situations
    • Fixed an issue with diesel generating invalid SQL for certain INSERT … ON CONFLICT queries
    • Fixed diesel_derives generating code that triggers the disabled by default unused_qualifications lint

    [2.0.0] 2022-08-29

    Added

    • MysqlConnection::establish is able to initiate an SSL connection while specifying certificate roots. The database URL should contain an ssl_ca parameter with a path pointing to the certificate roots. See docs if desired.

    • MysqlConnection::establish is able to initiate an SSL connection. The database URL should contain ssl_mode parameter with a value of the MySQL client command option --ssl-mode if desired.

    • Connection and SimpleConnection traits are implemented for a broader range of r2d2::PooledConnection<M> types when the r2d2 feature is enabled.

    • Added DatabaseErrorKind::ReadOnlyTransaction to allow applications to handle errors caused by writing when only allowed to read.

    • All expression methods can now be called on expressions of nullable types.

    • Added BoxedSqlQuery. This allows users to do a variable amount of .sql or .bind calls without changing the underlying type.

    • Added .sql to SqlQuery and UncheckedBind to allow appending SQL code to an existing query.

    • The MacAddr SQL type can now be used without enabling the network-address feature.

    • Added support for SQLite's UPSERT. You can use this feature above SQLite version 3.24.0.

    • Added ability to create custom aggregate functions in SQLite.

    • Multiple aggregate expressions can now appear together in the same select clause. See the upgrade notes for details.

    • ValidGrouping has been added to represent whether an expression is valid for a given group by clause, and whether or not it's aggregate. It replaces the functionality of NonAggregate. See the upgrade notes for details.

    • It is now possible to inspect the type of values returned from the database in such a way to support constructing a dynamic value depending on this type.

    ... (truncated)

    Commits
    • c163482 Insert the release date of 2.0.1 into the changelog
    • b1d030c Prepare a 2.0.1 release fixing various issues
    • 0d77050 Fix indent
    • 8444d15 fix fmt
    • 7d512b8 fixed unused qualifications issue in insertable
    • 051f39f Fix #3330
    • 91a4f1e Reenable diesel_async in benchmarks by using the crates.io release
    • 3455cfe move table definition to relevant test method
    • c8f4e4f clear connection after database error
    • 336e9a4 Verify that group_by expression is valid for the given table
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies major 
    opened by dependabot[bot] 3
  • chore(deps): bump diesel from 1.4.8 to 2.0.2

    chore(deps): bump diesel from 1.4.8 to 2.0.2

    Bumps diesel from 1.4.8 to 2.0.2.

    Release notes

    Sourced from diesel's releases.

    Diesel 2.0.2

    Fixed

    • Reverted a fix from the 2.0.1 release that breaks valid INSERT … ON CONFLICT queries

    Diesel 2.0.1

    This is a bugfix release containing the following fixes:

    • Fixed an issue with diesel_cli generating incompatible type names for the generate_missing_sql_type_definitions feature on PostgreSQL
    • Fixed an issue how diesel_cli handles sqlite urls while checking if a given database exists
    • Fixed an issue with PgConnection becoming unusable after hitting a database error in certain situations
    • Fixed an issue with diesel generating invalid SQL for certain INSERT … ON CONFLICT queries
    • Fixed diesel_derives generating code that triggers the disabled by default unused_qualifications lint

    This release includes updated versions of diesel, diesel_cli and diesel_derives

    Diesel 2.0.0 contains the contributions of more than 130 people. More than 1700 commits were submitted over a span of 3 years.

    As part of this release we introduced numerous new features and rewrote large parts of the internal structure. Check out our changelog for a complete list of changes. As this is a new major Diesel release it contains a number of breaking changes. Checkout our migration guide for details about how to handle those breaking changes.

    This release contains the following parts:

    • diesel 2.0.0-rc.0
    • diesel_derives 2.0.0-rc.0
    • diesel_migrations 2.0.0-rc.0
    • diesel_cli 2.0.0-rc.0
    • diesel_dynamic_schema 0.2.0-rc.0

    This release marks a first prerelease of the upcoming Diesel 2.0 release. We ask you for your help to finalise the release. Checkout the "Timeline for a Diesel 2.0 release" section for details about how you can help us finishing the release.

    Features

    As a highlight Diesel 2.0.0 adds support for the following features:

    • Fully type checked GROUP BY support
    • Support for table aliasing
    • Support for defining select clauses via a corresponding type
    • Support for UNION/INTERSECT queries

    Support for GROUP BY clauses

    Diesel 2.0 adds support for GROUP BY clauses for select queries.

    This means queries like the following one will just work.

    </tr></table> 
    

    ... (truncated)

    Changelog

    Sourced from diesel's changelog.

    [2.0.2] 2022-10-11

    Fixed

    • Reverted a fix from the 2.0.1 release that breaks valid INSERT … ON CONFLICT queries

    [2.0.1] 2022-10-07

    Fixed

    • Fixed an issue with diesel_cli generating incompatible type names for the generate_missing_sql_type_definitions feature on PostgreSQL
    • Fixed an issue how diesel_cli handles sqlite urls while checking if a given database exists
    • Fixed an issue with PgConnection becoming unusable after hitting a database error in certain situations
    • Fixed an issue with diesel generating invalid SQL for certain INSERT … ON CONFLICT queries
    • Fixed diesel_derives generating code that triggers the disabled by default unused_qualifications lint

    [2.0.0] 2022-08-29

    Added

    • MysqlConnection::establish is able to initiate an SSL connection while specifying certificate roots. The database URL should contain an ssl_ca parameter with a path pointing to the certificate roots. See docs if desired.

    • MysqlConnection::establish is able to initiate an SSL connection. The database URL should contain ssl_mode parameter with a value of the MySQL client command option --ssl-mode if desired.

    • Connection and SimpleConnection traits are implemented for a broader range of r2d2::PooledConnection<M> types when the r2d2 feature is enabled.

    • Added DatabaseErrorKind::ReadOnlyTransaction to allow applications to handle errors caused by writing when only allowed to read.

    • All expression methods can now be called on expressions of nullable types.

    • Added BoxedSqlQuery. This allows users to do a variable amount of .sql or .bind calls without changing the underlying type.

    • Added .sql to SqlQuery and UncheckedBind to allow appending SQL code to an existing query.

    • The MacAddr SQL type can now be used without enabling the network-address feature.

    • Added support for SQLite's UPSERT. You can use this feature above SQLite version 3.24.0.

    • Added ability to create custom aggregate functions in SQLite.

    • Multiple aggregate expressions can now appear together in the same select clause. See the upgrade notes for details.

    • ValidGrouping has been added to represent whether an expression is valid for

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies major 
    opened by dependabot[bot] 1
  • chore(deps): bump diesel_migrations from 1.4.0 to 2.0.0

    chore(deps): bump diesel_migrations from 1.4.0 to 2.0.0

    Bumps diesel_migrations from 1.4.0 to 2.0.0.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies major 
    opened by dependabot[bot] 1
  • fix(core/config): inherit is ignored when explicit default is present

    fix(core/config): inherit is ignored when explicit default is present

    Fix a bug when both inherit and explicit default are set. Inherited fields was overwritten by explicit defaults.

    Example

    Source

        #[derive(Deserialize, Config)]
        struct Nested {
            #[config(default = "false")]
            b: bool,
            c: usize,
        }
    
        #[derive(Deserialize, Config)]
        struct Config {
            #[config(inherit, default = r#"{ "c": 42 }"#)]
            a: Nested,
        }
    

    Current Generated Code (Wrong)

    Notice how the second insertion of key "a" overwrites the first one.

    impl crate::utils::ConfigDefault for ConfigWithInheritAndExplicitDefaultsTwo {
        fn config_defaults() -> crate::utils::serde_json::Value {
            crate::utils::serde_json::Value::Object({
                {
                    let mut dict = crate::utils::serde_json::Map::new();
                    dict.insert("a".to_string(), <Nested as crate::utils::ConfigDefault>::config_defaults());
                    dict.insert("a".to_string(), crate::utils::serde_json::from_str::<crate::utils::serde_json::Value>("{ \"c\": 42 }").expect("Given string literal is not a valid json value."));
                    dict
                }
            })
        }
    }
    

    Stacked PR

    This PR is stacked on top of PR #145. It shouldn't be merged until #145 is merged.

    opened by PhotonQuantum 1
  • chore(deps): bump uuid from 0.8.2 to 1.1.2

    chore(deps): bump uuid from 0.8.2 to 1.1.2

    Bumps uuid from 0.8.2 to 1.1.2.

    Release notes

    Sourced from uuid's releases.

    1.1.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/uuid-rs/uuid/compare/1.1.1...1.1.2

    1.1.1

    What's Changed

    New Contributors

    Full Changelog: https://github.com/uuid-rs/uuid/compare/1.1.0...1.1.1

    1.1.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/uuid-rs/uuid/compare/1.0.0...1.1.0

    1.0.0

    This release includes a huge amount of work from a lot of contributors. These notes are duplicated from 1.0.0-alpha.1 since they're relevant for anybody moving from 0.8.2 to 1.0.0.

    Changes since the last release

    https://github.com/uuid-rs/uuid/compare/0.8.2...main

    Contributions since the last release

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies suspended 
    opened by dependabot[bot] 4
Owner
すいせい工房
g(entoo)-a(r)ch(l)i(nux)-cn = gachi-cn,群友如是说
すいせい工房
A lightweight but incredibly powerful and feature-rich BitTorrent tracker. Supports UDP + HTTP(S) and a private tracker mode.

Torrust Tracker Project Description Torrust Tracker is a lightweight but incredibly powerful and feature-rich BitTorrent tracker made using Rust. Feat

Torrust 162 Dec 31, 2022
High-performance BitTorrent tracker compatible with UNIT3D tracker software

UNIT3D-Announce High-performance backend BitTorrent tracker compatible with UNIT3D tracker software. Usage # Clone this repository $ git clone https:/

HDInnovations 4 Feb 6, 2023
A VtubeStudio plugin that allows iFacialMocap to stream data to the app, enabling full apple ARkit facial tracking to be used for 2D Vtuber models.

facelink_rs A VtubeStudio plugin that allows iFacialMocap to stream data to the app, enabling full apple ARkit facial tracking to be used for 2D Vtube

Slashscreen 2 May 6, 2022
A DIY, IMU-based skateboard activity tracker

tracksb A DIY, IMU-based skateboard activity tracker. The idea is to come up with algorithms to track activity during skateboarding sessions. A compan

null 21 May 5, 2022
⏳ trackie is a private, daemon-less time tracker for your CLI.

⏳ trackie `trackie` is a private, daemon-less time tracker running in your CLI. Trackie offers an easy CLI to track the time you spent on your various

Christoph Loy 40 Dec 14, 2022
TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker

TimeKnight is a neat little TUI-based timer app I use in conjunction with a task tracker. It's kind of a secret sauce for productivity (particularly if you have ADHD or have a ridiculously overactive brain).

Monomadic 1 Feb 8, 2022
syd: siderial and moon tracker

This is code based on the 'minimal' template ca. 2022Q1 (RTIC 1.0). It drives a siderial tracker for the northern hemisphere that can run at three different speeds. It runs on a bluepill (stm32f103).

null 1 Feb 8, 2022
A highly performant HTTP bittorrent tracker (WIP)

kiryuu Rewrite of kouko in Rust, for better performance! Kiryuu powers http://tracker.mywaifu.best:6969/announce Thanks Many thanks to horsie and anon

Raghu Saxena 6 Dec 15, 2022
Privaxy Next generation tracker and advertisement blocker

Privaxy is a MITM HTTP(s) proxy that sits in between HTTP(s) talking applications, such as a web browser and HTTP servers, such as those serving websites.

Pierre Barre 752 Jan 7, 2023
📝 A mininal TODO tracker

Emily Brief ?? A simple TODOs tracker that find unreported todos and submit them as an issue on the repo Challenges ?? Find TODOs via multiple archive

WasixXD 4 Feb 2, 2023
A multi-functional lightweight BitTorrent Tracker

Torrust-Axum Tracker Project Description Torrust-Axum Tracker is a lightweight but incredibly powerful and feature-rich BitTorrent Tracker made using

Jasper 55 Apr 21, 2023
A little toy tracker/DAW/thing.

track A little toy tracker/DAW/thing. Can currently play some oldschool 4-channel Amiga protracker modules. Will likely become a basis for future audi

Serge Bazanski 4 Apr 12, 2023
A money tracker: Your income and expenses at your control

NixBucks A simple budgeting app Install If you are on Linux, you can download the Appimage from the latest release (click here). Otherwise, you can in

Marcos Gutiérrez Alonso 3 Sep 25, 2023
Local-first task manager/bug tracker that stores everything right in the git repository and can sync issues from/to GitHub.

git-task Local-first task manager/bug tracker within your git repository which can import issues from GitHub. Installation Build a binary, then add it

null 15 Sep 28, 2024
Concatenate Amazon S3 files remotely using flexible patterns

S3 Concat This tool has been migrated into s3-utils, please use that crate for future updates. A small utility to concatenate files in AWS S3. Designe

Isaac Whitfield 33 Dec 15, 2022
Powerful database anonymizer with flexible rules. Written in Rust.

[Data]nymizer Powerful database anonymizer with flexible rules. Written in Rust. Datanymizer is created & supported by Evrone. What else we develop wi

[Data]nymizer 381 Dec 26, 2022
Highly flexible library to manage and orchestrate JWT workflow

JWT Vault Highly flexible library to manage and orchestrate JWT workflow Examples | Website | Chat TODO Add more examples Improve coverage Features Ma

Saurav Gupta 65 Nov 8, 2022
A flexible template engine for Rust

Rustache Rustache is a Rust implementation of the Mustache spec. Documentation The different Mustache tags are documented at the mustache(5) man page.

rustache 208 May 10, 2022
A flexible web framework that promotes stability, safety, security and speed.

A flexible web framework that promotes stability, safety, security and speed. Features Stability focused. All releases target stable Rust. This will n

Gotham 2.1k Jan 3, 2023
comfy is a flexible command script manager / runner written in Rust

comfy is a cross-platform command script manager / runner tool, which allows you to run commands in the command line itself, but being these predefined in a portable and universal .comfy file.

daCoUSB 17 Nov 12, 2021