Description of problem: When creating an application or a cartridge (that I embed) I expect the result of this operation in the messages "block". In protocol 1.2 I had so far something like this: "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" } ], There's a field "result" that I show to the user in the OpenShift tools for Eclipse. In the latest version OpenShift is not giving me a "results" fields any more and thus breaks my existing clients. I get something like this (when embedding mysql): "messages": [ { "exit_code" => big integer 0, "field" => undefined, "severity" => "info", "text" => "Added mysql-5.1 to application as71" }, { "exit_code" => big integer 0, "field" => undefined, "severity" => "debug", "text" => " mysql-5.1: Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT " }, { "exit_code" => big integer 0, "field" => undefined, "severity" => "result", "text" => "MySQL 5.1 database added. Please make note of these credentials: Root User: adminv15iriK Root Password: nyZ77qp5-h61 Database Name: as71 Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/ You can manage your new MySQL database by also embedding phpmyadmin-3.4. The phpmyadmin username and password will be the same as the MySQL credentials above. " } ] Version-Release number of selected component (if applicable): protocol 1.2 How reproducible: always Steps to Reproduce: 1. embed mysql to an existing application 2. check the response for "messages": and see if there's a field "result" 3. Actual results: No "result" field is present and thus existing clients for the EClipse tooling dont get the required informations (like url, credentials) Expected results: I should get a "result" field that I can show to the user as we could with the prior implementations Additional info:
This is a regression in behavior for old API clients which breaks processing of cartridge response data (which contains critical information). Older API versions should continue to have their correct behavior. This blocks the release of the Eclipse client tools, and in all likelihood needs to be hotfixed to production.
tested on jboss tool 4.1.0 cr1 and found that return no messages after add cartridge to app now
We had to freeze CR1 yesterday which should become GA without any changes in the ideal case. We could therefore not wait for a hotfix and worked around it by looking either for a "result" field or a "result" severity in the "default" fields. https://github.com/jbosstools/jbosstools-openshift/pull/188/files#L5R79 This allows us that our tooling works with current Online and existing OSE instances.
test on jbosstool 4.1.0 CR1a and it works, thx And when add some non-supported cartridges for scalable app, the result of supported cartridge will not display.
(In reply to weiwei jiang from comment #4) > test on jbosstool 4.1.0 CR1a and it works, thx thanks for confirming weiwei > And when add some non-supported cartridges for scalable app, the result of > supported cartridge will not display. did I read you right, if you try to embed/create unsupported cartridges you wont get any report about it? Is this expected or should a dialog pop up?
(In reply to Andre Dietisheim from comment #5) > (In reply to weiwei jiang from comment #4) > > test on jbosstool 4.1.0 CR1a and it works, thx > > thanks for confirming weiwei > > > And when add some non-supported cartridges for scalable app, the result of > > supported cartridge will not display. > > did I read you right, if you try to embed/create unsupported cartridges you > wont get any report about it? > Is this expected or should a dialog pop up? For example, I embed mysql(supported) & phpmyadmin(unsupported) cartridge to a scalable php application, so it will pop up a dialog and display "phpmyadmin unsupported for scalable application", but it wont display the username&password of mysql, so is it expected?
@weiwei: thanks for finding this, I filed it into our jira (I wont attach it to this issue here since this here is not related): https://issues.jboss.org/browse/JBIDE-15157
The fix for this bug is in pull request https://github.com/openshift/origin-server/pull/3014 For API versions 1.5 or earlier any messages with severity=result will also have the field set to result. Note:This is a fix for backward compatibility. As of version 1.6 (not released yet) the clients should check severity instead of the field attribute. The field attribute indicates the message is related to a particular attribute of the resource and is used for validation errors.
(In reply to Lili Nader from comment #8) > The field attribute indicates the message is related to a > particular attribute of the resource and is used for validation errors. So for protocol <1.6 in case of success, the property "field" is always undefined?
> So for protocol <1.6 in case of success, the property "field" is always > undefined? sorry, mistyped, should say "So for protocol >=1.6 in case of success, the property "field" is always undefined?
Yes
*** Bug 982615 has been marked as a duplicate of this bug. ***
Hi, Lili Even if the stage pull request is merged, but the master pull request is still not merged and not have [merge] tag yet: https://github.com/openshift/origin-server/pull/3017 And there's no devenv-stage_399 ready, so it's not ready for testing now. Thanks
check this issue on devenv-stage_399, it has not been fixed and check the code /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.10.7/lib/openshift/controller/api_responses.rb did not find the new added code. please confirm. thanks
https://github.com/openshift/origin-server/pull/3017
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/67a7b62cdd351dda3b8d5df81a48355f26e5cd3a Bug 980928
Verified on devenv_3491 the value of 'field' is corrected. "messages": [ { "exit_code": 0, "field": null, "severity": "info", "text": "Added mysql to application php1" }, { "exit_code": 0, "field": null, "severity": "debug", "text": "\n\nmysql-5.1: Connection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT\n" }, { "exit_code": 0, "field": "result", "severity": "result", "text": "MySQL 5.1 database added. Please make note of these credentials:\n Root User: adminbR8iT1a\n Root Password: 2ZUQKAwW4mln\n Database Name: php1\nConnection URL: mysql://$OPENSHIFT_MYSQL_DB_HOST:$OPENSHIFT_MYSQL_DB_PORT/\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" } ], "status": "created", "supported_api_versions": [ 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 ], "type": "cartridge", "version": "1.5"