-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Kafka] CC-1645: Upgrade Rust to 1.85 #27
Conversation
- Updated codecrafters.yml and README.md to specify Rust 1.85 - Added Dockerfile for Rust 1.85 - Modified run.sh scripts to exit on failure - Updated starter template configuration to require cargo (1.85)
WalkthroughThe changes upgrade the Rust version from 1.82 to 1.85 throughout the project. This includes updating version references in documentation (README.md and config files), configuration YAML files, and the Codecrafters language pack. Additionally, multiple run scripts have been enhanced by adding a Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer
participant Script as run.sh
participant Kafka as Kafka Process
Dev->>Script: Execute run.sh
Script->>Script: Activate set -e (exit on failure)
Script->>Kafka: Run Kafka command
Kafka-->>Script: Return result (failures cause exit)
sequenceDiagram
participant Dev as Developer
participant Docker as Docker Engine
participant Compile as Compile Script (.codecrafters/compile.sh)
Dev->>Docker: Initiate build using rust-1.85 Dockerfile
Docker->>Docker: Set env variables & copy files (excluding .git, README.md)
Docker->>Compile: Execute compile.sh to run cargo build
Compile-->>Docker: Return build outcome
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
compiled_starters/rust/.codecrafters/run.sh
(1 hunks)compiled_starters/rust/README.md
(1 hunks)compiled_starters/rust/codecrafters.yml
(1 hunks)dockerfiles/rust-1.85.Dockerfile
(1 hunks)solutions/rust/01-vi6/code/.codecrafters/run.sh
(1 hunks)solutions/rust/01-vi6/code/README.md
(1 hunks)solutions/rust/01-vi6/code/codecrafters.yml
(1 hunks)starter_templates/rust/code/.codecrafters/run.sh
(1 hunks)starter_templates/rust/config.yml
(1 hunks)
🧰 Additional context used
🪛 Hadolint (2.12.0)
dockerfiles/rust-1.85.Dockerfile
[error] 10-10: invalid flag: --exclude
(DL1000)
🔇 Additional comments (8)
starter_templates/rust/code/.codecrafters/run.sh (1)
9-10
: Improve Shell Script Fail-fast Behavior
The addition ofset -e # Exit on failure
is a smart enhancement. It ensures that the script terminates immediately upon any error, preventing cascading failures during execution.starter_templates/rust/config.yml (1)
2-2
: Update Cargo Version Requirement
The update torequired_executable: cargo (1.85)
correctly reflects the Rust upgrade objective. This change helps ensure consistency across the project regarding the required tooling version.compiled_starters/rust/README.md (1)
30-30
: Reflect Cargo Version Upgrade in Documentation
The instruction—"Ensure you havecargo (1.85)
installed locally"—properly informs users of the new version requirement. This is in line with the overall upgrade strategy and maintains consistency throughout the documentation.compiled_starters/rust/.codecrafters/run.sh (1)
9-10
: Consistent Error Handling in Run Script
Addingset -e # Exit on failure
to this script is a robust change. It confirms that any error will cause the script to abort immediately, aligning with best practices for shell scripts and ensuring consistency with similar run scripts in the project.compiled_starters/rust/codecrafters.yml (1)
10-11
: Upgrade Language Pack Version
The update fromrust-1.82
torust-1.85
in thelanguage_pack
configuration is correct and consistent with the intended Rust upgrade. The accompanying comment listing the available versions is also a helpful touch for clarity.solutions/rust/01-vi6/code/codecrafters.yml (1)
10-11
: Update Rust version in configuration.
The language pack update torust-1.85
is consistent with the PR objective. Please verify that all downstream tooling consuming this value is updated accordingly.solutions/rust/01-vi6/code/.codecrafters/run.sh (1)
9-10
: Improve error handling in shell script.
The addition ofset -e
ensures the script exits immediately on failure, which enhances robustness during execution.solutions/rust/01-vi6/code/README.md (1)
30-30
: Align README with Rust version update.
Updating the cargo version requirement to(1.85)
ensures that documentation matches the upgraded Rust environment.
WORKDIR /app | ||
|
||
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses | ||
COPY --exclude=.git --exclude=README.md . /app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix invalid COPY flag usage.
The Dockerfile uses --exclude
with the COPY command, which is not supported. To exclude .git
and README.md
, consider using a .dockerignore
file.
🧰 Tools
🪛 Hadolint (2.12.0)
[error] 10-10: invalid flag: --exclude
(DL1000)
Summary by CodeRabbit
New Features
Documentation
Chores