Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Rafael B.C.
    @blacar

    Hey ... hopefully I can get some help here

    I am running
    spring-boot 2.2.10
    spring-cloud-gcp-pubsub 1.2.5

    I am receiving messages with different sizes from GCP pubsub subscription on PULL mode.
    Whenever I receive large messages (4-5Mb) ... well ... I cant.

    The message never reachs my listener code, the service logs INFO "Received data on closed stream"
    The message keeps on "outstanding" status so never dequed, but either never acked, nor dlq-ed

    I am aware of gRPC limit 4Mb problem was solved time ago and I can see ...

      /** Returns a builder for the default ChannelProvider for this service. */
      public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
        return InstantiatingGrpcChannelProvider.newBuilder().setMaxInboundMessageSize(20 << 20);
      }

    In com.google.cloud.pubsub.v1.stub.SubscriberStubSettings code so I guess thats not the case.

    I have read also about keepAlive problem but guess solved time ago as well.

    ... so I am lost on how to proceed with this :(

    Travis Tomsu
    @ttomsu
    Hey @blacar - apologies for not seeing this sooner. I'm not sure about this, but if you're still seeing this, would you mind opening up an issue on github.com/GoogleCloudPlatform/spring-cloud-gcp ? We can get the PubSub team involved here as well if we can't hunt it down.
    Elena Felder
    @elefeint
    spring-cloud-gcp exposes the channel providers as beans for you to override. Pub/Sub has a default of 4MB that overrides the gRPC one
    To override the default pub/sub channel provider, provide a bean of type TransportChannelProvider named subscriberTransportChannelProvider
    Marcin Grzejszczak
    @marcingrzejszczak
    Hi! We released gcp 1.2.6.RELEASE (https://github.com/spring-cloud/spring-cloud-gcp/tree/v1.2.6.RELEASE) can you bump snapshots to 1.2.7.BUILD-SNAPSHOT?
    Mike Eltsufin
    @meltsufin
    Will do!
    Mike Eltsufin
    @meltsufin
    @marcingrzejszczak Can someone please update our learn page (https://spring.io/projects/spring-cloud-gcp#learn) to list the 1.2.6 release? The Javadocs will be at https://googleapis.dev/java/spring-cloud-gcp/1.2.6.RELEASE/index.html
    Marcin Grzejszczak
    @marcingrzejszczak
    updated
    Mike Eltsufin
    @meltsufin
    thanks!
    Andreas Kluth
    @AndreasKl
    Hi, I'm trying to calculate a signUrl for a file on cloud storage. My application is running on cloudrun, is a spring boot application and uses the cloud gcp starter. I can access the blob via val blob = storage.get(BlobId.of(bucketName, attachment.location)) but the signUrl call fails with a permission exception. My service is running under a service account that has the appropriate permissions and I'm able to generate the URI locally by passing the service-account.json. I'm assuming the service account in my app is not the same that I have configured?
    How would I retrieve the ServiceAccountCredentials for the service account my cloudrun application is running on (or validate which account spring gcp is using)?
    Elena Felder
    @elefeint
    signing URLs requires a different permission -- try "Service Account Token Creator" role
    Mike Eltsufin
    @meltsufin
    This might help figuring out which identity your app is using: https://cloud.google.com/run/docs/securing/service-identity
    Andreas Kluth
    @AndreasKl
    @elefeint Thanks, this solved my issue.. I thought I used the same account for my local and tests on gcp... maybe I just somehow used another service account locally
    Travis Tomsu
    @ttomsu
    @spencergibb - Hi Spencer - it looks like y'all are making good progress on Ilford-M5 (https://github.com/orgs/spring-cloud/projects/46). We're wondering if you have an estimate as to when this may get released and secondarily, if there will be more changes going in before a full/non-milestone release?
    Spencer Gibb
    @spencergibb
    today
    right now
    Travis Tomsu
    @ttomsu
    Nice :-)
    Travis Tomsu
    @ttomsu
    Excellent! Thank you!
    Daniel Zou
    @dzou
    @spencergibb - Hey, do you have any more docs or examples for integrators on how to implement ConfigDataLocationResolver and ConfigDataLoader described here: https://spring.io/blog/2020/08/14/config-file-processing-in-spring-boot-2-4 (about adding new properties config locations). Very interested in implementing this for our secret manager module.
    @dzou :arrow_up:
    Daniel Zou
    @dzou
    Thanks Spencer! Really appreciate the help.
    Marcin Grzejszczak
    @marcingrzejszczak
    Sleuth 3.0.0-M5 with otel support is released! There might be some breaking changes and maybe more still to come 😬
    Not gigantic though
    Travis Tomsu
    @ttomsu
    @marcingrzejszczak Would you happen to be able to help track down an issue we're having upgrading to Boot 2.4 related to Sleuth/Trace?
    Marcin Grzejszczak
    @marcingrzejszczak
    I can check it out tomorrow
    Travis Tomsu
    @ttomsu
    Ok, thank you!
    3 replies
    Marcin Grzejszczak
    @marcingrzejszczak
    hi! you can check this PR spring-cloud/spring-cloud-sleuth#1784 cause it might break GCP with Sleuth
    Daniel Zou
    @dzou
    @spencergibb - Hey Spencer, what is Spring's recommendation regarding spring.config.import vs. using BootstrapConfiguration (via spring-cloud-starter-bootstrap) ? Our project has a bootstrap configuration which loads a property source into the context. We're trying to understand if whether we need to implement those ConfigData classes or if we can get by just adding the spring-cloud-starter-bootstrap dependency
    Spencer Gibb
    @spencergibb
    @dzou spring.config.import bypasses some of the edge cases with bootstrap that can cause problems for folks
    By far the easiest way is to use the bootstrap starter. Just document that folks will use bootstrap still.
    Daniel Zou
    @dzou
    Ok, thanks!
    William S Johnstone III
    @wjohnst3
    Hi, I have a GKE application pushing logging information from stdout to GCP. Logging use Log4j2 as a Json object. When I look at the logged events in Logging Operations (the new one), the collapsed line just shows {...}. Should the json payload be in a specific format?
    Mike Eltsufin
    @meltsufin
    Hi William! Yes, there is a specific format that's expected. See this documentation: https://cloud.google.com/logging/docs/agent/configuration#process-payload
    If you're using Spring Cloud GCP, we already support the correct format via logback. See: https://docs.spring.io/spring-cloud-gcp/docs/1.2.6.RELEASE/reference/html/#log-via-console
    William S Johnstone III
    @wjohnst3
    Great thanks Mike. That's really helpful. I might need to migrate from log4j2 to logback
    William S Johnstone III
    @wjohnst3
    I have one additional ques. I have a new project using spring-cloud-gcp version 2.0.0-rc2. I need gcp secret manager integration but it doesnt seem to be available in that bom. Do you know if i can use the 1.x version or would there be issues?
    Mike Eltsufin
    @meltsufin
    secret manager integration should be there... can you elaborate on what is missing?
    William S Johnstone III
    @wjohnst3
    I include the bom and add the sm dependency. Intellij doesnt resolve it.
    I did remove a bit of my .m2 cache just in case there was some weirdness going on. Do i need to add a diff repo? If i google sm and maven i just see the older 1.x guy and not the new rc2
    Thanks for the quick response btw
    William S Johnstone III
    @wjohnst3
    Could not find artifact org.springframework.cloud:spring-cloud-gcp-starter-secretmanager:pom:unknown in spring-milestones (https://repo.spring.io/milestone)
    ugg...figured it out
    group id moved
    com.google.cloud :)
    Mike Eltsufin
    @meltsufin
    Yup! And it's in Maven Central now.
    Dan Natic
    @dnatic09

    Hey friends. I am trying to run unit tests in my spring-cloud-gcp-storage-starter application. The application works perfectly because it can pull the correct ENV variables to start the GCP client. In the unit test context, it crashes that the credentials are not available. Is there a recommended way to get this library to support running in a unit test context? I need to point the Storage client to a localhost GCP storage server and to run without passing credentials.

    java.io.IOException: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defining the credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.