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

Exception thrown on bucket create with Smart Flank feature #443

Closed
audkar opened this issue Jan 7, 2019 · 5 comments
Closed

Exception thrown on bucket create with Smart Flank feature #443

audkar opened this issue Jan 7, 2019 · 5 comments
Assignees

Comments

@audkar
Copy link
Contributor

audkar commented Jan 7, 2019

Problem

When gc bucket doesn't exists and Flank tries to create new one - crash happens

Click to expand Stacktrace Caused by: java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:882) at com.google.cloud.storage.BucketInfo$BuilderImpl.build(BucketInfo.java:649) at ftl.args.ArgsHelper.createGcsBucket(ArgsHelper.kt:128) at ftl.args.ArgsHelper.createJunitBucket(ArgsHelper.kt:103) at ftl.args.AndroidArgs.(AndroidArgs.kt:87) at ftl.args.AndroidArgs$Companion.load(AndroidArgs.kt:180) at ftl.args.AndroidArgs$Companion.load(AndroidArgs.kt:173) at ftl.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:33) at picocli.CommandLine.execute(CommandLine.java:1043) ... 9 more

Cause

Seems that regression after SmartFlank commit in file ArgsHelper.kt.
targetBucket is always null here. Should be bucket

P.S. I wanted to to contrib fix myself, but tests doesn't work by default after repo clone 😿

@Macarse
Copy link
Contributor

Macarse commented Jan 7, 2019

@audkar interesting.
Why are your tests failing? what are you seeing?

Worst case scenario, you can send a PR and ci will take care of running the tests.

@audkar
Copy link
Contributor Author

audkar commented Jan 7, 2019

Some of tests fails, because similar exceptions to this

Click to expand
ftl.args.IosArgsTest > cli_device FAILED
com.google.cloud.storage.StorageException: Unknown project id: 0
    at com.google.cloud.storage.spi.v1.HttpStorageRpc.translate(HttpStorageRpc.java:220)
    at com.google.cloud.storage.spi.v1.HttpStorageRpc.list(HttpStorageRpc.java:316)
    at com.google.cloud.storage.StorageImpl$6.call(StorageImpl.java:272)
    at com.google.cloud.storage.StorageImpl$6.call(StorageImpl.java:269)
    at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:89)
    at com.google.cloud.RetryHelper.run(RetryHelper.java:74)
    at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:51)
    at com.google.cloud.storage.StorageImpl.listBuckets(StorageImpl.java:268)
    at com.google.cloud.storage.StorageImpl.list(StorageImpl.java:257)
    at ftl.args.ArgsHelper.createGcsBucket(ArgsHelper.kt:119)
    at ftl.args.IosArgs.<init>(IosArgs.kt:73)
    at ftl.args.IosArgs$Companion.load(IosArgs.kt:145)
    at ftl.args.IosArgs$Companion.load$default(IosArgs.kt:139)
    at ftl.args.IosArgsTest.cli_device(IosArgsTest.kt:465)

    Caused by:
    com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
    {
      "code" : 400,
      "errors" : [ {
        "domain" : "global",
        "message" : "Unknown project id: 0",
        "reason" : "invalid"
      } ],
      "message" : "Unknown project id: 0"
    }
        at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:150)
        at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113)
        at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:378)
        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1067)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:476)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:409)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:526)
        at com.google.cloud.storage.spi.v1.HttpStorageRpc.list(HttpStorageRpc.java:312)
        ... 12 more

@Macarse
Copy link
Contributor

Macarse commented Jan 7, 2019

@audkar how are you running the tests?

@audkar
Copy link
Contributor Author

audkar commented Jan 7, 2019

./gradlew test

@bootstraponline
Copy link
Contributor

The tests run fine in CI on Ubuntu and macOS. No credentials are needed.

image

The tests run automatically in CI reasonably quickly.

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

3 participants