New Charm: IBM XL C/C++
Bug #1489829 reported by
shilpa
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Charms Collection |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi,
Here is a new charm IBM XL C/C++ for review.
The charm will deploy a 60 day evaluation version of IBM XL C/C++ 13.1.2.To test this charm, a license to IBM XL C/C++ evaluation version is required.
Repo: https:/
Thanks,
Shilpa
Related branches
Changed in charms: | |
status: | Fix Committed → In Progress |
Changed in charms: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Shilpa,
Thank you for this charm submission!
It's great to see the use of status-set to provide better feedback to the user during the deployment process! It's quite useful for the charm to report that it is blocked, and what it's blocked on, as well as when everything's installed successfully. There are a couple of cases, however, where the status reporting could be improved:
* When the license is not accepted and the software was not previously installed, the status is left at "Removing IBM XL C/C++ software"; if the status-set on line 38 in config-changed was moved down to just after line 54, it would provide better feedback to the user in that case
* If the URL is set but the package download fails (line 123), it is only sent to the log; a status-set there would be nice
I also notice that the install hook will error out if the charm is deployed on a non-Power system. I don't see anything in either the README nor during the download process for getting the compiler package that indicates it will only work on Power. If that's the case, it should be mentioned in the README and I would also recommend using a "status-set blocked" instead of "exit 1" (with a corresponding check in config-changed) because removing a service that is in error state can be difficult, and the user doesn't get the useful feedback as to what's wrong that the status-set would provide. On the other hand, if it does work on non-Power, perhaps that check can simply be removed.
There is also a minor syntax issue in the README's markdown; in the Usage section (line 42), the xlc-url config example should be escaped with back-quotes: `xlc_url: "http://<server- name>/< REPOSITORY_ DIR>/xlc_ url"`
Your test case worked, with a couple of caveats:
* Running the tests from the charm root folder, I had to move the local.yaml file from where it was created (pwd) to where it was needed (tests directory). Perhaps using `dirname $0`/local.yaml would work?
* The charm accepts an empty default value for the xlc_package_name config, but the test does not. Not a big deal, but would be nice if the test allowed for the empty default.
Finally, when thinking about how this charm would be used, it seems like this would make a lot of sense as a subordinate charm, similar to the IBM JRE charm. This would allow for a CI or compiler farm type charm to be created that used a pluggable compiler infrastructure, which seems interesting! I would suggest using a "c-compiler" or "cpp-compiler" interface (or both!) as the subordinate relation.
Aside from these suggestions, the charm looks over all pretty good, and I look forward to seeing the few corner cases mentioned above cleaned up. Thanks again!