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

refactor!: use rustls instead of openssl #55

Merged
merged 2 commits into from
Jul 16, 2024
Merged

refactor!: use rustls instead of openssl #55

merged 2 commits into from
Jul 16, 2024

Conversation

kwaa
Copy link
Member

@kwaa kwaa commented Jul 16, 2024

#50

Summary by CodeRabbit

  • Chores

    • Updated reqwest dependency to include additional features while removing default-features.
    • Removed openssl dependency from the project.
  • Documentation

    • Updated development setup instructions to remove openssl installation steps.
  • Refactor

    • Simplified Dockerfile by removing openssl and related packages, retaining essential certificates and tools.

@kwaa kwaa added the enhancement New feature or request label Jul 16, 2024
@kwaa kwaa added this to the 0.3 [Strobe Nights] milestone Jul 16, 2024
Copy link

coderabbitai bot commented Jul 16, 2024

Walkthrough

This update simplifies the project's dependencies and setup process by removing openssl and related configurations in favor of using rustls with reqwest. Changes span the Cargo.toml, Dockerfile, documentation, and build configuration, streamlining installation and building steps. The overall impact is a leaner, easier-to-maintain development environment with fewer external dependencies.

Changes

File Change Summary
Cargo.toml Updated reqwest to disable default features and enable "stream" and "rustls-tls"; removed openssl.
Dockerfile Removed installation of openssl and libssl-dev, retaining only ca-certificates and curl.
docs/src/developers/.../development-local.md Updated installation instructions to remove openssl for Arch-based and libssl-dev for Debian-based distros.
flake.nix Removed openssl and related configurations from build dependencies and inputs.

Poem

In the land of code where changes flow,
A simpler path we now bestow.
No openssl to weigh us down,
With rustls we hold our crown.
Dependencies light, our spirits soar,
Streamlined builds forevermore!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

Copy link

@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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f0be1ec and 05038d7.

Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing (4)
  • Cargo.toml (2 hunks)
  • Dockerfile (1 hunks)
  • docs/src/developers/development-local.md (1 hunks)
  • flake.nix (1 hunks)
Additional comments not posted (4)
Dockerfile (1)

9-9: Ensure the Dockerfile builds correctly after changes.

The removal of openssl and libssl-dev packages is aligned with the switch to rustls. This simplifies the Dockerfile and reduces potential security vulnerabilities associated with OpenSSL.

However, ensure that the Dockerfile builds correctly after these changes.

docs/src/developers/development-local.md (1)

11-11: Update installation instructions for clarity and accuracy.

The removal of openssl and libssl-dev from the installation instructions reflects the switch to rustls. This simplifies the setup process and reduces the complexity for new developers.

However, ensure that the updated documentation is clear and provides all necessary instructions for developers to set up their environment correctly.

Also applies to: 14-14

flake.nix (1)

52-52: Ensure the build configuration works correctly after changes.

The removal of openssl from the build dependencies is aligned with the switch to rustls. This simplifies the build configuration and reduces potential security vulnerabilities associated with OpenSSL.

However, ensure that the build configuration still works correctly after these changes.

Cargo.toml (1)

100-105: Ensure the dependencies are correctly configured after changes.

The update to the reqwest dependency to use rustls-tls and the removal of the openssl dependency are aligned with the switch to rustls. This simplifies the dependency graph and reduces potential security vulnerabilities associated with OpenSSL.

However, ensure that the dependencies are correctly configured and that the application still builds and runs correctly after these changes.

Verification successful

To ensure the dependencies are correctly configured after the changes, we need to verify the contents of the Cargo.toml file and check for any remaining references to OpenSSL in the codebase.


Dependencies are correctly configured

The reqwest dependency in the Cargo.toml file is correctly configured to use rustls-tls, and no references to OpenSSL were found in the codebase.

  • Cargo.toml: reqwest = { version = "0.11", default-features = false, features = ["json", "stream", "rustls-tls"] }
  • No references to OpenSSL found in the codebase.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the dependencies are correctly configured after changes.

# Test: Build the application. Expect: Successful build and run.
echo "Building the application to ensure the dependencies are correctly configured after the removal of OpenSSL dependencies."
cargo build
cargo run

Length of output: 420


Script:

#!/bin/bash
# Verify the contents of the Cargo.toml file for the reqwest dependency configuration
echo "Checking the reqwest dependency configuration in Cargo.toml..."
rg 'reqwest' Cargo.toml

# Search for any remaining references to OpenSSL in the codebase
echo "Searching for references to OpenSSL in the codebase..."
rg 'openssl'

Length of output: 359

@kwaa kwaa merged commit 4437af9 into main Jul 16, 2024
2 checks passed
@kwaa kwaa deleted the refactor/rustls branch July 16, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant