Skip to content

Comments

releases/v0.11.9#88

Merged
ruslanti merged 4 commits intomainfrom
releases/v0.11.9
Sep 9, 2025
Merged

releases/v0.11.9#88
ruslanti merged 4 commits intomainfrom
releases/v0.11.9

Conversation

@github-actions
Copy link

releases/v0.11.9

@ruslanti ruslanti requested review from Copilot and godronus August 29, 2025 13:37

This comment was marked as outdated.

@ruslanti ruslanti requested a review from Copilot August 29, 2025 13:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This is a version bump release from v0.11.8 to v0.11.9 that introduces a direct backend strategy option for the FastEdge CLI to fix backend request handling.

  • Updated the BackendRequest trait to return only Parts instead of a tuple with String and Parts
  • Added a new BackendStrategy enum with Direct and FastEdge options to control backend behavior
  • Modified the backend_request implementation to handle both strategies with appropriate logging

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Cargo.toml Version bump from 0.11.8 to 0.11.9
CHANGELOG.md Added release notes for v0.11.9 with bug fix entry
crates/runtime/src/lib.rs Updated BackendRequest trait signature and componentize_if_necessary function lifetime parameters
crates/http-service/src/state.rs Implemented strategy-based backend request handling with Direct and FastEdge modes
crates/http-backend/src/lib.rs Made strategy field public to enable external access

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 95 to +96
pub trait BackendRequest {
fn backend_request(&mut self, head: Parts) -> anyhow::Result<(String, Parts)>;
fn backend_request(&mut self, head: Parts) -> anyhow::Result<Parts>;
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

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

This is a breaking API change that removes the String return value from the backend_request method. Consider deprecating the old method first or providing a migration guide to help consumers adapt to this change.

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +22
match self.http_backend.strategy {
http_backend::BackendStrategy::Direct => {
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

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

[nitpick] The Direct strategy implementation is very minimal and doesn't perform the same URI validation or processing as the FastEdge strategy. Consider documenting the behavior differences or adding basic validation to ensure the Direct strategy handles edge cases appropriately.

Suggested change
match self.http_backend.strategy {
http_backend::BackendStrategy::Direct => {
http_backend::BackendStrategy::Direct => {
// Direct strategy: minimal processing, does not filter or augment headers.
// Unlike FastEdge, this does not perform header filtering or URI rewriting.
// Basic validation: ensure the URI has a scheme and authority.
let uri = &head.uri;
if uri.scheme_str().is_none() || uri.authority().is_none() {
return Err(anyhow::anyhow!(
"Direct strategy: request URI missing scheme or authority: {:?}",
uri
));
}

Copilot uses AI. Check for mistakes.
@ruslanti ruslanti requested a review from qrdl September 2, 2025 06:11
@ruslanti ruslanti merged commit a6d1001 into main Sep 9, 2025
4 of 5 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.

3 participants