-
Notifications
You must be signed in to change notification settings - Fork 659
Bug 2004060: Fix basic spring boot sample form crash #10013
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
Bug 2004060: Fix basic spring boot sample form crash #10013
Conversation
/cc: @rohitkrai03 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to have try-catch for .test
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because for few strings for ex- devfile-sample-java-spring-boot.git
and other similar strings there is going to be too much recursion and when the stack overflows the error will be thrown which if not caught will break the UI.
@invincibleJai do you have any other suggestions as to how we can handle this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it has to do with how the nameRegex
is defined. It does recursive string matching of groups which causes this error. We can change the regex to improve it, something similar to https://stackoverflow.com/questions/43145738/how-to-simplify-this-regex-to-avoid-recursion.
The other thing we can try is to pre compile the regex using new Regex('regex string')
instead of doing /regex string/.test()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can go ahead with this quick fix for now. WDYT @invincibleJai?
a37e5f8
to
4f8db6b
Compare
4f8db6b
to
bc22aaa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: divyanshiGupta, rohitkrai03 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@divyanshiGupta: This pull request references Bugzilla bug 2004060, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@divyanshiGupta: All pull requests linked via external trackers have merged: Bugzilla bug 2004060 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cherrypick release-4.9 |
@divyanshiGupta: cannot checkout In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@divyanshiGupta: new pull request created: #10076 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fixes: https://issues.redhat.com/browse/ODC-6320
Fixes: https://issues.redhat.com/browse/ODC-6333
Root Cause:
Large number of groups in name regex causes too-much-recursion error in firefox for basic spring boot sample.
Solution:
Adding the regex matching test in try catch block fixes the issue.
Screen-recording:
Screen.Recording.2021-09-07.at.11.57.25.PM.mov
/kind bug