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

fix: auth route conflict #987

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

VishnuSanal
Copy link
Contributor

Description

This PR fixes #982

Summary

This PR does fix authenticated routes with different method but same path causing conflict

PR Checklist

Please ensure that:

  • The PR contains a descriptive title
  • The PR contains a descriptive summary of the changes
  • You build and test your changes before submitting a PR.
  • You have added relevant documentation
  • You have added relevant tests. We prefer integration tests wherever possible

Pre-Commit Instructions:

Copy link

vercel bot commented Oct 18, 2024

@VishnuSanal is attempting to deploy a commit to the sparckles Team on Vercel.

A member of the Team first needs to authorize it.

@VishnuSanal
Copy link
Contributor Author

todo:

  • fix tests
  • please comment on the approach @sansyrox

robyn/processpool.py Outdated Show resolved Hide resolved
@VishnuSanal VishnuSanal requested a review from sansyrox October 22, 2024 05:24
Copy link
Member

@sansyrox sansyrox left a comment

Choose a reason for hiding this comment

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

Hey @VishnuSanal 👋

Overall , I like the approach ✨

I can do a review on the execution when it is up for review 😄

src/server.rs Outdated Show resolved Hide resolved
@VishnuSanal VishnuSanal marked this pull request as ready for review October 24, 2024 14:04
@VishnuSanal VishnuSanal requested a review from sansyrox October 24, 2024 14:04
Copy link

codspeed-hq bot commented Oct 24, 2024

CodSpeed Performance Report

Merging #987 will not alter performance

Comparing VishnuSanal:fix-auth-route-conflict (691528d) with main (9924437)

Summary

✅ 146 untouched benchmarks

@sansyrox
Copy link
Member

Hey @VishnuSanal , can you fetch the latest changes here??

Copy link

vercel bot commented Oct 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
robyn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 2, 2024 6:32pm

robyn/router.py Outdated Show resolved Hide resolved
src/server.rs Outdated Show resolved Hide resolved
src/server.rs Outdated Show resolved Hide resolved
src/server.rs Outdated Show resolved Hide resolved
robyn/router.py Outdated Show resolved Hide resolved
robyn/processpool.py Outdated Show resolved Hide resolved
Co-authored-by: Sanskar Jethi <29942790+sansyrox@users.noreply.github.com>
@VishnuSanal VishnuSanal requested a review from sansyrox October 31, 2024 05:12
@alissonpelizaro
Copy link

Hi all, same issue here.

Any blockers for merging this? Let me know if I can help somehow!

@sansyrox
Copy link
Member

sansyrox commented Nov 7, 2024

Hey @alissonpelizaro 👋

Apologies for the delay in review. I planned to review this over the weekend. If possible, could you do an initial review please?

Comment on lines +342 to +347
HttpMethod.GET,
async_inner_handler,
injected_dependencies,
)
else:
self.add_route(middleware_type, endpoint, inner_handler, injected_dependencies)
self.add_route(middleware_type, endpoint, HttpMethod.GET, inner_handler, injected_dependencies)
Copy link
Member

Choose a reason for hiding this comment

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

why is this a GET http method? Is a middleware always treated as a get request?

Copy link
Member

@sansyrox sansyrox left a comment

Choose a reason for hiding this comment

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

This PR needs some more work and is up for grabs as @VishnuSanal is unfortunately away for some time.

@sansyrox sansyrox force-pushed the main branch 3 times, most recently from 6ee78c5 to 0f16260 Compare January 2, 2025 21:41
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.

Authenticated routes with different method but same path causes conflict.
3 participants