Skip to content

Comments

refactor: Split tail-cut layer to new crate#6968

Merged
Xuanwo merged 2 commits intomainfrom
extract-tail-cut-layer
Dec 11, 2025
Merged

refactor: Split tail-cut layer to new crate#6968
Xuanwo merged 2 commits intomainfrom
extract-tail-cut-layer

Conversation

@koushiro
Copy link
Member

@koushiro koushiro commented Dec 11, 2025

Which issue does this PR close?

part of #6829

Closes #6948

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

Copilot AI review requested due to automatic review settings December 11, 2025 06:34
@koushiro koushiro requested a review from Xuanwo as a code owner December 11, 2025 06:34
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" labels Dec 11, 2025
Copy link

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 PR refactors the tail-cut layer from the core crate into a separate opendal-layer-tail-cut crate, following the same pattern used for other layers like prometheus, metrics, and async-backtrace. This separation improves modularity and allows the layer to be optionally included via a feature flag.

Key Changes:

  • Extracted tail-cut layer implementation to a new crate at core/layers/tail-cut/
  • Updated imports to reference opendal_core instead of internal crate paths
  • Added feature flag layers-tail-cut for conditional compilation

Reviewed changes

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

Show a summary per file
File Description
core/src/lib.rs Added re-export of opendal_layer_tail_cut under the layers module with feature gate
core/layers/tail-cut/src/lib.rs Updated imports from crate::* to opendal_core::* and reformatted documentation examples
core/layers/tail-cut/Cargo.toml Created new crate manifest with dependencies on opendal-core and tokio
core/core/src/layers/mod.rs Removed old tail_cut module declaration and exports
core/Cargo.toml Added layers-tail-cut feature and opendal-layer-tail-cut dependency
core/Cargo.lock Updated dependency graph with new opendal-layer-tail-cut crate
Comments suppressed due to low confidence (1)

core/layers/tail-cut/src/lib.rs:24

  • Missing import for std::time::Duration. The code uses Duration extensively throughout the file (in struct fields at lines 57, 59, 60, function parameters at lines 129, 155, 166, etc.), but there's no import statement for it. Add use std::time::Duration; to the imports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you for working on this!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 11, 2025
@Xuanwo
Copy link
Member

Xuanwo commented Dec 11, 2025

Hi, just curious, are you using a code agent for this PR? If so, are you using the prompts I provided in the tracking issue? Which tool and LLM are you using?

@Xuanwo Xuanwo merged commit 1b30016 into main Dec 11, 2025
390 checks passed
@Xuanwo Xuanwo deleted the extract-tail-cut-layer branch December 11, 2025 07:43
@koushiro
Copy link
Member Author

Hi, just curious, are you using a code agent for this PR? If so, are you using the prompts I provided in the tracking issue? Which tool and LLM are you using?

Yeah, I'm using GPT 5.1 codex and the prompts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/refactor The PR does a refactor on code or has a title that begins with "refactor" size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core split] Layer: tail_cut

2 participants