This is an automated email from the ASF dual-hosted git repository.
maciej 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 cca86fe26 feat(ci): impl typos automatically checks (#2803)
cca86fe26 is described below
commit cca86fe26d5edd8b021d5402f44b0e0e247ce464
Author: Svecco <[email protected]>
AuthorDate: Wed Feb 25 17:02:58 2026 +0800
feat(ci): impl typos automatically checks (#2803)
Closes #2802
---
.github/workflows/_common.yml | 24 ++++
.pre-commit-config.yaml | 8 ++
.typos.toml | 136 +++++++++++++++++++++
CONTRIBUTING.md | 12 ++
core/ai/mcp/README.md | 2 +-
core/bench/src/actors/producing_consumer/mod.rs | 2 +-
...er.rs => typed_benchmark_producing_consumer.rs} | 0
core/bench/src/benchmarks/common.rs | 2 +-
core/cli/src/args/user.rs | 8 +-
core/common/src/commands/messages/send_messages.rs | 24 +++-
core/consensus/src/plane_helpers.rs | 2 +-
.../tests/cli/user/test_user_create_command.rs | 4 +-
.../cli/user/test_user_permissions_command.rs | 4 +-
.../http_config_provider/config_wrapped.toml | 2 +-
.../scenarios/segment_rotation_race_scenario.rs | 2 +-
core/sdk/src/clients/producer_config.rs | 2 +-
.../handlers/messages/send_messages_handler.rs | 4 +-
core/server/src/io/storage.rs | 25 +++-
.../message-headers/message-compression/README.md | 2 +-
foreign/csharp/Iggy_SDK.sln.DotSettings | 8 +-
...Exception.cs => InvalidBaseAddressException.cs} | 0
...yClientExtenstion.cs => IggyClientExtension.cs} | 2 +-
.../IdentifiersByteSerializationTests.cs | 2 +-
foreign/csharp/scripts/pack.sh | 2 +-
...anagament.go => tcp_access_token_management.go} | 0
...nts_managament.go => tcp_clients_management.go} | 0
...agament.go => tcp_consumer_group_management.go} | 0
...fset_managament.go => tcp_offset_management.go} | 0
...n_managament.go => tcp_partition_management.go} | 0
...ion_managament.go => tcp_session_management.go} | 0
...ream_managament.go => tcp_stream_management.go} | 0
...topic_managament.go => tcp_topic_management.go} | 0
...p_user_managament.go => tcp_user_management.go} | 0
foreign/go/contracts/{offets.go => offsets.go} | 0
foreign/go/samples/consumer/README.md | 4 +-
foreign/go/samples/consumer/consumer.go | 4 +-
foreign/go/samples/producer/README.md | 4 +-
.../iggy-connector-pinot/integration-test.sh | 2 +-
foreign/node/src/client/client.socket.ts | 2 +-
foreign/node/src/wire/client/client.utils.ts | 4 +-
foreign/node/src/wire/command.code.ts | 2 +-
foreign/node/src/wire/message/header.utils.ts | 2 +-
foreign/node/src/wire/message/poll.utils.ts | 2 +-
web/justfile | 6 +-
.../components/Modals/DeletePartitionsModal.svelte | 2 +-
.../components/Modals/StreamSettingsModal.svelte | 2 +-
.../components/Modals/TopicSettingsModal.svelte | 2 +-
web/src/lib/components/PermissionsManager.svelte | 4 +-
web/src/lib/utils/addOnKeyDownListener.ts | 2 +-
49 files changed, 273 insertions(+), 50 deletions(-)
diff --git a/.github/workflows/_common.yml b/.github/workflows/_common.yml
index 2a1a3aa7e..ddd18e9e8 100644
--- a/.github/workflows/_common.yml
+++ b/.github/workflows/_common.yml
@@ -220,6 +220,20 @@ jobs:
- name: Check TOML formatting
run: ./scripts/ci/taplo.sh --check --ci
+ typos:
+ name: Check typos
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ env:
+ FORCE_COLOR: 1
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Check typos
+ uses: crate-ci/[email protected]
+
summary:
name: Common checks summary
needs:
@@ -234,6 +248,7 @@ jobs:
trailing-whitespace,
trailing-newline,
toml-format,
+ typos,
]
if: always()
runs-on: ubuntu-latest
@@ -344,6 +359,15 @@ jobs:
echo "| ⏭️ TOML Format | $TOML_FORMAT | Check skipped |" >>
$GITHUB_STEP_SUMMARY
fi
+ TYPOS="${{ needs.typos.result }}"
+ if [ "$TYPOS" = "success" ]; then
+ echo "| ✅ Typos Check | success | All files are free of spelling
typos |" >> $GITHUB_STEP_SUMMARY
+ elif [ "$TYPOS" = "failure" ]; then
+ echo "| ❌ Typos Check | failure | Spelling typos detected (run
'typos -w' to fix) |" >> $GITHUB_STEP_SUMMARY
+ else
+ echo "| ⏭️ Typos Check | $TYPOS | Check skipped |" >>
$GITHUB_STEP_SUMMARY
+ fi
+
echo "" >> $GITHUB_STEP_SUMMARY
# Overall status
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5fb429155..41c5bc91c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -103,6 +103,14 @@ repos:
types: [text]
pass_filenames: false
+ - id: typos
+ name: typos (spelling check)
+ entry: typos
+ args: [ "-w" ]
+ language: system
+ types: [ text ]
+ pass_filenames: false
+
- id: taplo
name: taplo (TOML format)
entry: ./scripts/ci/taplo.sh
diff --git a/.typos.toml b/.typos.toml
new file mode 100644
index 000000000..bb4d5e4aa
--- /dev/null
+++ b/.typos.toml
@@ -0,0 +1,136 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Whitelist valid technical terms to avoid typos false positives
+[default.extend-words]
+# Valid bi-directional map data structure term
+bimap = "bimap"
+# Valid compression algorithm abbreviation
+flate = "flate"
+# Valid Rust compression crate name
+flate2 = "flate2"
+# Valid project-specific technical acronym
+bais = "bais"
+# Legitimate abbreviation for "Strategy" (e.g. pollingStrat)
+Strat = "Strat"
+# Same as above
+strin = "strin"
+
+# Exclude auto-generated/non-editable files from typos check
+[files]
+extend-exclude = [
+ # Auto-generated npm lockfile (pnpm)
+ "**/pnpm-lock.yaml",
+ # Auto-generated npm lockfile (npm)
+ "**/package-lock.json",
+ # Auto-generated Rust dependency lockfile
+ "**/Cargo.lock",
+ # Changelog (may contain intentional version/typo references)
+ "**/CHANGELOG.md",
+ # Auto-generated test snapshot files
+ "**/*.snap",
+ # Static test fixture files (no manual spelling review needed)
+ "**/fixtures/**",
+ # Deliberate spelling mistake, used to test Levenshtein Distance.
+ "core/configs/src/configs_impl/typed_env_provider.rs",
+ # JetBrains IDE solution settings
+ "*.DotSettings",
+ # Rust build output directory
+ "target*",
+ # JetBrains IDE configuration directory
+ ".idea/",
+ # VS Code configuration directory
+ ".vscode/",
+ # Visual Studio configuration directory
+ ".vs/",
+ # Zed IDE configuration directory
+ ".zed/",
+ # macOS system file (stores custom folder attributes)
+ ".DS_Store",
+ # Gradle build cache directory
+ ".gradle",
+ # Local data directory (project-specific)
+ "local_data*",
+ # Local state directory (project-specific)
+ "local_state*",
+ # Test logs output directory
+ "test_logs/",
+ # Benchmark results directory (root level)
+ "/bench_*",
+ # SDK errors table output directory
+ "/sdk/errors_table/",
+ # Rust Clippy analysis results file
+ "/rust-clippy-results.sarif",
+ # Performance test results file/directory
+ "/performance_results*",
+ # Environment variables file (may contain secrets)
+ ".env",
+ # Direnv environment configuration file
+ ".envrc",
+ # Iggy release output directory
+ "/iggy_release",
+ # Iggy temporary release directory
+ "/iggy_release_tmp",
+ # Compiled object files directory (any depth)
+ "/**/obj",
+ # Compiled binary files directory (any depth)
+ "/**/bin",
+ # Exception: Keep Python SDK bin directory
+ "!/foreign/python/src/bin",
+ # IntelliJ IDEA module file
+ "*.iml",
+ # C++ SDK build directory
+ "foreign/cpp/build",
+ # Java SDK build directory
+ "foreign/java/**/build",
+ # Java SDK output directory
+ "foreign/java/**/out",
+ # Node.js SDK distribution directory
+ "foreign/node/**/dist",
+ # Node.js npm debug log file
+ "foreign/node/npm-debug.log*",
+ # Node.js npm cache directory
+ "foreign/node/.npm",
+ # Node.js dependencies directory (any depth)
+ "**/node_modules",
+ # JetBrains user-specific IDE settings (any depth)
+ "/**/*.DotSettings.user",
+ # Windows executable file
+ "*.exe",
+ # Windows executable backup file
+ "*.exe~",
+ # Windows dynamic link library
+ "*.dll",
+ # Unix/Linux shared object library
+ "*.so",
+ # macOS dynamic library
+ "*.dylib",
+ # GNU Libtool library file
+ "*.lai",
+ # GNU Libtool library file
+ "*.la",
+ # Unix/Linux static library
+ "*.a",
+ # Windows static library
+ "*.lib",
+ # General compiled output file
+ "*.out",
+ # Go workspace file
+ "go.work",
+ # Benchmark dashboard frontend build output
+ "core/bench/dashboard/frontend/dist",
+]
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4316959b2..a10060c65 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -51,6 +51,18 @@ cargo sort --workspace
For other languages, check the README in `foreign/{language}/` (e.g.,
`foreign/go/`, `foreign/java/`).
+### Typos Checks
+
+We use [typos](https://github.com/crate-ci/typos):
+
+```bash
+cargo install typos-cli --locked
+typos
+typos --write-changes
+```
+
+If it's indeed not a typo, you can set an exception in `.typos.toml`.
+
### Pre-commit Hooks
We use [prek](https://github.com/j178/prek):
diff --git a/core/ai/mcp/README.md b/core/ai/mcp/README.md
index 7c2097815..6e45d2f69 100644
--- a/core/ai/mcp/README.md
+++ b/core/ai/mcp/README.md
@@ -48,7 +48,7 @@ update = true
delete = true
```
-Keep in mind that either of `toml`, `yaml`, or `json` formats are supported
for the configuration file. The path to the configuration can be overriden by
`IGGY_MCP_CONFIG_PATH` environment variable. Each configuration section can be
also additionally updated by using the following convention
`IGGY_MCP_SECTION_NAME.KEY_NAME` e.g. `IGGY_MCP_IGGY_USERNAME` and so on.
+Keep in mind that either of `toml`, `yaml`, or `json` formats are supported
for the configuration file. The path to the configuration can be overridden by
`IGGY_MCP_CONFIG_PATH` environment variable. Each configuration section can be
also additionally updated by using the following convention
`IGGY_MCP_SECTION_NAME.KEY_NAME` e.g. `IGGY_MCP_IGGY_USERNAME` and so on.
Here's the example configuration to be used with Claude Desktop:
diff --git a/core/bench/src/actors/producing_consumer/mod.rs
b/core/bench/src/actors/producing_consumer/mod.rs
index 165a6f881..ebd5ca0e0 100644
--- a/core/bench/src/actors/producing_consumer/mod.rs
+++ b/core/bench/src/actors/producing_consumer/mod.rs
@@ -17,5 +17,5 @@
*/
pub mod benchmark_producing_consumer;
-pub mod typed_banchmark_producing_consumer;
+pub mod typed_benchmark_producing_consumer;
pub use benchmark_producing_consumer::BenchmarkProducingConsumer;
diff --git
a/core/bench/src/actors/producing_consumer/typed_banchmark_producing_consumer.rs
b/core/bench/src/actors/producing_consumer/typed_benchmark_producing_consumer.rs
similarity index 100%
rename from
core/bench/src/actors/producing_consumer/typed_banchmark_producing_consumer.rs
rename to
core/bench/src/actors/producing_consumer/typed_benchmark_producing_consumer.rs
diff --git a/core/bench/src/benchmarks/common.rs
b/core/bench/src/benchmarks/common.rs
index 69a20cc62..48025188a 100644
--- a/core/bench/src/benchmarks/common.rs
+++ b/core/bench/src/benchmarks/common.rs
@@ -22,7 +22,7 @@ use crate::{
actors::{
consumer::typed_benchmark_consumer::TypedBenchmarkConsumer,
producer::typed_benchmark_producer::TypedBenchmarkProducer,
-
producing_consumer::typed_banchmark_producing_consumer::TypedBenchmarkProducingConsumer,
+
producing_consumer::typed_benchmark_producing_consumer::TypedBenchmarkProducingConsumer,
},
args::common::IggyBenchArgs,
utils::finish_condition::{BenchmarkFinishCondition,
BenchmarkFinishConditionMode},
diff --git a/core/cli/src/args/user.rs b/core/cli/src/args/user.rs
index 40c8118cf..bce84be7f 100644
--- a/core/cli/src/args/user.rs
+++ b/core/cli/src/args/user.rs
@@ -142,7 +142,7 @@ pub(crate) struct UserCreateArgs {
///
/// Stream permissions are defined by each stream separately. Setting
permission for stream
/// allows to set each permission individually, by default, if no
permission is provided
- /// (only stream ID is provided) all are set fo false. Stream permission
format consists
+ /// (only stream ID is provided) all are set to false. Stream permission
format consists
/// of stream ID followed by colon (:) and list of permissions separated
by comma (,).
/// For each stream permission there's long variant (same as in SDK in
/// iggy::models::permissions::StreamPermissions) and short variant.
@@ -153,7 +153,7 @@ pub(crate) struct UserCreateArgs {
/// For each stream one can set permissions for each topic separately.
Topic permissions
/// are defined for each topic separately. Setting permission for topic
allows to set each
/// permission individually, by default, if no permission is provided
(only topic ID is provided)
- /// all are set fo false. Topic permission format consists of topic ID
followed by colon (:)
+ /// all are set to false. Topic permission format consists of topic ID
followed by colon (:)
/// and list of permissions separated by comma (,). For each topic
permission there's long
/// variant (same as in SDK in
iggy::models::permissions::TopicPermissions) and short variant.
/// Topic permissions are separated by hash (#) after stream permissions.
@@ -273,7 +273,7 @@ pub(crate) struct UserPermissionsArgs {
///
/// Stream permissions are defined by each stream separately. Setting
permission for stream
/// allows to set each permission individually, by default, if no
permission is provided
- /// (only stream ID is provided) all are set fo false. Stream permission
format consists
+ /// (only stream ID is provided) all are set to false. Stream permission
format consists
/// of stream ID followed by colon (:) and list of permissions separated
by comma (,).
/// For each stream permission there's long variant (same as in SDK in
/// iggy::models::permissions::StreamPermissions) and short variant.
@@ -284,7 +284,7 @@ pub(crate) struct UserPermissionsArgs {
/// For each stream one can set permissions for each topic separately.
Topic permissions
/// are defined for each topic separately. Setting permission for topic
allows to set each
/// permission individually, by default, if no permission is provided
(only topic ID is provided)
- /// all are set fo false. Topic permission format consists of topic ID
followed by colon (:)
+ /// all are set to false. Topic permission format consists of topic ID
followed by colon (:)
/// and list of permissions separated by comma (,). For each topic
permission there's long
/// variant (same as in SDK in
iggy::models::permissions::TopicPermissions) and short variant.
/// Topic permissions are separated by hash (#) after stream permissions.
diff --git a/core/common/src/commands/messages/send_messages.rs
b/core/common/src/commands/messages/send_messages.rs
index c4f2913e3..91a6aa43c 100644
--- a/core/common/src/commands/messages/send_messages.rs
+++ b/core/common/src/commands/messages/send_messages.rs
@@ -298,8 +298,8 @@ impl<'de> Deserialize<'de> for SendMessages {
let mut iggy_messages = Vec::new();
for msg in message_data {
- let id =
parse_message_id(msg.get("id")).map_err(|errror| {
- de::Error::custom(format!("Invalid message
ID: {errror}"))
+ let id =
parse_message_id(msg.get("id")).map_err(|error| {
+ de::Error::custom(format!("Invalid message
ID: {error}"))
})?;
let payload = msg
@@ -421,6 +421,26 @@ fn parse_message_id(value: Option<&serde_json::Value>) ->
Result<u128, String> {
mod tests {
use super::*;
+ #[test]
+ fn deserialize_send_messages_with_invalid_uuid_fails() {
+ let json_data = serde_json::json!({
+ "partitioning": {
+ "kind": "balanced",
+ "value": ""
+ },
+ "messages": [{
+ "id": "114514-invalid-uuid-1919810",
+ "payload": "SGVsbG8gSWdneSE=",
+ "user_headers": [{
+ "key": "content-type",
+ "value": "text/plain"
+ }]
+ }]
+ });
+
+ assert!(serde_json::from_value::<SendMessages>(json_data).is_err());
+ }
+
#[test]
fn key_of_type_balanced_should_have_empty_value() {
let key = Partitioning::balanced();
diff --git a/core/consensus/src/plane_helpers.rs
b/core/consensus/src/plane_helpers.rs
index 2307accb1..cc4ec3e25 100644
--- a/core/consensus/src/plane_helpers.rs
+++ b/core/consensus/src/plane_helpers.rs
@@ -21,7 +21,7 @@ use iggy_common::message::Message;
use message_bus::MessageBus;
use std::ops::AsyncFnOnce;
-// TODO: Rework all of those helpers, once the boundries are more clear and we
have a better picture of the commonalities between all of the planes.
+// TODO: Rework all of those helpers, once the boundaries are more clear and
we have a better picture of the commonalities between all of the planes.
/// Shared pipeline-first request flow used by metadata and partitions.
pub async fn pipeline_prepare_common<C, F>(
diff --git a/core/integration/tests/cli/user/test_user_create_command.rs
b/core/integration/tests/cli/user/test_user_create_command.rs
index 993fb0db2..f880cf46a 100644
--- a/core/integration/tests/cli/user/test_user_create_command.rs
+++ b/core/integration/tests/cli/user/test_user_create_command.rs
@@ -323,7 +323,7 @@ Options:
{CLAP_INDENT}
Stream permissions are defined by each stream separately. Setting
permission for stream
allows to set each permission individually, by default, if no
permission is provided
- (only stream ID is provided) all are set fo false. Stream permission
format consists
+ (only stream ID is provided) all are set to false. Stream permission
format consists
of stream ID followed by colon (:) and list of permissions separated
by comma (,).
For each stream permission there's long variant (same as in SDK in
iggy::models::permissions::StreamPermissions) and short variant.
@@ -334,7 +334,7 @@ Options:
For each stream one can set permissions for each topic separately.
Topic permissions
are defined for each topic separately. Setting permission for topic
allows to set each
permission individually, by default, if no permission is provided
(only topic ID is provided)
- all are set fo false. Topic permission format consists of topic ID
followed by colon (:)
+ all are set to false. Topic permission format consists of topic ID
followed by colon (:)
and list of permissions separated by comma (,). For each topic
permission there's long
variant (same as in SDK in
iggy::models::permissions::TopicPermissions) and short variant.
Topic permissions are separated by hash (#) after stream permissions.
diff --git a/core/integration/tests/cli/user/test_user_permissions_command.rs
b/core/integration/tests/cli/user/test_user_permissions_command.rs
index 116dbb665..e213958c5 100644
--- a/core/integration/tests/cli/user/test_user_permissions_command.rs
+++ b/core/integration/tests/cli/user/test_user_permissions_command.rs
@@ -293,7 +293,7 @@ Options:
{CLAP_INDENT}
Stream permissions are defined by each stream separately. Setting
permission for stream
allows to set each permission individually, by default, if no
permission is provided
- (only stream ID is provided) all are set fo false. Stream permission
format consists
+ (only stream ID is provided) all are set to false. Stream permission
format consists
of stream ID followed by colon (:) and list of permissions separated
by comma (,).
For each stream permission there's long variant (same as in SDK in
iggy::models::permissions::StreamPermissions) and short variant.
@@ -304,7 +304,7 @@ Options:
For each stream one can set permissions for each topic separately.
Topic permissions
are defined for each topic separately. Setting permission for topic
allows to set each
permission individually, by default, if no permission is provided
(only topic ID is provided)
- all are set fo false. Topic permission format consists of topic ID
followed by colon (:)
+ all are set to false. Topic permission format consists of topic ID
followed by colon (:)
and list of permissions separated by comma (,). For each topic
permission there's long
variant (same as in SDK in
iggy::models::permissions::TopicPermissions) and short variant.
Topic permissions are separated by hash (#) after stream permissions.
diff --git
a/core/integration/tests/connectors/http_config_provider/config_wrapped.toml
b/core/integration/tests/connectors/http_config_provider/config_wrapped.toml
index 843377bda..4a012c4cb 100644
--- a/core/integration/tests/connectors/http_config_provider/config_wrapped.toml
+++ b/core/integration/tests/connectors/http_config_provider/config_wrapped.toml
@@ -21,4 +21,4 @@ base_url = "http://localhost:8080"
[connectors.response]
data_path = "data"
-errot_path = "error"
+error_path = "error"
diff --git
a/core/integration/tests/server/scenarios/segment_rotation_race_scenario.rs
b/core/integration/tests/server/scenarios/segment_rotation_race_scenario.rs
index da35c3374..a0359b31b 100644
--- a/core/integration/tests/server/scenarios/segment_rotation_race_scenario.rs
+++ b/core/integration/tests/server/scenarios/segment_rotation_race_scenario.rs
@@ -16,7 +16,7 @@
* under the License.
*/
-//! This scenario fixes the bug that occured when concurrent message sends
race with segment rotation:
+//! This scenario fixes the bug that occurred when concurrent message sends
race with segment rotation:
//! 1. Task A commits journal, ensures indexes for segment N, starts async save
//! 2. Task B's send triggers segment rotation (handle_full_segment)
//! 3. Task B clears segment N's indexes or creates segment N+1 with None
indexes
diff --git a/core/sdk/src/clients/producer_config.rs
b/core/sdk/src/clients/producer_config.rs
index 26d4bed6f..9034a6b0b 100644
--- a/core/sdk/src/clients/producer_config.rs
+++ b/core/sdk/src/clients/producer_config.rs
@@ -143,7 +143,7 @@ pub struct BackgroundConfig {
#[derive(Clone, Builder)]
pub struct DirectConfig {
/// Maximum number of messages to pack into **one** synchronous request.
- /// `0` ⇒ MAX_BATCH_LENTH().
+ /// `0` ⇒ MAX_BATCH_LENGTH().
#[builder(default = 1000)]
pub batch_length: u32,
/// How long to wait for more messages before flushing the current set.
diff --git a/core/server/src/binary/handlers/messages/send_messages_handler.rs
b/core/server/src/binary/handlers/messages/send_messages_handler.rs
index 7bac42805..652b99a7c 100644
--- a/core/server/src/binary/handlers/messages/send_messages_handler.rs
+++ b/core/server/src/binary/handlers/messages/send_messages_handler.rs
@@ -166,14 +166,14 @@ impl ServerCommandHandler for SendMessages {
let namespace = IggyNamespace::new(topic.stream_id, topic.topic_id,
partition_id);
let user_id = session.get_user_id();
- let unsupport_socket_transfer = matches!(
+ let unsupported_socket_transfer = matches!(
self.partitioning.kind,
PartitioningKind::Balanced | PartitioningKind::MessagesKey
);
let enabled_socket_migration = shard.config.tcp.socket_migration;
if enabled_socket_migration
- && !(session.is_migrated() || unsupport_socket_transfer)
+ && !(session.is_migrated() || unsupported_socket_transfer)
&& let Some(target_shard) = shard.find_shard(&namespace)
&& target_shard.id != shard.id
{
diff --git a/core/server/src/io/storage.rs b/core/server/src/io/storage.rs
index bc36384b0..c065e5008 100644
--- a/core/server/src/io/storage.rs
+++ b/core/server/src/io/storage.rs
@@ -48,7 +48,7 @@ impl OpenOpts {
}
}
- pub fn permament(path: String) -> Self {
+ pub fn permanent(path: String) -> Self {
Self {
keep_fd: true,
path,
@@ -146,3 +146,26 @@ impl Storage for BlockStorage {
Ok(buf)
}
}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn open_opts_ephemeral_creates_correct_config() {
+ let path = "path/to/file".to_string();
+ let opts = OpenOpts::ephemeral(path.clone());
+
+ assert!(!opts.keep_fd);
+ assert_eq!(opts.path, path);
+ }
+
+ #[test]
+ fn open_opts_permanent_creates_correct_config() {
+ let path = "path/to/file".to_string();
+ let opts = OpenOpts::permanent(path.clone());
+
+ assert!(opts.keep_fd);
+ assert_eq!(opts.path, path);
+ }
+}
diff --git a/examples/rust/src/message-headers/message-compression/README.md
b/examples/rust/src/message-headers/message-compression/README.md
index d1d35257c..d0cf5dd70 100644
--- a/examples/rust/src/message-headers/message-compression/README.md
+++ b/examples/rust/src/message-headers/message-compression/README.md
@@ -137,7 +137,7 @@ impl Codec {
}
```
-The other two methods implement the compression and decompression logic, which
is specifc to the actual Codec instance, dependent on the enum's variant.
+The other two methods implement the compression and decompression logic, which
is specific to the actual Codec instance, dependent on the enum's variant.
The example Codec implements two. *None*, where data is not compressed and
*Lz4* (using the lz4_flex crate).
Note, that this can be easily extended to more algorithms.
It might be reasonable to limit the number of bytes that can be decompressed
to avoid large memory footprints, or even crashing the consumer.
diff --git a/foreign/csharp/Iggy_SDK.sln.DotSettings
b/foreign/csharp/Iggy_SDK.sln.DotSettings
index 3c8e2cc3f..3ea9d2fe4 100644
--- a/foreign/csharp/Iggy_SDK.sln.DotSettings
+++ b/foreign/csharp/Iggy_SDK.sln.DotSettings
@@ -57,7 +57,7 @@
</HasMember>
</And>
</TypePattern.Match>
-
+
<Entry DisplayName="Fields">
<Entry.Match>
<And>
@@ -226,7 +226,7 @@
<Name />
</Entry.SortBy>
</Entry>
-
+
<Entry DisplayName="Properties, Indexers">
<Entry.Match>
<Or>
@@ -234,7 +234,7 @@
<Kind Is="Indexer" />
</Or>
</Entry.Match>
- </Entry>
+ </Entry>
<Entry DisplayName="Constructors">
<Entry.Match>
@@ -245,7 +245,7 @@
<Static/>
</Entry.SortBy>
</Entry>
-
+
<Entry DisplayName="Interface Implementations" Priority="100">
<Entry.Match>
<And>
diff --git a/foreign/csharp/Iggy_SDK/Exceptions/InvalidBaseAdressException.cs
b/foreign/csharp/Iggy_SDK/Exceptions/InvalidBaseAddressException.cs
similarity index 100%
rename from foreign/csharp/Iggy_SDK/Exceptions/InvalidBaseAdressException.cs
rename to foreign/csharp/Iggy_SDK/Exceptions/InvalidBaseAddressException.cs
diff --git a/foreign/csharp/Iggy_SDK/Extensions/IggyClientExtenstion.cs
b/foreign/csharp/Iggy_SDK/Extensions/IggyClientExtension.cs
similarity index 98%
rename from foreign/csharp/Iggy_SDK/Extensions/IggyClientExtenstion.cs
rename to foreign/csharp/Iggy_SDK/Extensions/IggyClientExtension.cs
index eef84fd8b..82d1a8139 100644
--- a/foreign/csharp/Iggy_SDK/Extensions/IggyClientExtenstion.cs
+++ b/foreign/csharp/Iggy_SDK/Extensions/IggyClientExtension.cs
@@ -25,7 +25,7 @@ namespace Apache.Iggy.Extensions;
/// <summary>
/// Extension methods for <see cref="IIggyClient" />
/// </summary>
-public static class IggyClientExtenstion
+public static class IggyClientExtension
{
/// <summary>
/// Creates a new <see cref="IggyConsumerBuilder" /> from <see
cref="IIggyClient" /> for the specified stream and
diff --git
a/foreign/csharp/Iggy_SDK_Tests/UtilityTests/IdentifiersByteSerializationTests.cs
b/foreign/csharp/Iggy_SDK_Tests/UtilityTests/IdentifiersByteSerializationTests.cs
index 478b184d3..4d128c417 100644
---
a/foreign/csharp/Iggy_SDK_Tests/UtilityTests/IdentifiersByteSerializationTests.cs
+++
b/foreign/csharp/Iggy_SDK_Tests/UtilityTests/IdentifiersByteSerializationTests.cs
@@ -22,7 +22,7 @@ namespace Apache.Iggy.Tests.UtilityTests;
public sealed class IdentifiersByteSerializationTests
{
[Fact]
- public void
StringIdentifer_WithInvalidLength_ShouldThrowArgumentException()
+ public void
StringIdentifier_WithInvalidLength_ShouldThrowArgumentException()
{
const char character = 'a';
var val = string.Concat(Enumerable.Range(0, 500).Select(_ =>
character));
diff --git a/foreign/csharp/scripts/pack.sh b/foreign/csharp/scripts/pack.sh
index 6510e6ac2..09b23e34e 100755
--- a/foreign/csharp/scripts/pack.sh
+++ b/foreign/csharp/scripts/pack.sh
@@ -47,7 +47,7 @@ echo "Uploading Iggy package to Nuget using branch
$GITHUB_REF_NAME"
case "$GITHUB_REF_NAME" in
"master")
dotnet nuget push ./*.nupkg -k "$NUGET_API_KEY" -s
https://api.nuget.org/v3/index.json
- echo "Published package succesfully!"
+ echo "Published package successfully!"
;;
*)
echo "Skipping NuGet package push as the branch is not master."
diff --git a/foreign/go/client/tcp/tcp_access_token_managament.go
b/foreign/go/client/tcp/tcp_access_token_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_access_token_managament.go
rename to foreign/go/client/tcp/tcp_access_token_management.go
diff --git a/foreign/go/client/tcp/tcp_clients_managament.go
b/foreign/go/client/tcp/tcp_clients_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_clients_managament.go
rename to foreign/go/client/tcp/tcp_clients_management.go
diff --git a/foreign/go/client/tcp/tcp_consumer_group_managament.go
b/foreign/go/client/tcp/tcp_consumer_group_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_consumer_group_managament.go
rename to foreign/go/client/tcp/tcp_consumer_group_management.go
diff --git a/foreign/go/client/tcp/tcp_offset_managament.go
b/foreign/go/client/tcp/tcp_offset_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_offset_managament.go
rename to foreign/go/client/tcp/tcp_offset_management.go
diff --git a/foreign/go/client/tcp/tcp_partition_managament.go
b/foreign/go/client/tcp/tcp_partition_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_partition_managament.go
rename to foreign/go/client/tcp/tcp_partition_management.go
diff --git a/foreign/go/client/tcp/tcp_session_managament.go
b/foreign/go/client/tcp/tcp_session_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_session_managament.go
rename to foreign/go/client/tcp/tcp_session_management.go
diff --git a/foreign/go/client/tcp/tcp_stream_managament.go
b/foreign/go/client/tcp/tcp_stream_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_stream_managament.go
rename to foreign/go/client/tcp/tcp_stream_management.go
diff --git a/foreign/go/client/tcp/tcp_topic_managament.go
b/foreign/go/client/tcp/tcp_topic_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_topic_managament.go
rename to foreign/go/client/tcp/tcp_topic_management.go
diff --git a/foreign/go/client/tcp/tcp_user_managament.go
b/foreign/go/client/tcp/tcp_user_management.go
similarity index 100%
rename from foreign/go/client/tcp/tcp_user_managament.go
rename to foreign/go/client/tcp/tcp_user_management.go
diff --git a/foreign/go/contracts/offets.go b/foreign/go/contracts/offsets.go
similarity index 100%
rename from foreign/go/contracts/offets.go
rename to foreign/go/contracts/offsets.go
diff --git a/foreign/go/samples/consumer/README.md
b/foreign/go/samples/consumer/README.md
index 783b6d1ed..691776d79 100644
--- a/foreign/go/samples/consumer/README.md
+++ b/foreign/go/samples/consumer/README.md
@@ -12,7 +12,7 @@ To get a local copy up and running follow these simple
example steps.
### Prerequisites
-In order to use this SDK you need to install golang on your enviroment. Here's
a <a hfref="https://go.dev/doc/install">link to official go documentation</a>
explaining how you can do that!
+In order to use this SDK you need to install golang on your environment.
Here's a <a hfref="https://go.dev/doc/install">link to official go
documentation</a> explaining how you can do that!
## Usage
@@ -38,7 +38,7 @@ In order to successfully launch the consumer app follow these
steps:
go run ./samples/consumer
```
- If you have not consumed messages you should see output similiar to this:
+ If you have not consumed messages you should see output similar to this:
```sh
$ go run ./samples/consumer
diff --git a/foreign/go/samples/consumer/consumer.go
b/foreign/go/samples/consumer/consumer.go
index 9d646e1e9..ae9782035 100644
--- a/foreign/go/samples/consumer/consumer.go
+++ b/foreign/go/samples/consumer/consumer.go
@@ -105,7 +105,7 @@ func ConsumeMessages(cli iggcon.Client) error {
streamIdentifier, _ := iggcon.NewIdentifier(DefaultStreamId)
topicIdentifier, _ := iggcon.NewIdentifier(TopicId)
consumerIdentifier, _ := iggcon.NewIdentifier(ConsumerId)
- partionId := uint32(Partition)
+ partitionId := uint32(Partition)
messagesWrapper, err := cli.PollMessages(
streamIdentifier,
topicIdentifier,
@@ -113,7 +113,7 @@ func ConsumeMessages(cli iggcon.Client) error {
iggcon.NextPollingStrategy(),
1,
true,
- &partionId)
+ &partitionId)
if err != nil {
return err
}
diff --git a/foreign/go/samples/producer/README.md
b/foreign/go/samples/producer/README.md
index a64dbd6ba..39f4f6f0c 100644
--- a/foreign/go/samples/producer/README.md
+++ b/foreign/go/samples/producer/README.md
@@ -12,7 +12,7 @@ To get a local copy up and running follow these simple
example steps.
### Prerequisites
-In order to use this SDK you need to install golang on your enviroment. Here's
a <a hfref="https://go.dev/doc/install">link to official go documentation</a>
explaining how you can do that!
+In order to use this SDK you need to install golang on your environment.
Here's a <a hfref="https://go.dev/doc/install">link to official go
documentation</a> explaining how you can do that!
## Usage
@@ -38,7 +38,7 @@ In order to successfully launch the producer app follow these
steps:
go run ./samples/producer
```
- Producer should start sending new messages, output should look similiar to
this:
+ Producer should start sending new messages, output should look similar to
this:
```sh
$ go run ./samples/producer
diff --git
a/foreign/java/external-processors/iggy-connector-pinot/integration-test.sh
b/foreign/java/external-processors/iggy-connector-pinot/integration-test.sh
index 4e42a37bf..e438afe4b 100755
--- a/foreign/java/external-processors/iggy-connector-pinot/integration-test.sh
+++ b/foreign/java/external-processors/iggy-connector-pinot/integration-test.sh
@@ -144,7 +144,7 @@ TABLE_RESPONSE=$(curl -s -X POST
"http://localhost:9000/tables" \
-H "Content-Type: application/json" \
-d @deployment/table.json)
-if echo "$TABLE_RESPONSE" | grep -q '"status":"Table test_events_REALTIME
succesfully added"'; then
+if echo "$TABLE_RESPONSE" | grep -q '"status":"Table test_events_REALTIME
successfully added"'; then
echo -e "${GREEN}✓ Table created${NC}"
elif echo "$TABLE_RESPONSE" | grep -q '"code":500'; then
echo -e "${RED}✗ Table creation failed${NC}"
diff --git a/foreign/node/src/client/client.socket.ts
b/foreign/node/src/client/client.socket.ts
index 83f8efb29..9dd951d8c 100644
--- a/foreign/node/src/client/client.socket.ts
+++ b/foreign/node/src/client/client.socket.ts
@@ -259,7 +259,7 @@ export class CommandResponseStream extends EventEmitter {
this.heartbeatIntervalHandler = setInterval(async () => {
if (this.connection.connected) {
- debug(`sending hearbeat ping (interval: ${interval} ms)`);
+ debug(`sending heartbeat ping (interval: ${interval} ms)`);
await this.ping()
}
}, interval);
diff --git a/foreign/node/src/wire/client/client.utils.ts
b/foreign/node/src/wire/client/client.utils.ts
index c9e68b015..0b823249c 100644
--- a/foreign/node/src/wire/client/client.utils.ts
+++ b/foreign/node/src/wire/client/client.utils.ts
@@ -45,8 +45,8 @@ export const deserializeClient = (r: Buffer, pos = 0):
ClientDeserialized => {
* 0 - 4 u32 - client_id
* 4 - 8 u32 - user_id
* 8 - 9 u8 - transport
- * 9 - 13 u32 - adress length x
- * 13 - x string - adress
+ * 9 - 13 u32 - address length x
+ * 13 - x string - address
* x - x+4 u32 - consumerGroupCount
*/
if(r.length < 17)
diff --git a/foreign/node/src/wire/command.code.ts
b/foreign/node/src/wire/command.code.ts
index 3f4c8130c..f031f03e8 100644
--- a/foreign/node/src/wire/command.code.ts
+++ b/foreign/node/src/wire/command.code.ts
@@ -73,5 +73,5 @@ export const COMMAND_CODE = {
const reverseCommandCodeMap = reverseRecord(COMMAND_CODE);
export const translateCommandCode = (code: number): string => {
- return reverseCommandCodeMap[code] || `unknow_command_code_${code}`
+ return reverseCommandCodeMap[code] || `unknown_command_code_${code}`
};
diff --git a/foreign/node/src/wire/message/header.utils.ts
b/foreign/node/src/wire/message/header.utils.ts
index 320d10701..0c83ffb20 100644
--- a/foreign/node/src/wire/message/header.utils.ts
+++ b/foreign/node/src/wire/message/header.utils.ts
@@ -250,7 +250,7 @@ type ParsedHeaderDeserialized = {
*/
export const mapHeaderKind = (k: number): HeaderKindId => {
if (!ReverseHeaderKind[k as HeaderKindValue])
- throw new Error(`unknow header kind: ${k}`);
+ throw new Error(`unknown header kind: ${k}`);
return ReverseHeaderKind[k as HeaderKindValue];
};
diff --git a/foreign/node/src/wire/message/poll.utils.ts
b/foreign/node/src/wire/message/poll.utils.ts
index 34fce59b2..43f5c7a0c 100644
--- a/foreign/node/src/wire/message/poll.utils.ts
+++ b/foreign/node/src/wire/message/poll.utils.ts
@@ -207,7 +207,7 @@ const ReverseMessageState = reverseRecord(MessageState);
*/
export const mapMessageState = (k: number): MessageStateId => {
if (!ReverseMessageState[k as MessageStateValue])
- throw new Error(`unknow message state: ${k}`);
+ throw new Error(`unknown message state: ${k}`);
return ReverseMessageState[k as MessageStateValue];
};
diff --git a/web/justfile b/web/justfile
index 887401e5e..f7613f788 100644
--- a/web/justfile
+++ b/web/justfile
@@ -1,4 +1,4 @@
-# Convinience commands for iggy
+# Convenience commands for iggy
# See https://github.com/casey/just
#
# Usage: just <command>
@@ -11,9 +11,9 @@ start:
iggy --username admin --password admin --tcp-server-address localhost:8090
stream create dev || true
iggy --username admin --password admin --tcp-server-address localhost:8090
topic create 1 dev 1 none || true
-
+
echo "Pushing 200 messages to generate fake data"
- for i in {1..200}; do
+ for i in {1..200}; do
iggy --username admin --password admin --tcp-server-address localhost:8090
message send 1 1 "Hello my name is John and I'm ${i} years"
iggy --username admin --password admin --tcp-server-address localhost:8090
message send 1 1 "Tempor enim pariatur ea ipsum esse et veniam enim fugiat
laborum esse est. Nisi ex occaecat mollit incididunt aute aute. Commodo sunt
exercitation est amet exercitation magna enim incididunt esse nisi. Aliquip
laborum exercitation pariatur consectetur adipisicing. Non ex commodo nulla
laboris. Lorem ad do minim mollit elit eu id cillum incididunt sit. Mollit enim
cupidatat irure sint aliquip [...]
done
diff --git a/web/src/lib/components/Modals/DeletePartitionsModal.svelte
b/web/src/lib/components/Modals/DeletePartitionsModal.svelte
index 60f483218..2db40c178 100644
--- a/web/src/lib/components/Modals/DeletePartitionsModal.svelte
+++ b/web/src/lib/components/Modals/DeletePartitionsModal.svelte
@@ -144,7 +144,7 @@
{#snippet message()}
Deleting the <span class="font-semibold">{$form.partitions_count}</span>
{$form.partitions_count > 1 ? 'partitions' : 'partition'} from topic
- <span class="font-semibold">"{topic.name}"</span> will permenently
remove all associated
+ <span class="font-semibold">"{topic.name}"</span> will permanently
remove all associated
messages <span class="font-semibold">({messagesToDelete})</span>.
{/snippet}
</ModalConfirmation>
diff --git a/web/src/lib/components/Modals/StreamSettingsModal.svelte
b/web/src/lib/components/Modals/StreamSettingsModal.svelte
index e9e02af82..1c5160887 100644
--- a/web/src/lib/components/Modals/StreamSettingsModal.svelte
+++ b/web/src/lib/components/Modals/StreamSettingsModal.svelte
@@ -165,7 +165,7 @@
on:result={onConfirmationResult}
>
{#snippet message()}
- Deleting the stream "<span class="font-semibold">{stream.name}</span>"
will permenently remove
+ Deleting the stream "<span class="font-semibold">{stream.name}</span>"
will permanently remove
all associated
<span class="font-semibold">topics ({stream.topicsCount})</span>,
<span class="font-semibold"
diff --git a/web/src/lib/components/Modals/TopicSettingsModal.svelte
b/web/src/lib/components/Modals/TopicSettingsModal.svelte
index 5779a7c55..9d9208440 100644
--- a/web/src/lib/components/Modals/TopicSettingsModal.svelte
+++ b/web/src/lib/components/Modals/TopicSettingsModal.svelte
@@ -158,7 +158,7 @@
on:result={onConfirmationResult}
>
{#snippet message()}
- Deleting the topic "<span class="font-semibold">{topic.name}</span>"
will permenently remove
+ Deleting the topic "<span class="font-semibold">{topic.name}</span>"
will permanently remove
all associated <span class="font-semibold">partitions
({topic.partitionsCount})</span> and
<span class="font-semibold">messages ({topic.messagesCount})</span>.
{/snippet}
diff --git a/web/src/lib/components/PermissionsManager.svelte
b/web/src/lib/components/PermissionsManager.svelte
index 09b5d50f1..d821b9294 100644
--- a/web/src/lib/components/PermissionsManager.svelte
+++ b/web/src/lib/components/PermissionsManager.svelte
@@ -265,11 +265,11 @@
Object.keys(perm).forEach((topicId) => {
const topicPerm = perm[topicId];
- const isTopicTained = Object.keys(topicPerm)
+ const isTopicTainted = Object.keys(topicPerm)
.map((k) => topicPerm[k])
.some((p) => p.checked);
- if (isTopicTained) tainted.add(streamId);
+ if (isTopicTainted) tainted.add(streamId);
});
} else {
const perm = streamsPerms[streamId][permissionKey];
diff --git a/web/src/lib/utils/addOnKeyDownListener.ts
b/web/src/lib/utils/addOnKeyDownListener.ts
index cecc4efbe..c34e7dbf1 100644
--- a/web/src/lib/utils/addOnKeyDownListener.ts
+++ b/web/src/lib/utils/addOnKeyDownListener.ts
@@ -60,7 +60,7 @@ type Key =
| 'Ampersand'
| 'Eight'
| 'Star'
- | 'Asterik'
+ | 'Asterisk'
| 'Nine'
| 'OpenParen'
| 'A'