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: avoid panic with dynamic depth configured #543

Merged
merged 2 commits into from
Feb 3, 2022

Conversation

cbuto
Copy link
Contributor

@cbuto cbuto commented Feb 3, 2022

Fixes #443.

In the case where depth = -1, I think we can assume the url didn't match any of the routes and thus doesn't exist. I went through a few cases and this seems like the desired behavior but I had a hard time understanding this entire flow. This did end up fixing the panics caused by routes that aren't matched with anything i.e /favicon. I also tested a few scenarios using dynamic depth and everything looked to behave correctly.

@helm-bot helm-bot added the size/S label Feb 3, 2022
@cbuto cbuto requested review from jdolitsky and scbizu February 3, 2022 15:51
@cbuto cbuto force-pushed the fix/dynamic-depth-panic branch from 0a1158c to 7e1f1fc Compare February 3, 2022 15:51
@jdolitsky jdolitsky added this to the v0.14.1 milestone Feb 3, 2022
Copy link
Contributor

@jdolitsky jdolitsky left a comment

Choose a reason for hiding this comment

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

this lgtm. thanks for finding!

@jdolitsky jdolitsky merged commit 20a3a09 into helm:main Feb 3, 2022
nerdeveloper pushed a commit to nerdeveloper/chartmuseum that referenced this pull request Feb 10, 2022
* fix: avoid panic with dynamic depth configured

Signed-off-by: Casey Buto <[email protected]>

* test: Add test for dynamic depth route

Signed-off-by: Casey Buto <[email protected]>
Signed-off-by: nerdeveloper <[email protected]>
@cbuto cbuto modified the milestones: v0.14.1, v0.15.0 Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when using dynamic depth
3 participants