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
Pull secret validation did not enable Finish button - JBIDE-27064 #1910
Conversation
Signed-off-by: Ondrej Dockal <odockal@redhat.com>
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
if (error != null) { | ||
handle.setMessage(error, IMessageProvider.ERROR); | ||
} | ||
}); | ||
// dont complete until job validated pull secret | ||
setComplete(false); |
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.
TBH I don't understand the use case as it is working for me. So you removed the setComplete flag management but it looks ok for me. Can you describe the scenario ?
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.
You can create CRC adapter without this change?
I can unfortunately reply with the same: TBH I have no idea why it does not work without this change...
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.
Problem is that one cannot get finish button enabled even if he uses proper crc binary and pull secret file.
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.
Working good with 14.12.0.AM1.B5884
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.
That's before the error occured. Can you please try newer one? I was reproducing this on B5949.
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.
It came to me (I did not thoroughly check all the logical paths) that before there was no use of this setComplete method and logic whether enabled the button is here: https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins/org.jboss.tools.openshift.cdk.server/src/org/jboss/tools/openshift/internal/cdk/server/ui/CDKServerWizardFragment.java#L63
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 am taking back my previous statement. You seems to be right that how it is implemented should be ok and finish should get enabled after validation. BUT, it does not work. I will try to dig a bit more.
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.
It seems that there is something wrong in the sequence of calling some of CRC100ServerWizardFragment.PullSecretModifyListener#modifyText() -> CDKServerWizardFragment#validate() and CRC100ServerWizardFragment#findError(boolean) and CDKServerWizardFragment#isComplete().
Thing is, if CRC100ServerWizardFragment#findError(boolean) sets every time property complete to false here, it is ok when findError is called from validate, since the validate then sets complete property to correct value but it is not alright then findError is called from isComplete from the parent because the statement combines also super.isComplete which findError before sets to false, it never evaluates to true and finish button is never enabled.
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.
@jeffmaury ^^
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.
In short I think it is pointless to toggle completeness in findError at all because if findError method would return anything else than null it would not evaluate isComplete to true anyway.
I managed to reproduce from master. The problem with your PR is that Finish button is enabled as soon as you select the CRC binary. I figured out that the problem was that:
See my PR #1912 |
Closed in favor of #1912. |
Signed-off-by: Ondrej Dockal odockal@redhat.com
Pull Request Checklist
General
Code
Testing
Function