Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
-DUSERVER_FEATURE_CLICKHOUSE=OFF
-DUSERVER_FEATURE_STACKTRACE=OFF
-DUSERVER_FEATURE_PATCH_LIBPQ=OFF
-DUSERVER_FEATURE_SCYLLADB=OFF
-DUSERVER_FEATURE_YDB=OFF
-DUSERVER_DISABLE_RSEQ_ACCELERATION=YES
-DUSERVER_FORCE_DOWNLOAD_ABSEIL=1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
-DUSERVER_FEATURE_MONGODB=0
-DUSERVER_FEATURE_OTLP=0
-DUSERVER_FEATURE_ROCKS=0
-DUSERVER_FEATURE_SCYLLADB=0
-DUSERVER_FEATURE_YDB=0
-DUSERVER_USE_STATIC_LIBS=0
-DUSERVER_FEATURE_PATCH_LIBPQ=0
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ jobs:
run: |
./scripts/rabbitmq/ubuntu_install_rabbitmq_server.sh

- name: Install ScyllaDB cpp-rs-driver
run: |
sudo ./scripts/scylla/ubuntu-install-scylla.sh

- name: Run ScyllaDB for tests
run: docker run -d -p 9042:9042 scylladb/scylla:2025.1 --smp 1 --memory 750M

@gearonixx gearonixx Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yandex-taxi-testsuite has no scylla or cassandra database plugin.

Unlike every other DB in ci.yml, testsuite cannot bring a ScyllaDB cluster up itself


- name: Install gdb and pytest
run: |
sudo apt install -y gdb python3-pytest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
-DUSERVER_FEATURE_CLICKHOUSE=OFF
-DUSERVER_FEATURE_STACKTRACE=OFF
-DUSERVER_FEATURE_PATCH_LIBPQ=OFF
-DUSERVER_FEATURE_SCYLLADB=OFF
-DUSERVER_FEATURE_YDB=OFF
-DUSERVER_DISABLE_RSEQ_ACCELERATION=YES
-DUSERVER_CHAOTIC_FORMAT=OFF
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
-DUSERVER_NO_WERROR=0
-DUSERVER_BUILD_ALL_COMPONENTS=1
-DUSERVER_FEATURE_ROCKS=0
-DUSERVER_FEATURE_SCYLLADB=0
-DUSERVER_BUILD_SAMPLES=1
-DUSERVER_BUILD_TESTS=1
-DCMAKE_BUILD_TYPE=Release
Expand All @@ -51,6 +52,7 @@ jobs:
-DUSERVER_NO_WERROR=0
-DUSERVER_BUILD_ALL_COMPONENTS=1
-DUSERVER_FEATURE_ROCKS=0
-DUSERVER_FEATURE_SCYLLADB=0
-DUSERVER_BUILD_SAMPLES=1
-DUSERVER_BUILD_TESTS=1
-DCMAKE_BUILD_TYPE=Release
Expand All @@ -67,6 +69,7 @@ jobs:
-DUSERVER_NO_WERROR=1
-DUSERVER_BUILD_ALL_COMPONENTS=1
-DUSERVER_FEATURE_ROCKS=0
-DUSERVER_FEATURE_SCYLLADB=0
-DUSERVER_BUILD_SAMPLES=1
-DUSERVER_BUILD_TESTS=1
-DCMAKE_BUILD_TYPE=Release
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
-DUSERVER_FEATURE_CLICKHOUSE=OFF
-DUSERVER_FEATURE_RABBITMQ=OFF
-DUSERVER_FEATURE_PATCH_LIBPQ=OFF
-DUSERVER_FEATURE_SCYLLADB=OFF
-DUSERVER_FEATURE_YDB=OFF
-DUSERVER_DOWNLOAD_PACKAGES=OFF
-DUSERVER_FEATURE_STACKTRACE=OFF
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
-DUSERVER_BUILD_SAMPLES=1
-DUSERVER_BUILD_TESTS=1
-DUSERVER_FEATURE_CRYPTOPP_BLAKE2=0
-DUSERVER_FEATURE_SCYLLADB=0
-DUSERVER_FEATURE_YDB=0
-DUSERVER_USE_LD=lld
-DUSERVER_FORCE_DOWNLOAD_RE2=1
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ option(USERVER_FEATURE_MYSQL "Provide asynchronous driver for MariaDB/MySQL" "${
# @ingroup libraries
option(USERVER_FEATURE_ROCKS "Provide asynchronous driver for Rocks" "${USERVER_LIB_ENABLED_DEFAULT}")
# @ingroup libraries
option(USERVER_FEATURE_SCYLLADB "Provide asynchronous driver for ScyllaDB" "${USERVER_LIB_ENABLED_DEFAULT}")
# @ingroup libraries
option(USERVER_FEATURE_YDB "Provide asynchronous driver for YDB" "${USERVER_YDB_DEFAULT}")
# @ingroup libraries
option(USERVER_FEATURE_OTLP "Provide asynchronous OTLP exporters" "${USERVER_LIB_ENABLED_DEFAULT}")
Expand Down
137 changes: 0 additions & 137 deletions samples/scylla_service/README.md

This file was deleted.

5 changes: 5 additions & 0 deletions samples/scylla_service/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,11 @@ class SchemaInitHandler final : public server::handlers::HttpHandlerBase {
std::string HandleRequest(server::http::HttpRequest& request, server::request::RequestContext&) const override {
request.GetHttpResponse().SetContentType(http::content_type::kApplicationJson);

session_->ExecuteVoid(
"CREATE KEYSPACE IF NOT EXISTS examples "
"WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1}"
);

session_->ExecuteVoid(
"CREATE TABLE IF NOT EXISTS examples.basic ("
"key text PRIMARY KEY, "
Expand Down
2 changes: 1 addition & 1 deletion samples/scylla_service/testsuite/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@pytest.fixture(scope='session')
def scylla_connection_info(pytestconfig) -> ConnectionInfo:
host = pytestconfig.option.scylla_host or os.environ.get('TESTSUITE_SCYLLA_HOST') or 'scylla'
host = pytestconfig.option.scylla_host or os.environ.get('TESTSUITE_SCYLLA_HOST') or 'localhost'
port = pytestconfig.option.scylla_port or int(os.environ.get('TESTSUITE_SCYLLA_PORT') or 9042)

return ConnectionInfo(host=host, port=port)
Expand Down
1 change: 1 addition & 0 deletions scripts/build_and_install_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ set -euox pipefail
BUILD_OPTIONS="
-DUSERVER_BUILD_ALL_COMPONENTS=1 \
-DUSERVER_FEATURE_YDB=0 \
-DUSERVER_FEATURE_SCYLLADB=0 \
-DUSERVER_FEATURE_GRPC_CHANNELZ=0 \
${BUILD_OPTIONS:-""} \
"
Expand Down
1 change: 1 addition & 0 deletions scripts/docker/base-ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ COPY scripts/docker/setup-base-ubuntu-22.04-env.sh /userver_tmp/
COPY scripts/clickhouse/ubuntu-install-clickhouse.sh /userver_tmp/
COPY scripts/rabbitmq/ubuntu_install_rabbitmq_dev.sh /userver_tmp/
COPY scripts/kafka/ubuntu_install_kafka.sh /userver_tmp/
COPY scripts/scylla/ubuntu-install-scylla.sh /userver_tmp/
COPY scripts/docker/ubuntu_install_grpc.sh /userver_tmp/

COPY scripts/grpc/requirements-4.txt /userver_tmp/requirements/grpc-userver.txt
Expand Down
3 changes: 3 additions & 0 deletions scripts/docker/setup-base-ubuntu-22.04-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ git clone --depth 1 -b ${ROCKSDB_VERSION} https://github.com/facebook/rocksdb
# Installing Kafka
./ubuntu_install_kafka.sh

# Installing ScyllaDB
./ubuntu-install-scylla.sh

# Set UTC timezone
TZ=Etc/UTC
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
Expand Down
5 changes: 4 additions & 1 deletion scripts/docker/ubuntu-24.04-base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ COPY scripts/clickhouse/ubuntu-install-clickhouse.sh /userver_tmp/
RUN /userver_tmp/ubuntu-install-clickhouse.sh

COPY scripts/rabbitmq/ubuntu_install_rabbitmq_dev.sh /userver_tmp/
RUN /userver_tmp/ubuntu_install_rabbitmq_dev.sh
RUN /userver_tmp/ubuntu_install_rabbitmq_dev.sh

COPY scripts/scylla/ubuntu-install-scylla.sh /userver_tmp/
RUN /userver_tmp/ubuntu-install-scylla.sh
2 changes: 2 additions & 0 deletions scripts/docs/en/userver/build/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ userver is split into multiple CMake libraries.
| `userver::rabbitmq` | `USERVER_FEATURE_RABBITMQ` | `rabbitmq` | @ref scripts/docs/en/userver/rabbitmq_driver.md |
| `userver::mysql` | `USERVER_FEATURE_MYSQL` | `mysql` | @ref scripts/docs/en/userver/mysql/mysql_driver.md |
| `userver::rocks` | `USERVER_FEATURE_ROCKS` | `rocks` | TODO |
| `userver::scylla` | `USERVER_FEATURE_SCYLLADB` | `scylla` | @ref scripts/docs/en/userver/scylladb.md |
| `userver::sqlite` | `USERVER_FEATURE_SQLITE` | `sqlite` | @ref scripts/docs/en/userver/sqlite/sqlite_driver.md |
| `userver::odbc` | `USERVER_FEATURE_ODBC` | `odbc` | @ref scripts/docs/en/userver/odbc.md |
| `userver::ydb` | `USERVER_FEATURE_YDB` | `ydb` | @ref scripts/docs/en/userver/ydb.md |
Expand Down Expand Up @@ -82,6 +83,7 @@ The exact format of setting cmake options varies depending on the method of buil
| `USERVER_FEATURE_ROCKS` | Provide asynchronous driver for RocksDB | `${USERVER_BUILD_ALL_COMPONENTS}` |
| `USERVER_FEATURE_SQLITE` | Provide asynchronous driver for SQLite | `${USERVER_BUILD_ALL_COMPONENTS}` |
| `USERVER_FEATURE_ODBC` | Provide asynchronous driver for ODBC | `${USERVER_BUILD_ALL_COMPONENTS}` |
| `USERVER_FEATURE_SCYLLADB` | Provide asynchronous driver for ScyllaDB | `${USERVER_BUILD_ALL_COMPONENTS}` |
| `USERVER_FEATURE_YDB` | Provide asynchronous driver for YDB | `${USERVER_BUILD_ALL_COMPONENTS}` AND C++ standard >= 20 |
| `USERVER_FEATURE_OTLP` | Provide Logger for OpenTelemetry protocol | `${USERVER_BUILD_ALL_COMPONENTS}` |
| `USERVER_FEATURE_GRPC_REFLECTION` | Provide reflection service for gRPC | `${USERVER_BUILD_ALL_COMPONENTS}` |
Expand Down
21 changes: 21 additions & 0 deletions scripts/scylla/ubuntu-install-scylla.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Exit on any error and treat unset variables as errors, print all commands
set -euox pipefail

SCYLLA_CPP_DRIVER_VERSION=${SCYLLA_CPP_DRIVER_VERSION:=1.1.0}
RELEASE_URL="https://github.com/scylladb/cpp-rs-driver/releases/download/v${SCYLLA_CPP_DRIVER_VERSION}"

apt update
apt install -y --no-install-recommends ca-certificates curl

# Prebuilt packages of the ScyllaDB cpp-rs-driver, which provides the
# Cassandra compatible C++ API
curl -fsSLO "${RELEASE_URL}/scylla_cpp_driver_${SCYLLA_CPP_DRIVER_VERSION}_amd64.deb"
curl -fsSLO "${RELEASE_URL}/scylla_cpp_driver-dev_${SCYLLA_CPP_DRIVER_VERSION}_amd64.deb"
apt install -y --no-install-recommends ./scylla_cpp_driver*_amd64.deb
rm -f ./scylla_cpp_driver*.deb

echo /usr/lib64 > /etc/ld.so.conf.d/scylla-cpp-driver.conf
ln -sf /usr/lib64/libscylladb.so /usr/lib/x86_64-linux-gnu/libscylla-cpp-driver.so
ldconfig
2 changes: 1 addition & 1 deletion scylla/src/storages/scylla/driver/session_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ DriverSessionImpl::DriverSessionImpl(
clients::dns::Resolver*,
std::optional<SslSecrets> ssl_secrets
)
: SessionImpl(std::move(id), session_config, config_source),
: SessionImpl(std::move(id), config_source),
session_config_(session_config),
ssl_secrets_(std::move(ssl_secrets)),
default_keyspace_(session_config.default_keyspace),
Expand Down
7 changes: 3 additions & 4 deletions scylla/src/storages/scylla/session_config.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <userver/storages/scylla/session_config.hpp>

#include <gmock/internal/gmock-internal-utils.h>
#include <netinet/in.h>

#include <userver/utils/text.hpp>
Expand Down Expand Up @@ -31,10 +30,10 @@ void IsValidDuration(const std::chrono::milliseconds& timeout, const char* field
}
}

constexpr Consistency kDefaultConsistency = Consistency::kLocalQuorum;
constexpr SerialConsistency kDefaultSerialConsistency = SerialConsistency::kLocalSerial;
[[maybe_unused]] constexpr Consistency kDefaultConsistency = Consistency::kLocalQuorum;
[[maybe_unused]] constexpr SerialConsistency kDefaultSerialConsistency = SerialConsistency::kLocalSerial;

std::optional<Consistency> ConsistencyFromRaw(uint16_t value) {
[[maybe_unused]] std::optional<Consistency> ConsistencyFromRaw(uint16_t value) {
switch (value) {
case 0x0000:
return Consistency::kAny;
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/storages/scylla/session_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ USERVER_NAMESPACE_BEGIN

namespace storages::scylla::impl {

SessionImpl::SessionImpl(std::string&& id, const SessionConfig session_config, dynamic_config::Source config_source)
SessionImpl::SessionImpl(std::string&& id, dynamic_config::Source config_source)
: id_(std::move(id)),
config_source_(config_source)
{};
Expand Down
2 changes: 1 addition & 1 deletion scylla/src/storages/scylla/session_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class SessionImpl {
virtual void ExecuteRawVoid(std::string_view query, const std::vector<Value>& params) = 0;

protected:
SessionImpl(std::string&& id, const SessionConfig session_config, dynamic_config::Source config_source);
SessionImpl(std::string&& id, dynamic_config::Source config_source);

private:
const std::string id_;
Expand Down
Loading