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

fix: Using --quiet flag to disable all interactive prompts when running datastore emulator #1008

Closed
wants to merge 2 commits into from

Conversation

jainsahab
Copy link
Contributor

Fixes #302 ☕️

LocalDatastoreHelper works on top of gcloud utility and relies on the user input in this specific scenario, As LocalDatastoreHelper programmatically controls the gcloud command, we are using --quiet flag to disable all the prompts for user inputs and use default values instead.

Steps to reproduce (from #302 itself)

  • Remove beta component gcloud components remove beta
  • Run the following code
public class DatastoreGithubIssue302 {
  public static void main(String[] args) throws Exception {
    LocalDatastoreHelper emulator = LocalDatastoreHelper.create();
    emulator.start();

    System.out.println("Started!"); // will never be printed
  }
}

Also, refactoring the code a bit by configuring the gcloud datastore emulator command in a separate utility.

@jainsahab jainsahab requested review from a team as code owners March 6, 2023 08:18
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: datastore Issues related to the googleapis/java-datastore API. labels Mar 6, 2023
@jainsahab jainsahab changed the title Using --quiet flag to disable all interactive prompts when running datastore emulator fix: Using --quiet flag to disable all interactive prompts when running datastore emulator Mar 6, 2023
@conventional-commit-lint-gcf
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@kolea2 kolea2 added the release-please:force-run To run release-please label Mar 29, 2023
@release-please release-please bot removed the release-please:force-run To run release-please label Mar 29, 2023
@kolea2
Copy link
Contributor

kolea2 commented Nov 21, 2023

We will instead depend on an upstream fix for this, googleapis/sdk-platform-java#1954 tracks the issue.

@kolea2 kolea2 closed this Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the googleapis/java-datastore API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starting LocalDatastoreHelper stalls if beta gcloud component is not installed
2 participants