diff --git a/CHANGELOG.md b/CHANGELOG.md index 9211ec54..7be02fc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.46.3] +### Fixed +- Regression in FlightSQL interface related to database-backed `QueryService` + ## [0.46.2] ### Fixed - Less aggressive telemetry for key dataset services, like ingestion (CLI v0.213.1) diff --git a/Cargo.lock b/Cargo.lock index 0ab1bc39..64f18447 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,9 +133,9 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.48" +version = "0.1.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0161082e0edd9013d23083465cc04b20e44b7a15646d36ba7b0cdb7cd6fe18f" +checksum = "830045a4421ee38d3ab570d36d4d2b5152c066e72797139224da8de5d5981fd0" dependencies = [ "alloy-primitives", "num_enum", @@ -1509,9 +1509,9 @@ dependencies = [ [[package]] name = "aws-sdk-secretsmanager" -version = "1.54.0" +version = "1.55.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "450b2e8cb5f0ee102e4a04c5f8e923aff8187ae9323058707c6cec238cf51699" +checksum = "30bde1b6dfc07710a45e8ba12c821637bf756bca9f49b3571990419fb7a72f26" dependencies = [ "aws-credential-types", "aws-runtime", @@ -2093,9 +2093,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] name = "byteorder" @@ -2173,9 +2173,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" +checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" dependencies = [ "jobserver", "libc", @@ -3563,9 +3563,9 @@ source = "git+https://github.com/kamu-data/kamu-cli?tag=v0.213.1#3213a907a95bcf0 [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -3573,9 +3573,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -3793,9 +3793,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "form_urlencoded" @@ -4002,7 +4002,7 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "graceful-shutdown" -version = "0.46.2" +version = "0.46.3" dependencies = [ "tokio", "tracing", @@ -4440,9 +4440,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.4" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6884a48c6826ec44f524c7456b163cebe9e55a18d7b5e307cb4f100371cc767" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http 1.2.0", @@ -5219,7 +5219,7 @@ dependencies = [ [[package]] name = "kamu-api-server" -version = "0.46.2" +version = "0.46.3" dependencies = [ "arrow-flight", "async-graphql", @@ -5700,7 +5700,7 @@ dependencies = [ [[package]] name = "kamu-oracle-provider" -version = "0.46.2" +version = "0.46.3" dependencies = [ "alloy", "async-trait", @@ -5735,7 +5735,7 @@ dependencies = [ [[package]] name = "kamu-repo-tools" -version = "0.46.2" +version = "0.46.3" dependencies = [ "chrono", "clap", @@ -5987,9 +5987,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.168" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libm" @@ -7216,9 +7216,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "predicates-core", @@ -7226,15 +7226,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -7631,7 +7631,7 @@ dependencies = [ "http-body 1.0.1", "http-body-util", "hyper 1.5.2", - "hyper-rustls 0.27.4", + "hyper-rustls 0.27.5", "hyper-util", "ipnet", "js-sys", @@ -8904,9 +8904,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "test-group" @@ -9076,9 +9076,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -9639,9 +9639,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "utoipa" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514a48569e4e21c86d0b84b5612b5e73c0b2cf09db63260134ba426d4e8ea714" +checksum = "68e76d357bc95c7d0939c92c04c9269871a8470eea39cb1f0231eeadb0c47d0f" dependencies = [ "indexmap 2.7.0", "serde", @@ -9651,9 +9651,9 @@ dependencies = [ [[package]] name = "utoipa-axum" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1370cc4a8eee751c4d2a729566d83d1568212320a20581c7c72c2d76ab80ed37" +checksum = "839e89ad0db7f9e8737dace8ff43c1ce0711d5e0d08cc1c9d31cc8454d4643ee" dependencies = [ "axum", "paste", @@ -9664,9 +9664,9 @@ dependencies = [ [[package]] name = "utoipa-gen" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5629efe65599d0ccd5d493688cbf6e03aa7c1da07fe59ff97cf5977ed0637f66" +checksum = "564b03f8044ad6806bdc0d635e88be24967e785eef096df6b2636d2cc1e05d4b" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 15a1f568..8a4d0f60 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ resolver = "2" [workspace.dependencies] # Utils -graceful-shutdown = { path = "src/utils/graceful-shutdown", version = "0.46.2", default-features = false } +graceful-shutdown = { path = "src/utils/graceful-shutdown", version = "0.46.3", default-features = false } # Utils (core) container-runtime = { git = "https://github.com/kamu-data/kamu-cli", tag = "v0.213.1", version = "0.213.1", default-features = false } database-common = { git = "https://github.com/kamu-data/kamu-cli", tag = "v0.213.1", version = "0.213.1", default-features = false } @@ -64,7 +64,7 @@ kamu-task-system-sqlite = { git = "https://github.com/kamu-data/kamu-cli", tag = [workspace.package] -version = "0.46.2" +version = "0.46.3" edition = "2021" homepage = "https://github.com/kamu-data/kamu-platform" repository = "https://github.com/kamu-data/kamu-platform" diff --git a/LICENSE.txt b/LICENSE.txt index f9e928b9..e557e190 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -11,7 +11,7 @@ Business Source License 1.1 Licensor: Kamu Data, Inc. -Licensed Work: Kamu Platform Version 0.46.2 +Licensed Work: Kamu Platform Version 0.46.3 The Licensed Work is © 2023 Kamu Data, Inc. Additional Use Grant: You may use the Licensed Work for any purpose, diff --git a/resources/openapi-mt.json b/resources/openapi-mt.json index 2cc3d303..d1fabff5 100644 --- a/resources/openapi-mt.json +++ b/resources/openapi-mt.json @@ -818,7 +818,7 @@ }, "termsOfService": "https://docs.kamu.dev/terms-of-service/", "title": "Kamu REST API", - "version": "0.46.2" + "version": "0.46.3" }, "openapi": "3.1.0", "paths": { @@ -1091,10 +1091,7 @@ "name": "contentType", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } } ], @@ -1367,10 +1364,7 @@ "name": "include", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } } ], @@ -1825,10 +1819,7 @@ "name": "sourceName", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { @@ -1836,10 +1827,7 @@ "name": "uploadToken", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { @@ -1909,10 +1897,7 @@ "name": "include", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { diff --git a/resources/openapi.json b/resources/openapi.json index bd121b45..d198e723 100644 --- a/resources/openapi.json +++ b/resources/openapi.json @@ -818,7 +818,7 @@ }, "termsOfService": "https://docs.kamu.dev/terms-of-service/", "title": "Kamu REST API", - "version": "0.46.2" + "version": "0.46.3" }, "openapi": "3.1.0", "paths": { @@ -942,7 +942,7 @@ ] } }, - "/odata/": { + "/odata": { "get": { "operationId": "odata_service_handler_st", "responses": { @@ -1060,10 +1060,7 @@ "name": "contentType", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } } ], @@ -1336,10 +1333,7 @@ "name": "include", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } } ], @@ -1794,10 +1788,7 @@ "name": "sourceName", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { @@ -1805,10 +1796,7 @@ "name": "uploadToken", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { @@ -1878,10 +1866,7 @@ "name": "include", "required": false, "schema": { - "type": [ - "string", - "null" - ] + "type": "string" } }, { diff --git a/src/app/api-server/src/flightsql_server.rs b/src/app/api-server/src/flightsql_server.rs index f0d0ada6..d1f36135 100644 --- a/src/app/api-server/src/flightsql_server.rs +++ b/src/app/api-server/src/flightsql_server.rs @@ -108,8 +108,22 @@ impl SessionFactory for SessionFactoryImpl { let subject = CurrentAccountSubject::Anonymous(AnonymousAccountReason::NoAuthenticationProvided); + // Extract transaction manager, specific for the database + let db_transaction_manager = self + .base_catalog + .get_one::() + .unwrap(); + + // This is a read-only transaction, so we don't need a COMMIT. + // It will be automatically rolled back when catalog is dropped. + let transaction_ref = db_transaction_manager.make_transaction_ref().await.map_err(|e| { + tracing::error!(error = %e, error_dbg = ?e, "Failed to open database transaction for FlightSQL session"); + Status::internal("could not start database transaction") + })?; + let session_catalog = dill::CatalogBuilder::new_chained(&self.base_catalog) .add_value(subject) + .add_value(transaction_ref) .build(); let query_svc = session_catalog