-
Notifications
You must be signed in to change notification settings - Fork 91
better support for custom folder installation #526
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
better support for custom folder installation #526
Conversation
@streamnsight I would like to incorporate your change. But, it does not look like you have followed the process that we outline for all of the Oracle open-source projects. Can you please read https://github.com/oracle/weblogic-deploy-tooling/blob/master/CONTRIBUTING.md. You MUST have a signed OCA submitted. |
Signed-off-by: Emmanuel Leroy <[email protected]>
f250738
to
3f5b2a2
Compare
@streamnsight I see that you are now a member of the Oracle group in GitHub. Thank you. |
Unit tests are failing: Problem invoking WLST - Traceback (innermost last): |
Signed-off by: Emmanuel Leroy <[email protected]>
if len(dirs) > 0: | ||
wl_home = oracle_home + '/' + dirs[0] | ||
else: | ||
raise Exception("Can't find proper folder for WLS") |
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.
throwing an exception here breaks 4 of the WLST unit tests. We could alter the unit tests to accommodate. But, is this necessary? What is the behavior if you simply log an error and let the code continue, versus throwing the exception? In either case, this string needs to be moved to the i18n properties 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.
As you noted, a bunch of tests were failing because the ORACLE_HOME is mocked and my code change raised an exception when wl_home
is not found.
I changed that to return None
instead and leave it to downstream to check that it is not None instead.
…he wlserver home Leaving it to downstream to check that wl_home is not None. Signed-off by: Emmanuel Leroy <[email protected]>
if len(dirs) > 0: | ||
wl_home = oracle_home + '/' + dirs[0] | ||
else: | ||
wl_home = None |
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.
wl_home is already set to None, just above the if-statement. Please remove the last else-statement, and I think it should be good to go.
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.
wls_home is not none: it gets set to oracle_home + '/' + wls_server_10.3 as default from the previous set of checks. The added code checked that the folder 'detected' is valid, and if not does an extra check to try to infer the folder. If that fails then it sets the wl_home to None again.
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.
sorry, you are correct. I missed that.
I ran into issues running the tools when I had installed WLS with the dev zip download (v10.3 with a wls_home location of <oracle_home>/wlserver/
This asserts the folder exists, and if it does not, try to infer the folder name by scanning the folders in the oracle home and finding the one that starts with
wlserver