[JBoss JIRA] (JBIDE-14509) Should only display "result" message when creating jenkins apps or embedding cartridges
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14509?page=com.atlassian.jira.plugi... ]
Andre Dietisheim updated JBIDE-14509:
-------------------------------------
Attachment: showing-result-field-only.png
> Should only display "result" message when creating jenkins apps or embedding cartridges
> ---------------------------------------------------------------------------------------
>
> Key: JBIDE-14509
> URL: https://issues.jboss.org/browse/JBIDE-14509
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.1.0.Alpha2
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Fix For: 4.1.0.Beta2
>
> Attachments: jenkins.png, showing-result-field-only.png
>
>
> When creating jenkins applications or embedding cartridges we show in a dialog what OpenShift reports back to us:
> * creating jenkins:
> {code}
> "messages":[
> {
> "exit_code":null,
> "field":null,
> "severity":"info",
> "text":"Application jekyll was created."
> },
> {
> "exit_code":0,
> "field":"current_ip",
> "severity":"info",
> "text":"107.21.169.102"
> },
> {
> "exit_code":0,
> "field":"result",
> "severity":"info",
> "text":"\nJenkins created successfully. Please make note of these credentials:\n\n User: admin\n Password: edWlFXhq-BqY\n\nNote: You can change your password at: https://jekyll-foobarz.rhcloud.com/me/configure\n\n"
> }
> ],
> {code}
> * embedding mysql:
> {code}
> "messages":[
> {
> "exit_code":null,
> "field":null,
> "severity":"info",
> "text":"Added mysql-5.1 to application springeap6"
> },
> {
> "exit_code":0,
> "field":"result",
> "severity":"info",
> "text":"\nMySQL 5.1 database added. Please make note of these credentials:\n\n Root User: adminnFC22YQ\n Root Password: U1IX8AIlrEcl\n Database Name: springeap6\n\nConnection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/\n\nYou can manage your new MySQL database by also embedding phpmyadmin-3.4.\nThe phpmyadmin username and password will be the same as the MySQL credentials above.\n"
> },
> {
> "exit_code":0,
> "field":"appinfo",
> "severity":"info",
> "text":"Connection URL: mysql://127.13.125.1:3306/\n"
> }
> {code}
> Whe show all message blocks we get back. In case of OpenShift Enterprise this results in us showing non-routeable internal IPs:
> !jenkins.png!
> Talking to Dan McPherson and Brenton LeanHardt we decided to only show the *result* filed and thus not show those internal IPs any more.
> {quote}
> Personally I think "result" is the only thing that's useful. It's not
> like users can connect to mysql://127.13.125.1:3306 in the MySQL case
> without port forwarding. And we don't want them hardcoding IP
> addresses either. It's much better to use the ENV vars that are
> printed in the "result" field.
> {quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBIDE-14410) Maven Test class importing internal class JBossASHandler
by Vlado Pakan (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14410?page=com.atlassian.jira.plugi... ]
Vlado Pakan closed JBIDE-14410.
-------------------------------
> Maven Test class importing internal class JBossASHandler
> --------------------------------------------------------
>
> Key: JBIDE-14410
> URL: https://issues.jboss.org/browse/JBIDE-14410
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: central
> Affects Versions: 4.1.0.Beta1
> Reporter: Rob Stryker
> Assignee: Snjezana Peco
> Priority: Critical
> Fix For: 4.1.0.Beta1
>
>
> ./jbosstools-central/maven/tests/org.jboss.tools.maven.sourcelookup.test/src/org/jboss/tools/maven/sourcelookup/test/SourceLookupTest.java has the following method:
> {code}
> private static IRuntimeDetectorDelegate getJBossASHandler() {
> Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDefault().getRuntimeDetectors();
> for (IRuntimeDetector detector:detectors) {
> IRuntimeDetectorDelegate delegate = ((RuntimeDetector)detector).getDelegate();
> if (delegate instanceof JBossASHandler) {
> return delegate;
> }
> }
> return null;
> }
> {code}
> The class and its package name are not technically API. It would be best if you instead compared against the handler's id: org.jboss.tools.runtime.handlers.JBossASHandler
> Since this ID is declared in plugin.xml, it's best if you hard-code the string.
> Trying to clean up people who depend on my internal classes so that I can get to organizing stuff properly.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] (JBIDE-14667) OpenShift Explorer: dont do any remoting (or any long running tasks) in Action#validate
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14667?page=com.atlassian.jira.plugi... ]
Andre Dietisheim commented on JBIDE-14667:
------------------------------------------
I removed the #validate method since it
1) ensures there are no long-running tasks in it
2) it'll make migration to commands easier
> OpenShift Explorer: dont do any remoting (or any long running tasks) in Action#validate
> ---------------------------------------------------------------------------------------
>
> Key: JBIDE-14667
> URL: https://issues.jboss.org/browse/JBIDE-14667
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.1.0.Beta1
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Fix For: 4.1.0.Beta2
>
>
> The OpenShift Explorer was developed using jface actions (we'll replace those with commands when the workload is lower). In those actions a base class offers #validate to execute basic enablement tasks etc.
> #validate is executed whenever a context-menu - that contains those actions - is about to pop up. Thus #validate should not do any long running tasks since they would potentially block the UI.
> example of bad code:
> Another issue is the validation in the various Actions of the OpenShift Explorer. The above stack-trace shows that the error is caused by DeleteDomainAction#validate:
> {code}
> at org.jboss.tools.openshift.express.internal.ui.action.DeleteDomainAction.validate(DeleteDomainAction.java:47)
> {code}
> {code:title=DeleteDomainAction}
> @Override
> public void validate() {
> boolean enable = false;
> final Connection connection = UIUtils.getFirstElement(getSelection(), Connection.class);
> if (connection != null) {
> if (connection.isConnected()) {
> try {
> if (connection.getDefaultDomain() != null) {
> enable = true;
> }
> } catch (OpenShiftException e) {
> Logger.warn("Failed to retrieve User domain, prompting for creation", e);
> }
> }
> }
> setEnabled(enable);
> }
> {code}
> Validate should not do long-running taks, should not do remoting like the one here.
> We should review all actions to NOT do remoting (above: connection.getDefaultDomain()). They should all fail lenient:
> Stay enabled even though eventually not possible (ex. there's no domain) and fail when executed: "no domain present, cannot delete".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months