This is an automated email from the ASF dual-hosted git repository.
hgruszecki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git
The following commit(s) were added to refs/heads/master by this push:
new efa97e85 chore(repo): bump Rust version to 1.90 (#2182)
efa97e85 is described below
commit efa97e85c36d92f20298bdc8ea6806290aee89d0
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Fri Sep 19 16:21:17 2025 +0200
chore(repo): bump Rust version to 1.90 (#2182)
Besides that:
- Update all Dockerfiles to use Rust 1.90 (from 1.89)
- Refactor main Dockerfile to use ARG RUST_VERSION pattern for
consistency
- Ensure all Dockerfiles are compatible with sync-rust-version.sh script
---
Dockerfile | 5 +-
bdd/python/Dockerfile | 2 +-
bdd/rust/Dockerfile | 2 +-
core/ai/mcp/Dockerfile | 2 +-
.../frontend/src/components/app_content.rs | 1 +
.../frontend/src/components/chart/trend_chart.rs | 1 +
.../selectors/measurement_type_selector.rs | 1 +
core/bench/dashboard/server/Dockerfile | 2 +-
core/bench/src/analytics/metrics/individual.rs | 2 +-
core/common/src/types/consumer/mod.rs | 107 ---------------------
core/common/src/types/message/messages_batch.rs | 2 +-
core/connectors/runtime/Dockerfile | 2 +-
core/server/Dockerfile | 2 +-
core/server/src/configs/validators.rs | 12 ++-
.../streaming/segments/types/messages_batch_mut.rs | 2 +-
core/server/src/streaming/streams/storage.rs | 8 --
core/server/src/streaming/topics/storage.rs | 7 --
rust-toolchain.toml | 2 +-
18 files changed, 25 insertions(+), 137 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 41d315c6..ea5c99f9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,7 +15,10 @@
# specific language governing permissions and limitations
# under the License.
-FROM rust:1.89.0-alpine3.22 AS builder
+ARG RUST_VERSION=1.90
+ARG ALPINE_VERSION=3.22
+
+FROM rust:${RUST_VERSION}.0-alpine${ALPINE_VERSION} AS builder
RUN apk add musl-dev
WORKDIR /build
COPY . /build
diff --git a/bdd/python/Dockerfile b/bdd/python/Dockerfile
index 0241afdf..7b7b3770 100644
--- a/bdd/python/Dockerfile
+++ b/bdd/python/Dockerfile
@@ -16,7 +16,7 @@
# under the License.
# syntax=docker/dockerfile:1
-ARG RUST_VERSION=1.89
+ARG RUST_VERSION=1.90
FROM rust:${RUST_VERSION}-slim-trixie
RUN apt-get update && \
diff --git a/bdd/rust/Dockerfile b/bdd/rust/Dockerfile
index 63119a37..dab89761 100644
--- a/bdd/rust/Dockerfile
+++ b/bdd/rust/Dockerfile
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-ARG RUST_VERSION=1.89
+ARG RUST_VERSION=1.90
FROM rust:${RUST_VERSION}
WORKDIR /app
diff --git a/core/ai/mcp/Dockerfile b/core/ai/mcp/Dockerfile
index 276a5f09..4eb56da9 100644
--- a/core/ai/mcp/Dockerfile
+++ b/core/ai/mcp/Dockerfile
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-ARG RUST_VERSION=1.89
+ARG RUST_VERSION=1.90
ARG ALPINE_VERSION=3.22
FROM --platform=$BUILDPLATFORM
lukemathwalker/cargo-chef:latest-rust-${RUST_VERSION}-alpine AS chef
diff --git a/core/bench/dashboard/frontend/src/components/app_content.rs
b/core/bench/dashboard/frontend/src/components/app_content.rs
index ff45896e..3cc9ba07 100644
--- a/core/bench/dashboard/frontend/src/components/app_content.rs
+++ b/core/bench/dashboard/frontend/src/components/app_content.rs
@@ -34,6 +34,7 @@ use yew_router::prelude::use_navigator;
// Props definitions
#[derive(Properties, PartialEq)]
+#[allow(dead_code)]
pub struct AppContentProps {}
#[hook]
diff --git a/core/bench/dashboard/frontend/src/components/chart/trend_chart.rs
b/core/bench/dashboard/frontend/src/components/chart/trend_chart.rs
index c981e587..0c2649b5 100644
--- a/core/bench/dashboard/frontend/src/components/chart/trend_chart.rs
+++ b/core/bench/dashboard/frontend/src/components/chart/trend_chart.rs
@@ -27,6 +27,7 @@ use yew::prelude::*;
use yew_hooks::use_size;
#[derive(Properties, PartialEq)]
+#[allow(dead_code)]
pub struct TrendChartProps {
pub params_identifier: String,
pub measurement_type: MeasurementType,
diff --git
a/core/bench/dashboard/frontend/src/components/selectors/measurement_type_selector.rs
b/core/bench/dashboard/frontend/src/components/selectors/measurement_type_selector.rs
index 5d51ca44..c279647e 100644
---
a/core/bench/dashboard/frontend/src/components/selectors/measurement_type_selector.rs
+++
b/core/bench/dashboard/frontend/src/components/selectors/measurement_type_selector.rs
@@ -47,6 +47,7 @@ impl FromStr for MeasurementType {
}
#[derive(Properties, PartialEq)]
+#[allow(dead_code)]
pub struct MeasurementTypeSelectorProps {
pub selected_measurement: MeasurementType,
pub on_measurement_select: Callback<MeasurementType>,
diff --git a/core/bench/dashboard/server/Dockerfile
b/core/bench/dashboard/server/Dockerfile
index 6673f19b..7b255de1 100644
--- a/core/bench/dashboard/server/Dockerfile
+++ b/core/bench/dashboard/server/Dockerfile
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-ARG RUST_VERSION=1.89
+ARG RUST_VERSION=1.90
# Build stage
FROM rust:${RUST_VERSION}-slim-trixie AS builder
diff --git a/core/bench/src/analytics/metrics/individual.rs
b/core/bench/src/analytics/metrics/individual.rs
index f9746a0e..7ab7c61d 100644
--- a/core/bench/src/analytics/metrics/individual.rs
+++ b/core/bench/src/analytics/metrics/individual.rs
@@ -231,7 +231,7 @@ fn calculate_latency_metrics(
let avg = latencies_ms.iter().sum::<f64>() / latencies_ms.len() as f64;
let len = latencies_ms.len() / 2;
- let median = if latencies_ms.len() % 2 == 0 {
+ let median = if latencies_ms.len().is_multiple_of(2) {
f64::midpoint(latencies_ms[len - 1], latencies_ms[len])
} else {
latencies_ms[len]
diff --git a/core/common/src/types/consumer/mod.rs
b/core/common/src/types/consumer/mod.rs
index 0ed089fa..2a3610c5 100644
--- a/core/common/src/types/consumer/mod.rs
+++ b/core/common/src/types/consumer/mod.rs
@@ -16,113 +16,6 @@
* under the License.
*/
-use crate::BytesSerializable;
-use crate::Identifier;
-use crate::Validatable;
-use crate::error::IggyError;
-use bytes::{BufMut, Bytes, BytesMut};
-use serde::{Deserialize, Serialize};
-use serde_with::{DisplayFromStr, serde_as};
-use std::fmt::Display;
-
pub(crate) mod consumer_group;
pub(crate) mod consumer_kind;
pub(crate) mod consumer_offset_info;
-
-/// `Consumer` represents the type of consumer that is consuming a message.
-/// It can be either a `Consumer` or a `ConsumerGroup`.
-/// It consists of the following fields:
-/// - `kind`: the type of consumer. It can be either `Consumer` or
`ConsumerGroup`.
-/// - `id`: the unique identifier of the consumer.
-#[serde_as]
-#[derive(Debug, Serialize, Deserialize, PartialEq, Default, Clone)]
-pub struct Consumer {
- /// The type of consumer. It can be either `Consumer` or `ConsumerGroup`.
- #[serde(skip)]
- pub kind: ConsumerKind,
- /// The unique identifier of the consumer.
- #[serde_as(as = "DisplayFromStr")]
- #[serde(default = "default_id")]
- pub id: Identifier,
-}
-
-/// `ConsumerKind` is an enum that represents the type of consumer.
-#[derive(Debug, Serialize, Deserialize, PartialEq, Default, Copy, Clone)]
-#[serde(rename_all = "snake_case")]
-pub enum ConsumerKind {
- /// `Consumer` represents a regular consumer.
- #[default]
- Consumer,
- /// `ConsumerGroup` represents a consumer group.
- ConsumerGroup,
-}
-
-fn default_id() -> Identifier {
- Identifier::numeric(1).unwrap()
-}
-
-impl Validatable<IggyError> for Consumer {
- fn validate(&self) -> Result<(), IggyError> {
- Ok(())
- }
-}
-
-impl BytesSerializable for Consumer {
- fn to_bytes(&self) -> Bytes {
- let id_bytes = self.id.to_bytes();
- let mut bytes = BytesMut::with_capacity(1 + id_bytes.len());
- bytes.put_u8(self.kind.as_code());
- bytes.put_slice(&id_bytes);
- bytes.freeze()
- }
-
- fn from_bytes(bytes: Bytes) -> Result<Self, IggyError>
- where
- Self: Sized,
- {
- if bytes.len() < 4 {
- return Err(IggyError::InvalidCommand);
- }
-
- let kind = ConsumerKind::from_code(bytes[0])?;
- let id = Identifier::from_bytes(bytes.slice(1..))?;
- let consumer = Consumer { kind, id };
- consumer.validate()?;
- Ok(consumer)
- }
-}
-
-/// `ConsumerKind` is an enum that represents the type of consumer.
-impl ConsumerKind {
- /// Returns the code of the `ConsumerKind`.
- pub fn as_code(&self) -> u8 {
- match self {
- ConsumerKind::Consumer => 1,
- ConsumerKind::ConsumerGroup => 2,
- }
- }
-
- /// Creates a new `ConsumerKind` from the code.
- pub fn from_code(code: u8) -> Result<Self, IggyError> {
- match code {
- 1 => Ok(ConsumerKind::Consumer),
- 2 => Ok(ConsumerKind::ConsumerGroup),
- _ => Err(IggyError::InvalidCommand),
- }
- }
-}
-
-impl Display for Consumer {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(f, "{}|{}", self.kind, self.id)
- }
-}
-
-impl Display for ConsumerKind {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- ConsumerKind::Consumer => write!(f, "consumer"),
- ConsumerKind::ConsumerGroup => write!(f, "consumer_group"),
- }
- }
-}
diff --git a/core/common/src/types/message/messages_batch.rs
b/core/common/src/types/message/messages_batch.rs
index e429a248..3d03159e 100644
--- a/core/common/src/types/message/messages_batch.rs
+++ b/core/common/src/types/message/messages_batch.rs
@@ -212,7 +212,7 @@ impl Validatable<IggyError> for IggyMessagesBatch {
let indexes_count = self.indexes.count();
let indexes_size = self.indexes.size();
- if indexes_size % INDEX_SIZE as u32 != 0 {
+ if !indexes_size.is_multiple_of(INDEX_SIZE as u32) {
tracing::error!(
"Indexes size {} is not a multiple of index size {}",
indexes_size,
diff --git a/core/connectors/runtime/Dockerfile
b/core/connectors/runtime/Dockerfile
index c03fba96..6a49b48c 100644
--- a/core/connectors/runtime/Dockerfile
+++ b/core/connectors/runtime/Dockerfile
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-ARG RUST_VERSION=1.89
+ARG RUST_VERSION=1.90
ARG ALPINE_VERSION=3.22
FROM --platform=$BUILDPLATFORM
lukemathwalker/cargo-chef:latest-rust-${RUST_VERSION}-alpine AS chef
diff --git a/core/server/Dockerfile b/core/server/Dockerfile
index 8ae53e14..0a0d165c 100644
--- a/core/server/Dockerfile
+++ b/core/server/Dockerfile
@@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
-ARG RUST_VERSION=1.89
+ARG RUST_VERSION=1.90
ARG ALPINE_VERSION=3.22
# ── from-source path (unchanged)
──────────────────────────────────────────────
diff --git a/core/server/src/configs/validators.rs
b/core/server/src/configs/validators.rs
index 7377e19a..19eacc48 100644
--- a/core/server/src/configs/validators.rs
+++ b/core/server/src/configs/validators.rs
@@ -139,7 +139,7 @@ impl Validatable<ConfigError> for PartitionConfig {
return Err(ConfigError::InvalidConfiguration);
}
- if self.messages_required_to_save % 32 != 0 {
+ if !self.messages_required_to_save.is_multiple_of(32) {
eprintln!(
"Configured system.partition.messages_required_to_save {} is
not a multiple of 32",
self.messages_required_to_save
@@ -155,7 +155,11 @@ impl Validatable<ConfigError> for PartitionConfig {
return Err(ConfigError::InvalidConfiguration);
}
- if self.size_of_messages_required_to_save.as_bytes_u64() % 512 != 0 {
+ if !self
+ .size_of_messages_required_to_save
+ .as_bytes_u64()
+ .is_multiple_of(512)
+ {
eprintln!(
"Configured system.partition.size_of_messages_required_to_save
{} is not a multiple of 512 B",
self.size_of_messages_required_to_save
@@ -178,7 +182,7 @@ impl Validatable<ConfigError> for SegmentConfig {
return Err(ConfigError::InvalidConfiguration);
}
- if self.size.as_bytes_u64() % 512 != 0 {
+ if !self.size.as_bytes_u64().is_multiple_of(512) {
eprintln!(
"Configured system.segment.size {} B is not a multiple of 512
B",
self.size.as_bytes_u64()
@@ -324,7 +328,7 @@ impl Validatable<ConfigError> for MemoryPoolConfig {
return Err(ConfigError::InvalidConfiguration);
}
- if self.enabled && self.size.as_bytes_u64() % DEFAULT_PAGE_SIZE != 0 {
+ if self.enabled &&
!self.size.as_bytes_u64().is_multiple_of(DEFAULT_PAGE_SIZE) {
error!(
"Configured system.memory_pool.size {} B is not a multiple of
default page size {} B",
self.size.as_bytes_u64(),
diff --git a/core/server/src/streaming/segments/types/messages_batch_mut.rs
b/core/server/src/streaming/segments/types/messages_batch_mut.rs
index 2375f541..e74a9929 100644
--- a/core/server/src/streaming/segments/types/messages_batch_mut.rs
+++ b/core/server/src/streaming/segments/types/messages_batch_mut.rs
@@ -628,7 +628,7 @@ impl IggyMessagesBatchMut {
let indexes_count = self.indexes.count();
let indexes_size = self.indexes.size();
- if indexes_size % INDEX_SIZE as u32 != 0 {
+ if !indexes_size.is_multiple_of(INDEX_SIZE as u32) {
error!(
"Indexes size {} is not a multiple of index size {}",
indexes_size, INDEX_SIZE
diff --git a/core/server/src/streaming/streams/storage.rs
b/core/server/src/streaming/streams/storage.rs
index 3e3e5e76..19110dbb 100644
--- a/core/server/src/streaming/streams/storage.rs
+++ b/core/server/src/streaming/streams/storage.rs
@@ -25,8 +25,6 @@ use ahash::AHashSet;
use error_set::ErrContext;
use futures::future::join_all;
use iggy_common::IggyError;
-use iggy_common::IggyTimestamp;
-use serde::{Deserialize, Serialize};
use std::path::Path;
use std::sync::Arc;
use tokio::fs;
@@ -37,12 +35,6 @@ use tracing::{error, info, warn};
#[derive(Debug)]
pub struct FileStreamStorage;
-#[derive(Debug, Serialize, Deserialize)]
-struct StreamData {
- name: String,
- created_at: IggyTimestamp,
-}
-
impl StreamStorage for FileStreamStorage {
async fn load(&self, stream: &mut Stream, mut state: StreamState) ->
Result<(), IggyError> {
info!("Loading stream with ID: {} from disk...", stream.stream_id);
diff --git a/core/server/src/streaming/topics/storage.rs
b/core/server/src/streaming/topics/storage.rs
index 1cc33310..ecb81640 100644
--- a/core/server/src/streaming/topics/storage.rs
+++ b/core/server/src/streaming/topics/storage.rs
@@ -29,7 +29,6 @@ use futures::future::join_all;
use iggy_common::IggyError;
use iggy_common::locking::IggySharedMut;
use iggy_common::locking::IggySharedMutFn;
-use serde::{Deserialize, Serialize};
use std::path::Path;
use std::sync::Arc;
use tokio::fs;
@@ -40,12 +39,6 @@ use tracing::{error, info, warn};
#[derive(Debug)]
pub struct FileTopicStorage;
-#[derive(Debug, Serialize, Deserialize)]
-struct ConsumerGroupData {
- id: u32,
- name: String,
-}
-
impl TopicStorage for FileTopicStorage {
async fn load(&self, topic: &mut Topic, mut state: TopicState) ->
Result<(), IggyError> {
info!("Loading topic {} from disk...", topic);
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 98cc1a20..f3e321d7 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -16,6 +16,6 @@
# under the License.
[toolchain]
-channel = "1.89.0"
+channel = "1.90.0"
components = ["rustfmt", "clippy"]
profile = "default"