Skip to content

Bump Rust Version #1383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 21, 2025
Merged

Bump Rust Version #1383

merged 2 commits into from
Jul 21, 2025

Conversation

parmesant
Copy link
Contributor

@parmesant parmesant commented Jul 21, 2025

bumped edition to 2024
bumped version to 1.88.0

Mostly cargo fmt changes in all the files

Fixes #XXXX.

Description


This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Summary by CodeRabbit

  • Refactor

    • Reordered and organized import statements throughout the codebase for improved consistency and readability.
    • Reformatted error messages and macro calls for better clarity and style.
    • Simplified some function implementations and return statements without changing behavior.
  • Chores

    • Updated Rust edition to 2024 and increased minimum compiler version to 1.88.0.
    • Renamed UID generation function to use ULID and updated its usage across the project.
    • Changed the default deployment ID generator to use a ULID format for new deployments.
    • Updated base Rust image in Dockerfiles to version 1.88.0-bookworm.
  • Documentation

    • Improved code formatting and test assertions for enhanced maintainability and readability.

No changes to user-facing features or functionality were introduced.

Copy link
Contributor

coderabbitai bot commented Jul 21, 2025

Walkthrough

This change set primarily reorders import statements across numerous files for consistency and style, updates some error message formatting for readability, and applies minor code simplifications. Notably, it updates the Rust edition and minimum compiler version in Cargo.toml, and renames the UID generation function from gen to generate_ulid, updating its usage accordingly. The default deployment ID generator in StorageMetadata is changed to use the new ULID function. No other logic, control flow, or exported API is altered.

Changes

File(s) Change Summary
Cargo.toml Rust edition updated to 2024; MSRV bumped to 1.88.0.
src/utils/uid.rs; src/storage/store_metadata.rs gen function renamed to generate_ulid; deployment ID generator updated to use new function.
src/alerts/; src/analytics.rs; src/audit.rs; src/catalog/mod.rs; src/cli.rs; src/connectors/kafka/ Import statements reordered for style/consistency; no logic changes.
src/correlation.rs; src/enterprise/utils.rs; src/event/format/*; src/event/mod.rs Import order adjustments only.
src/handlers/*; src/livetail.rs; src/main.rs; src/metadata.rs; src/metrics/prom_utils.rs Imports reordered; some error returns reformatted for clarity; no logic changes.
src/option.rs; src/parseable/; src/prism/; src/query/; src/rbac/; src/response.rs; src/stats.rs Import reordering, error message formatting, and minor code style improvements.
src/storage/; src/sync.rs; src/users/filters.rs; src/utils/; src/validator.rs Imports reordered; minor formatting and code simplifications; no logic or API changes.
Dockerfile; Dockerfile.debug Rust base image updated to 1.88.0-bookworm.

Sequence Diagram(s)

sequenceDiagram
    participant StoreMetadata
    participant UIDUtils

    StoreMetadata->>UIDUtils: generate_ulid()
    UIDUtils-->>StoreMetadata: ULID string
    Note right of StoreMetadata: deployment_id initialized with ULID
Loading

Estimated code review effort

2 (45 minutes)

Possibly related PRs

  • fix: bugs introduced in #1143 #1185: Introduces new methods for URL construction and staging directory access, refactors IngestorMetadata::load to accept options and storage parameters, and removes the global get_url function; relates to staging directory and URL configuration changes.
  • feat: add querier json #1288: Adds new node types including Querier and Prism, refactors node metadata handling, and supports Prism mode; relates to cluster info handling and node metadata updates.

Poem

A bunny hopped through fields of code,
Tidying imports in every node.
With a whisk of paws and a flick of ear,
Rust edition’s new—let’s give a cheer!
ULIDs now bloom where old UIDs grew,
The code is fresh, the sky is blue.
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e19cb87 and c173d9e.

📒 Files selected for processing (109)
  • Cargo.toml (1 hunks)
  • Dockerfile (1 hunks)
  • Dockerfile.debug (1 hunks)
  • build.rs (1 hunks)
  • src/alerts/alerts_utils.rs (3 hunks)
  • src/alerts/mod.rs (3 hunks)
  • src/alerts/target.rs (3 hunks)
  • src/analytics.rs (3 hunks)
  • src/audit.rs (1 hunks)
  • src/catalog/mod.rs (1 hunks)
  • src/cli.rs (1 hunks)
  • src/connectors/kafka/consumer.rs (1 hunks)
  • src/connectors/kafka/metrics.rs (1 hunks)
  • src/connectors/kafka/partition_stream.rs (1 hunks)
  • src/connectors/kafka/processor.rs (1 hunks)
  • src/connectors/kafka/rebalance_listener.rs (1 hunks)
  • src/connectors/kafka/sink.rs (1 hunks)
  • src/connectors/mod.rs (1 hunks)
  • src/correlation.rs (2 hunks)
  • src/enterprise/utils.rs (1 hunks)
  • src/event/format/json.rs (1 hunks)
  • src/event/format/known_schema.rs (2 hunks)
  • src/event/format/mod.rs (2 hunks)
  • src/event/mod.rs (1 hunks)
  • src/handlers/airplane.rs (4 hunks)
  • src/handlers/http/about.rs (1 hunks)
  • src/handlers/http/alerts.rs (1 hunks)
  • src/handlers/http/audit.rs (1 hunks)
  • src/handlers/http/cluster/mod.rs (1 hunks)
  • src/handlers/http/cluster/utils.rs (1 hunks)
  • src/handlers/http/correlation.rs (1 hunks)
  • src/handlers/http/demo_data.rs (1 hunks)
  • src/handlers/http/health_check.rs (1 hunks)
  • src/handlers/http/ingest.rs (7 hunks)
  • src/handlers/http/kinesis.rs (2 hunks)
  • src/handlers/http/llm.rs (1 hunks)
  • src/handlers/http/logstream.rs (4 hunks)
  • src/handlers/http/middleware.rs (2 hunks)
  • src/handlers/http/mod.rs (1 hunks)
  • src/handlers/http/modal/ingest/ingestor_logstream.rs (2 hunks)
  • src/handlers/http/modal/ingest/ingestor_rbac.rs (1 hunks)
  • src/handlers/http/modal/ingest/ingestor_role.rs (1 hunks)
  • src/handlers/http/modal/ingest_server.rs (3 hunks)
  • src/handlers/http/modal/mod.rs (3 hunks)
  • src/handlers/http/modal/query/querier_logstream.rs (2 hunks)
  • src/handlers/http/modal/query/querier_rbac.rs (2 hunks)
  • src/handlers/http/modal/query/querier_role.rs (1 hunks)
  • src/handlers/http/modal/query_server.rs (2 hunks)
  • src/handlers/http/modal/server.rs (2 hunks)
  • src/handlers/http/modal/utils/ingest_utils.rs (2 hunks)
  • src/handlers/http/oidc.rs (4 hunks)
  • src/handlers/http/prism_home.rs (1 hunks)
  • src/handlers/http/prism_logstream.rs (1 hunks)
  • src/handlers/http/query.rs (5 hunks)
  • src/handlers/http/rbac.rs (1 hunks)
  • src/handlers/http/resource_check.rs (2 hunks)
  • src/handlers/http/role.rs (1 hunks)
  • src/handlers/http/targets.rs (1 hunks)
  • src/handlers/http/users/dashboards.rs (1 hunks)
  • src/handlers/http/users/filters.rs (1 hunks)
  • src/handlers/livetail.rs (4 hunks)
  • src/hottier.rs (3 hunks)
  • src/lib.rs (1 hunks)
  • src/livetail.rs (1 hunks)
  • src/main.rs (3 hunks)
  • src/metadata.rs (1 hunks)
  • src/metrics/prom_utils.rs (1 hunks)
  • src/migration/metadata_migration.rs (1 hunks)
  • src/migration/mod.rs (1 hunks)
  • src/migration/stream_metadata_migration.rs (1 hunks)
  • src/option.rs (1 hunks)
  • src/otel/metrics.rs (1 hunks)
  • src/otel/otel_utils.rs (1 hunks)
  • src/otel/traces.rs (1 hunks)
  • src/parseable/mod.rs (6 hunks)
  • src/parseable/staging/reader.rs (2 hunks)
  • src/parseable/staging/writer.rs (1 hunks)
  • src/parseable/streams.rs (4 hunks)
  • src/prism/home/mod.rs (1 hunks)
  • src/prism/logstream/mod.rs (1 hunks)
  • src/query/listing_table_builder.rs (2 hunks)
  • src/query/mod.rs (4 hunks)
  • src/query/stream_schema_provider.rs (2 hunks)
  • src/rbac/map.rs (1 hunks)
  • src/rbac/user.rs (2 hunks)
  • src/rbac/utils.rs (1 hunks)
  • src/response.rs (1 hunks)
  • src/stats.rs (1 hunks)
  • src/storage/azure_blob.rs (2 hunks)
  • src/storage/gcs.rs (2 hunks)
  • src/storage/localfs.rs (2 hunks)
  • src/storage/metrics_layer.rs (1 hunks)
  • src/storage/mod.rs (1 hunks)
  • src/storage/object_storage.rs (3 hunks)
  • src/storage/retention.rs (1 hunks)
  • src/storage/s3.rs (1 hunks)
  • src/storage/store_metadata.rs (3 hunks)
  • src/sync.rs (2 hunks)
  • src/users/filters.rs (1 hunks)
  • src/utils/actix.rs (1 hunks)
  • src/utils/arrow/batch_adapter.rs (1 hunks)
  • src/utils/arrow/flight.rs (1 hunks)
  • src/utils/human_size.rs (1 hunks)
  • src/utils/json/flatten.rs (2 hunks)
  • src/utils/json/mod.rs (1 hunks)
  • src/utils/json/strict.rs (1 hunks)
  • src/utils/mod.rs (2 hunks)
  • src/utils/uid.rs (1 hunks)
  • src/validator.rs (2 hunks)
✅ Files skipped from review due to trivial changes (26)
  • src/connectors/kafka/rebalance_listener.rs
  • src/connectors/kafka/partition_stream.rs
  • src/connectors/kafka/metrics.rs
  • src/handlers/http/users/filters.rs
  • src/metadata.rs
  • src/cli.rs
  • src/storage/mod.rs
  • src/utils/actix.rs
  • src/event/mod.rs
  • src/handlers/http/rbac.rs
  • src/migration/metadata_migration.rs
  • src/storage/s3.rs
  • src/handlers/http/alerts.rs
  • src/lib.rs
  • src/storage/localfs.rs
  • src/enterprise/utils.rs
  • src/parseable/staging/reader.rs
  • src/connectors/kafka/sink.rs
  • src/audit.rs
  • src/livetail.rs
  • src/handlers/http/oidc.rs
  • src/migration/mod.rs
  • src/handlers/http/cluster/mod.rs
  • src/event/format/mod.rs
  • src/handlers/http/modal/query/querier_logstream.rs
  • src/storage/metrics_layer.rs
🚧 Files skipped from review as they are similar to previous changes (83)
  • src/connectors/mod.rs
  • Dockerfile.debug
  • src/handlers/http/audit.rs
  • src/handlers/http/modal/query/querier_role.rs
  • src/correlation.rs
  • src/utils/mod.rs
  • src/handlers/http/llm.rs
  • src/handlers/http/targets.rs
  • src/metrics/prom_utils.rs
  • src/utils/arrow/flight.rs
  • src/handlers/http/correlation.rs
  • src/handlers/http/health_check.rs
  • src/utils/arrow/batch_adapter.rs
  • src/handlers/http/modal/query_server.rs
  • src/storage/retention.rs
  • src/rbac/utils.rs
  • src/users/filters.rs
  • src/response.rs
  • src/catalog/mod.rs
  • src/rbac/map.rs
  • src/migration/stream_metadata_migration.rs
  • src/utils/json/flatten.rs
  • src/stats.rs
  • src/handlers/http/prism_home.rs
  • src/handlers/http/mod.rs
  • src/utils/json/mod.rs
  • src/query/listing_table_builder.rs
  • src/main.rs
  • src/utils/human_size.rs
  • src/storage/azure_blob.rs
  • src/handlers/http/modal/ingest_server.rs
  • src/rbac/user.rs
  • Dockerfile
  • src/handlers/http/modal/ingest/ingestor_role.rs
  • src/storage/gcs.rs
  • src/utils/json/strict.rs
  • src/otel/otel_utils.rs
  • src/handlers/http/modal/query/querier_rbac.rs
  • src/handlers/http/about.rs
  • src/parseable/staging/writer.rs
  • src/handlers/http/cluster/utils.rs
  • src/analytics.rs
  • src/handlers/http/role.rs
  • src/sync.rs
  • src/otel/traces.rs
  • src/alerts/target.rs
  • src/option.rs
  • src/event/format/json.rs
  • src/storage/object_storage.rs
  • src/handlers/http/resource_check.rs
  • src/handlers/http/demo_data.rs
  • build.rs
  • src/handlers/http/query.rs
  • src/handlers/http/kinesis.rs
  • src/prism/logstream/mod.rs
  • src/handlers/http/logstream.rs
  • Cargo.toml
  • src/handlers/airplane.rs
  • src/validator.rs
  • src/handlers/http/modal/utils/ingest_utils.rs
  • src/handlers/http/users/dashboards.rs
  • src/query/mod.rs
  • src/handlers/http/prism_logstream.rs
  • src/handlers/http/modal/ingest/ingestor_logstream.rs
  • src/utils/uid.rs
  • src/otel/metrics.rs
  • src/handlers/http/modal/ingest/ingestor_rbac.rs
  • src/handlers/livetail.rs
  • src/connectors/kafka/processor.rs
  • src/handlers/http/modal/mod.rs
  • src/hottier.rs
  • src/handlers/http/middleware.rs
  • src/alerts/mod.rs
  • src/parseable/streams.rs
  • src/alerts/alerts_utils.rs
  • src/event/format/known_schema.rs
  • src/query/stream_schema_provider.rs
  • src/connectors/kafka/consumer.rs
  • src/prism/home/mod.rs
  • src/storage/store_metadata.rs
  • src/handlers/http/modal/server.rs
  • src/parseable/mod.rs
  • src/handlers/http/ingest.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Build Default x86_64-pc-windows-msvc
  • GitHub Check: Build Default aarch64-apple-darwin
  • GitHub Check: Build Default x86_64-unknown-linux-gnu
  • GitHub Check: Build Default aarch64-unknown-linux-gnu
  • GitHub Check: Build Default x86_64-apple-darwin
  • GitHub Check: Build Kafka x86_64-unknown-linux-gnu
  • GitHub Check: Build Kafka aarch64-apple-darwin
  • GitHub Check: Quest Smoke and Load Tests for Distributed deployments
  • GitHub Check: Quest Smoke and Load Tests for Standalone deployments
  • GitHub Check: coverage
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@parmesant parmesant force-pushed the bump-rust-version branch 2 times, most recently from f677e93 to 5116dbf Compare July 21, 2025 03:03
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (4)
src/sync.rs (1)

314-325: Polish logging message wording

Minor copy-editing to make the log a bit clearer/grammatically correct.

-                                warn!(
-                                    "Error while evaluation- {}\nRetrying after sleeping for 1 minute",
-                                    err
-                                );
+                                warn!(
+                                    "Error during evaluation: {}. Retrying in 1 minute …",
+                                    err
+                                );
@@
-                                    error!(
-                                        "Alert with id {} failed to evaluate after 3 retries with err- {}",
-                                        id, err
-                                    );
+                                    error!(
+                                        "Alert {id} failed after 3 retries: {err}",
+                                    );
src/handlers/http/modal/query/querier_logstream.rs (1)

38-41: Spelling nit: merge_quried_statsmerge_queried_stats

Minor readability issue—“queried” is misspelled. If you ever touch this API again consider renaming (with cargo-fix or a re-export) to avoid propagating the typo.

src/analytics.rs (1)

243-244: Consider replacing long tuple with a struct.

fetch_ingestors_metrics now returns a 12-element tuple. Even with the formatting tweak, the call-sites remain hard to read and error-prone. Encapsulating these metrics in a dedicated struct (e.g., IngestorMetrics) would improve clarity and future maintainability.

src/handlers/http/oidc.rs (1)

289-295: Apply the same hardening to username cookie

 Cookie::build(USER_COOKIE_NAME, username.to_string())
     .max_age(time::Duration::days(COOKIE_AGE_DAYS as i64))
     .same_site(SameSite::Strict)
+    .http_only(true)
     .path("/")
     .finish()

Even though the username is less sensitive, keeping cookies HttpOnly maintains a consistent security posture.

Comment on lines +5 to +6
edition = "2024"
rust-version = "1.88.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: Edition 2024 is not stabilized and causes build failures.

The pipeline failure indicates that edition2024 is not stabilized in Cargo version 1.84.0. This will break builds in environments without the latest nightly Rust toolchain.

Consider using edition = "2021" until edition 2024 is stabilized:

-edition = "2024"
-rust-version = "1.88.0"
+edition = "2021"
+rust-version = "1.83.0"

Alternatively, if you need features from edition 2024, ensure all CI/CD environments support it and document this requirement.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
edition = "2024"
rust-version = "1.88.0"
edition = "2021"
rust-version = "1.83.0"
🤖 Prompt for AI Agents
In Cargo.toml at lines 5 to 6, the edition is set to "2024" which is not
stabilized and causes build failures. Change the edition value from "2024" to
"2021" to ensure compatibility with stable Rust toolchains and avoid pipeline
failures. If edition 2024 features are necessary, update all CI/CD environments
to use a nightly Rust toolchain that supports edition 2024 and document this
requirement clearly.

@parmesant parmesant force-pushed the bump-rust-version branch 2 times, most recently from e19cb87 to 1f85aa2 Compare July 21, 2025 05:23
bumped edition to 2024
bumped version to 1.88.0
@parmesant parmesant force-pushed the bump-rust-version branch from 1f85aa2 to c173d9e Compare July 21, 2025 05:24
@nitisht nitisht merged commit d3bb3ae into parseablehq:main Jul 21, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants