linkedin / linkedin-gradle-plugin-for-apache-hadoop

Apache License 2.0
117 stars 76 forks source link

repeat console input untill non-empty password for azkabanUpload #269

Open bhargav-patel opened 4 years ago

bhargav-patel commented 4 years ago

Usecase: When user runs gradle azkabanUpload command, there are two scenarios that can happen in terms of login:

  1. Session already exists: In this case user is required to press enter to resume previous session.
  2. Session doesn't exists/expired: In this case user is asked for password. But this step doesn't check for empty password.

Since option 1 happens most of the time and command takes some time to run, user tends to press return key one or more time as soon as command is run. But when session is expired, extra return key causes empty password input and gradle task fails. For projects with complex task dependencies it can take up to 5 minutes to reach password prompt again.

Solution: When password is empty, ask for password again. This way even with extra return keys, user will be still on password prompt.

Changes:

Testing: