Skip to content
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

mlNewProject fails in 4.5.0 when no authentication information exists #650

Closed
sparnell opened this issue Feb 10, 2023 · 3 comments
Closed
Assignees
Milestone

Comments

@sparnell
Copy link

sparnell commented Feb 10, 2023

Empty directory. Build file contains only
plugins { id "com.marklogic.ml-gradle" version "4.5.0" }
Result:

Configure project :
Evaluating root project 'PerformanceTesting' using build file '/Users/sparnell/projects/PerformanceTesting/build.gradle'.

Initializing ml-gradle
Initializing ManageClient with manage config of: http://localhosthost:8002

FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/sparnell/projects/PerformanceTesting/build.gradle' line: 1

  • What went wrong:
    An exception occurred applying plugin request [id: 'com.marklogic.ml-gradle', version: '4.5.0']

Failed to apply plugin 'com.marklogic.ml-gradle'.
Unable to connect to the MarkLogic app server at http://localhosthost:8002; cause: username must be of type String

I don't have a local instance of MarkLogic installed and don't plan to.
Version 4.4.0 does not have this issue.

@rjrudin
Copy link
Contributor

rjrudin commented Feb 10, 2023

Ack - this is an unforeseen consequence of https://github.com/marklogic-community/ml-gradle/releases/tag/4.5.0 . In <= 4.4.0, ml-gradle was defaulting to admin/admin as username/password, which has never been good. But with those defaults in place, it was good enough for establishing a connection configuration (though no attempt is made to actually connect yet). We did a lot of testing on this change, but no testing where MarkLogic wasn't running.

You can work around this for now via gradle -PmlUsername= -PmlPassword= mlNewProject .

@rjrudin rjrudin changed the title mlNewProject fails mlNewProject fails in 4.5.0 when no authentication information exists Feb 10, 2023
@rjrudin
Copy link
Contributor

rjrudin commented Feb 10, 2023

This is also a result of the connection to the Manage API being configured eagerly as opposed to lazily (it's always been made eagerly). Fix will be in ml-app-deployer, as it appears simple to lazily instantiate the connection, which is all done via private methods that are invisible to a client.

@rjrudin rjrudin added this to the 4.5.1 milestone Feb 16, 2023
@rjrudin rjrudin self-assigned this Feb 16, 2023
@rjrudin
Copy link
Contributor

rjrudin commented Feb 16, 2023

Fixed via ml-app-deployer, getting 4.5.1 out momentarily.

@rjrudin rjrudin closed this as completed Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants