Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Conversation

RobertSzkutak
Copy link
Contributor

I implemented two fixes:

  1. Properly setting ml.server
  2. Changing v to v.to_s

In my testing, either fix appeared to independently solve #620 and #224

@grtjn grtjn changed the title Fix for #620 and #224 Fix for #620 and #224: prevent implicit conversion of nil to string Aug 23, 2016
@grtjn grtjn added this to the 1.7.4 milestone Aug 23, 2016
@grtjn
Copy link
Contributor

grtjn commented Aug 23, 2016

I am actually thinking, why not just throw an error if ml.server isn't properly configured? Not sure if that will have side-effects on commands that don't need an env, but if it doesn't it would give proper feedback about properties being mal-configured..

@grtjn
Copy link
Contributor

grtjn commented Aug 23, 2016

I'd still keep the second change by the way, just change the first into an exception..

@RobertSzkutak
Copy link
Contributor Author

Pushed in a commit with your suggestion @grtjn

@grtjn
Copy link
Contributor

grtjn commented Aug 25, 2016

Don't always blindly believe my suggestions.. ;-)

We should run some tests with this. I recall some feature in latest slush-marklogic-node depends on ./ml dev info returning results without dev.properties. Also not sure what happens with commands that don't take env (like ml upgrade and such)..

@RobertSzkutak
Copy link
Contributor Author

RobertSzkutak commented Aug 31, 2016

Took me a couple days but I was able to try out every command and couldn't find any impact to the upgrade command, the other general commands or the scaffolding commands. The bootstrapping commands and deployment/data commands app all appeared to be positively impacted. I learned that the settings command and some others threw nasty exceptions that were difficult to interpret as missing *.properties files without it.

Example of settings error without the new exception:

ERROR: the scheme http does not accept registry part: :8000 (or bad hostname?) ERROR: ["c:/Ruby193/lib/ruby/1.9.1/uri/generic.rb:213:in 'initialize'", "c:/Ruby193/lib/ruby/1.9.1/uri/http.rb:84:in 'initialize'", "c:/Ruby193/lib/ruby/1.9.1/uri/common.rb:214:in 'new'", "c:/Ruby193/lib/ruby/1.9.1/uri/common.rb:214:in 'parse'", "c:/Ruby193/lib/ruby/1.9.1/uri/common.rb:747:in 'parse'", "c:/cygwin64/home/bobby/projects/roxy-app-fix/deploy/lib/MLClient.rb:68:in 'build_request_params'", "c:/cygwin64/home/bobby/projects/roxy-app-fix/deploy/lib/MLClient.rb:93:in 'go'", "c:/cygwin64/home/bobby/projects/roxy-app-fix/deploy/lib/server_config.rb:2231:in 'execute_query_8'", "c:/cygwin64/home/bobby/projects/roxy-app-fix/deploy/lib/server_config.rb:512:in 'execute_query'", "c:/cygwin64/home/bobby/projects/roxy-app-fix/deploy/lib/server_config.rb:1472:in 'settings'", "deploy/lib/ml.rb:163:in '<main>'"]

I will investigate the impact on Slush soon.

@dmcassel
Copy link
Collaborator

Looks good to me. @grtjn you happy with this?

@RobertSzkutak
Copy link
Contributor Author

RobertSzkutak commented Oct 26, 2016

@grtjn I did a review of Slush and can't find any code to suggest it would be impacted by this. I tried it out on a Slush install I already had up and running and it seemed ok. If Slush is impacted by this for some reason I'd personally prefer that Slush finds another way to accomplish whatever it needs than by relying on returning non-existent properties..

@dmcassel
Copy link
Collaborator

This looks good to me.

@dmcassel dmcassel merged commit ca757f7 into marklogic-community:dev Oct 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants