Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Mike Eltsufin
    @meltsufin
    do you have an approximate timeline in mind?
    end of Feb.
    Mike Eltsufin
    @meltsufin
    got it, thanks
    Spencer Gibb
    @spencergibb
    ilford branching will likely start end of this week or early next
    skogs
    @skogs
    are there any Spring Cloud GCP apis to support creating and listing compute instances?
    If not, seems I can use com.google.api.services.compute.Compute apis. Then, is there any
    sharing possible between libs like credentials. thx!
    Mike Eltsufin
    @meltsufin
    There aren't any integration for it. Your best bet is to probably use the client library: https://github.com/googleapis/java-compute
    You should be able to use the credentials configured via spring-cloud-gcp-core-starter.

    For

        AddressSettings addressSettings =
            AddressSettings.newBuilder()
                .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))

    Just use the autowired CredentialsProvider.

    ...instead of the FixedCredentialsProvider.
    skogs
    @skogs
    great, thanks
    Serhat Soydan
    @ssoydan-strands

    Hi everyone,
    I have a java-maven project which has a dependency - "spring-cloud-gcp-starter-pubsub"
    I want to disable/enable pubsub with a property (not with a profile) but even when I think it is disabled, I see "failed to detect whether we are running on Google Compute Engine" info log.

    I tried different properties like below but none of them seems to work. Do you know if any exist? With the dependency added, it always tries to connect.

    spring.cloud.gcp.pubsub.enabled=false
    spring.cloud.gcp.config.enabled=false
    spring.cloud.gcp.security.iap.enabled=false

    Elena Felder
    @elefeint
    This message comes from the core project attempting to automatically infer what authentication method to use. You have a couple of choices to suppress the attempt to connect to the metadata service: (1) you can explicitly specify credentials through properties or by registering your own bean of type CredentialsProvider (docs)
    and (2) you can continue relying on autodiscovery, but specifically turn off the GCE check with an environment variable NO_GCE_CHECK=true (docs)
    Mike Eltsufin
    @meltsufin
    @ssoydan-strands Can you try:
    spring.autoconfigure.exclude=org.springframework.cloud.gcp.autoconfigure.core.GcpContextAutoConfiguration
    Serhat Soydan
    @ssoydan-strands

    @elefeint NO_GCE_CHECK=true only cleared the log for "failed to detect whether we ....", but I can see more (at least 2) logs like below, so it is a partial workaround:

    2020-01-29T15:49:08,655 INFO (1)main [ComputeEngineCredentials.java:257]: Failed to detect whether we are running on Google Compute Engine.
    2020-01-29T15:49:08,656 WARN (1)main [DefaultCredentialsProvider.java:128]: No core credentials are set. Service-specific credentials (e.g., spring.cloud.gcp.pubsub.credentials.*) should be used if your app uses services that require credentials.
    2020-01-29T15:49:08,698 INFO (1)main [GcpContextAutoConfiguration.java:75]: The default project ID is XXX

    @meltsufin it seems that your workaround is working but it is really hard to guess and ugly to find which class to exclude. I would expect the same behaviour after -> spring.cloud.gcp.pubsub.enabled=false
    Mike Eltsufin
    @meltsufin
    yeah we already have an issue to add spring.cloud.gcp.core.enabled prop
    Serhat Soydan
    @ssoydan-strands
    Or as @elefeint opened a new issue, I think we should have a specific property about that
    Mike Eltsufin
    @meltsufin
    contributions are welcome! ;-)
    Serhat Soydan
    @ssoydan-strands
    I would love to contribute if I can :)
    Spencer Gibb
    @spencergibb
    @meltsufin or @elefeint s-c-gcp 1.1.x failing on jenkins
    org.springframework.cloud.gcp.data.datastore.repository.query.PartTreeDatastoreQueryTests.pageableQueryNoPageableParam
    expected:<[1]> but was:<[2]>
    Elena Felder
    @elefeint
    1.1.x. That's a name I haven't heard in a long time
    Spencer Gibb
    @spencergibb
    :-)
    last regularly scheduled
    Mike Eltsufin
    @meltsufin
    Hmm we haven't changed anything there in a long time
    Elena Felder
    @elefeint
    That test sounds awfully familiar though
    I'll check on it
    Spencer Gibb
    @spencergibb
    I'd be fine if it was just disabled ;-)
    Elena Felder
    @elefeint
    hint taken
    Elena Felder
    @elefeint
    oh, I remember this! Spring Data behavior changed and exposed an issue we had
    I'll backport a PR
    Spencer Gibb
    @spencergibb
    :+1:
    Elena Felder
    @elefeint
    I disabled the test
    (the issue was only in test data set up, and the branches got too different to merge easily)
    Elena Felder
    @elefeint
    There are more unit test failures :| Looking into them
    Spencer Gibb
    @spencergibb
    thanks
    Elena Felder
    @elefeint
    some of this has got to be due to downstream dependencies getting upgraded: "Caused by: java.lang.ClassNotFoundException: brave.Request"
    I think this is the last thing I am chasing
    Got it! Sleuth upgraded to brave 5.9.0 but we did not
    Spencer Gibb
    @spencergibb
        <brave.version>5.9.2</brave.version>
    yes
        this is a temporary workaround until we upgrade to the latest zipkin-sender-stackdriver 
    Elena Felder
    @elefeint
    @spencergibb I think spring-cloud-gcp should be fine at branch 1.1.x
    Spencer Gibb
    @spencergibb
    :+1:
    Daniel Zou
    @dzou
    @spencergibb - Hey Spencer, I just wanted to followup on your comment about the Secret Manager - How do we register a "SecretPayload" encoder/decoder in Spring?
    Spencer Gibb
    @spencergibb
    Good question, I don't know the answer off the top of my head, but since it only has string or bytes, that seems enough and spring would handle the rest.
    Daniel Zou
    @dzou
    I see, ok, I'll give it a shot.
    Daniel Zou
    @dzou
    @spencergibb - Hey I discovered I actually need a custom converter for this payload object. I've stumbled across a couple resources for this; this option seems to be the most viable right now; just want to get your thoughts: https://stackoverflow.com/a/30629803/906497