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(backend): multiple routes with same path but different methods #5040

Conversation

HugoCasa
Copy link
Contributor

@HugoCasa HugoCasa commented Jan 9, 2025

Important

Fixes handling of routes with the same path but different HTTP methods by updating SQL queries and method conversions.

  • Behavior:
    • Fixes handling of multiple routes with the same path but different HTTP methods in get_http_route_trigger().
    • SQL queries in query-28a389a93a3d2472b13d956ec55eb357c6147e186e00e371f7374d166903ef64.json and query-a76be7f4e9e8b8c81afe50fcbf1f3d393ed0bb73314e5c430f32541c43bcac52.json now include http_method as a parameter.
  • Code Changes:
    • HttpMethod enum in http_triggers.rs now implements TryFrom<&http::Method> instead of From<HttpMethod>.
    • route_job() and get_http_route_trigger() functions updated to handle http_method parameter.
  • Misc:
    • Removes http_method field from TriggerRoute struct in http_triggers.rs.

This description was created by Ellipsis for e303952. It will automatically update as commits are pushed.

@HugoCasa HugoCasa requested a review from rubenfiszel as a code owner January 9, 2025 18:08
@rubenfiszel rubenfiszel merged commit 7b808c3 into main Jan 9, 2025
6 of 7 checks passed
@rubenfiszel rubenfiszel deleted the hugo/git-305-bugmultiple-routes-with-same-path-dont-work-with-different branch January 9, 2025 18:08
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to e303952 in 1 minute and 6 seconds

More details
  • Looked at 212 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. backend/windmill-api/src/http_triggers.rs:421
  • Draft comment:
    The http_method field has been removed from the TriggerRoute struct. Ensure that this field is not required elsewhere in the code, as it might be necessary for other operations or logging.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_j2vHx4BKsv0RKpBi


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug:Multiple Routes with same path don't work with different http method
2 participants