Repository navigation
Fix frontend API url courses regex overlap - #362
Merged
Merged
Conversation
bryanlandia
marked this pull request as draft
June 3, 2021 23:17
bryanlandia
force-pushed
the
bryan/fix-url-courses-regex-overlap
branch
from
June 3, 2021 23:22
8c22616 to
49aefdf
Compare
bryanlandia
marked this pull request as ready for review
June 3, 2021 23:33
johnbaldwin
approved these changes
Jun 10, 2021
johnbaldwin
left a comment
Contributor
There was a problem hiding this comment.
@bryanlandia This PR has outdated code. Please make sure this passes tests when you merge it back in. I'm going to consider this a "temporary" workaround fix. Why? Because nested resources are valid REST endpoints. Too much nesting is a code smell, but I don't want to box figures out of being able to do endpoints in the future for:
/courses
/courses/some-blah
/courses/some-other-blah
Contributor
Author
|
@johnbaldwin thanks for the review! Unfortunately because the course id regex is defined in edx-platform code, and evaluated in middleware, any |
/courses/general/course-v1... and /courses/detail/course-v1... will be matched by Open edX request util and other course id REGEX's as a course with id of general/course-v1 etc. and result in 500 errors particulary in some middlewares. Addresses #361
pattern used by all other URL routes.
bryanlandia
force-pushed
the
bryan/fix-url-courses-regex-overlap
branch
from
June 10, 2021 23:20
49aefdf to
d09248a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #361 by changing
Also, just to not have one outlier URL pattern, updates the corresponding
These changes shouldn't be problematic in that they are internal API URLs and the documentation has warnings that they are subject to change.