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

Change http_content to Rc in HttpWrapper #1391

Merged
merged 10 commits into from
Oct 21, 2024
Merged

Conversation

007gzs
Copy link
Collaborator

@007gzs 007gzs commented Oct 15, 2024

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.76%. Comparing base (ef31e09) to head (6d8d91b).
Report is 150 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1391      +/-   ##
==========================================
+ Coverage   35.91%   43.76%   +7.84%     
==========================================
  Files          69       76       +7     
  Lines       11576    12276     +700     
==========================================
+ Hits         4157     5372    +1215     
+ Misses       7104     6571     -533     
- Partials      315      333      +18     

see 69 files with indirect coverage changes

@johnlanni
Copy link
Collaborator

cc @jizhuozhi @Lynskylate

@johnlanni
Copy link
Collaborator

@007gzs Please fix the CI.

Copy link
Collaborator

@jizhuozhi jizhuozhi left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

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

LGTM

@johnlanni johnlanni merged commit d969947 into alibaba:main Oct 21, 2024
12 checks passed
@jizhuozhi
Copy link
Collaborator

PTAL @007gzs

182 | downcast_rs::impl_downcast!(HttpContextWrapper<PluginConfig> where PluginConfig: Default + DeserializeOwned + Clone+Sized);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | the trait `Sized` is not implemented for `(dyn HttpContextWrapper<PluginConfig> + 'static)`, which is required by `(dyn HttpContextWrapper<PluginConfig> + 'static): Downcast`
    | required by a bound introduced by this call
    |
    = note: required for `(dyn HttpContextWrapper<PluginConfig> + 'static)` to implement `Downcast`
    = note: this error originates in the macro `impl_downcast` which comes from the expansion of the macro `downcast_rs::impl_downcast` (in Nightly builds, run with -Z macro-backtrace for more info)

@007gzs
Copy link
Collaborator Author

007gzs commented Oct 23, 2024

PTAL @007gzs

182 | downcast_rs::impl_downcast!(HttpContextWrapper<PluginConfig> where PluginConfig: Default + DeserializeOwned + Clone+Sized);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | the trait `Sized` is not implemented for `(dyn HttpContextWrapper<PluginConfig> + 'static)`, which is required by `(dyn HttpContextWrapper<PluginConfig> + 'static): Downcast`
    | required by a bound introduced by this call
    |
    = note: required for `(dyn HttpContextWrapper<PluginConfig> + 'static)` to implement `Downcast`
    = note: this error originates in the macro `impl_downcast` which comes from the expansion of the macro `downcast_rs::impl_downcast` (in Nightly builds, run with -Z macro-backtrace for more info)

what's you rust version, it may run ok when rust>=1.80 https://github.com/alibaba/higress/blob/main/plugins/wasm-rust/Dockerfile

@jizhuozhi
Copy link
Collaborator

cargo 1.80.1 (376290515 2024-07-16)

@007gzs
Copy link
Collaborator Author

007gzs commented Oct 23, 2024

run rm Cargo.lock && cargo clean in you plugin path

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.

4 participants