Skip to content
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

Update rust version #93

Merged
merged 1 commit into from
Oct 25, 2024
Merged
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
8 changes: 4 additions & 4 deletions sidecar/ansible/provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
executable: /bin/bash
when: rustup_installed.rc != 0

- name: Update Rust to 1.80
command: rustup update 1.80.0
- name: Update Rust to 1.82
command: rustup update 1.82.0
Comment on lines +33 to +34
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add error handling and version verification.

While the update command is correct, consider adding error handling and verification to ensure the update succeeds.

- name: Update Rust to 1.82
  command: rustup update 1.82.0
+ name: Update Rust to 1.82
+ command: rustup update 1.82.0
+ register: rust_update
+ failed_when: rust_update.rc != 0
+ changed_when: rust_update.rc == 0
+
+ name: Verify Rust version after update
+ command: rustc --version
+ register: rust_version
+ failed_when: '"1.82.0" not in rust_version.stdout'
📝 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
- name: Update Rust to 1.82
command: rustup update 1.82.0
- name: Update Rust to 1.82
command: rustup update 1.82.0
register: rust_update
failed_when: rust_update.rc != 0
changed_when: rust_update.rc == 0
- name: Verify Rust version after update
command: rustc --version
register: rust_version
failed_when: '"1.82.0" not in rust_version.stdout'


- name: Set default to 1.80
command: rustup default 1.80.0
- name: Set default to 1.82
command: rustup default 1.82.0
Comment on lines +36 to +37
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add error handling for default version setting.

The default version setting should include error handling to ensure it completes successfully.

- name: Set default to 1.82
  command: rustup default 1.82.0
+ name: Set default to 1.82
+ command: rustup default 1.82.0
+ register: rust_default
+ failed_when: rust_default.rc != 0
+ changed_when: rust_default.rc == 0
📝 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
- name: Set default to 1.82
command: rustup default 1.82.0
- name: Set default to 1.82
command: rustup default 1.82.0
register: rust_default
failed_when: rust_default.rc != 0
changed_when: rust_default.rc == 0


- name: Check if Git is installed
command: git --version
Expand Down
Loading