Skip to content

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 added 2 commits February 3, 2022 10:51
Signed-off-by: Casey Buto <cbuto@d2iq.com>
Signed-off-by: Casey Buto <cbuto@d2iq.com>
@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 <cbuto@d2iq.com>

* test: Add test for dynamic depth route

Signed-off-by: Casey Buto <cbuto@d2iq.com>
Signed-off-by: nerdeveloper <odirionye@gmail.com>
@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