Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Spencer Gibb
    @spencergibb
    it can't be in application.properties because that is too late. Either needs to be a cli arg, system property or env var.
    the starter on its own should work
    Travis Tomsu
    @ttomsu
    I see - I recall reading something about bootstrap.yml - is that the same thing?
    (apologies for silly questions - dusting off the cobwebs)
    Spencer Gibb
    @spencergibb
    only if bootstrap is enabled
    Travis Tomsu
    @ttomsu
    is bootstrap new? I've never heard of it
    Spencer Gibb
    @spencergibb
    nope
    Daniel Zou
    @dzou
    @artembilan - Hey Artem, do you know who might be able to help us with this Actuator question? spring-cloud/spring-cloud-commons#833
    We have a question about how to refresh the application context correctly for a Spring Property Source that maintains an active connection with an external resource
    Artem Bilan
    @artembilan
    @RefreshScope... Probably @spencergibb is the best person to give you some clue...
    Travis Tomsu
    @ttomsu
    Good Morning @spencergibb - question for you re: Ilford releasing. Would it be a bad idea if we started depending on more stable POMs on our master branch - say milestone or even full releases? Based on the breakages from a couple weeks ago, it seems like our build's greenness is highly dependent on numerous SNAPSHOT dependencies.
    Investigating why a build breaks isn't a cheap task either (at least for me, since I'm pretty new to the team).
    Spencer Gibb
    @spencergibb
    we have to go back and forth. The only one we can do is boot. You're free to pin to a milestone of ilford
    unfortunately when there are api changes there's not much we can do
    Travis Tomsu
    @ttomsu
    Totally understandable - there's little we can do too!
    It's basically all the same amount of time - pinning dependencies at least allows us to schedule time to do upgrades vs spending that time randomly throughout the quarter when something breaks.
    I just didn't know if there was something I wasn't aware of that we should know about before doing that
    wilacosta1
    @wilacosta1
    quick question, there any tool to use kms (Cloud Key Management)
    Mike Eltsufin
    @meltsufin
    @wilacosta1 We do not have any specific support for KMS in Spring Cloud GCP, but can you elaborate on your use-case?
    Spencer Gibb
    @spencergibb
    @meltsufin @ttomsu @dzou or @elefeint did you use a tool to transfer any issues to the new repo?
    Mike Eltsufin
    @meltsufin
    @spencergibb No, not yet, and we probably won't.
    Spencer Gibb
    @spencergibb
    thanks
    Travis Tomsu
    @ttomsu
    @spencergibb - qq. When you're doing a release, do you have to do a ./mvnw install first? We're running into an issue where maven fails during a ./mvnw clean deploy because it can't find the submodule spring-cloud-gcp-dependencies, which makes sense because we're literally trying to publish it!
    
    [INFO] Downloading from spring-milestones: https://repo.spring.io/milestone/com/google/cloud/spring-cloud-gcp-dependencies/2.0.0/spring-cloud-gcp-dependencies-2.0.0.pom
    [INFO] Downloading from spring-releases: https://repo.spring.io/release/com/google/cloud/spring-cloud-gcp-dependencies/2.0.0/spring-cloud-gcp-dependencies-2.0.0.pom
    [INFO] Downloading from gcs-mirror: https://maven-central.storage-download.googleapis.com/repos/central/data/com/google/cloud/spring-cloud-gcp-dependencies/2.0.0/spring-cloud-gcp-dependencies-2.0.0.pom
    [INFO] Downloading from central: https://repo.maven.apache.org/maven2/com/google/cloud/spring-cloud-gcp-dependencies/2.0.0/spring-cloud-gcp-dependencies-2.0.0.pom
    [ERROR] [ERROR] Some problems were encountered while processing the POMs:
    [ERROR] Non-resolvable import POM: Could not find artifact com.google.cloud:spring-cloud-gcp-dependencies:pom:2.0.0 in spring-milestones (https://repo.spring.io/milestone) @ line 87, column 16
     @ 
    [ERROR] The build could not read 1 project -> [Help 1]
    [ERROR]   
    [ERROR]   The project com.google.cloud:spring-cloud-gcp:2.0.0 (/tmpfs/src/github/spring-cloud-gcp/pom.xml) has 1 error
    [ERROR]     Non-resolvable import POM: Could not find artifact com.google.cloud:spring-cloud-gcp-dependencies:pom:2.0.0 in spring-milestones (https://repo.spring.io/milestone) @ line 87, column 16 -> [Help 2]
    The only big change we made was removing the parent POM from our root POM.
    Spencer Gibb
    @spencergibb
    @ttomsu yes we do an install first
    jaypeetancero
    @jaypeetancero

    Can you guys help me on my concern? I want to upload the file in GCP to gs://bucket-name/folder/subfolder/file.xxx

    public ResponseEntity uploadFileToConversation(MultipartFile multipartFile, String conversationId, String userId, String userName) throws IOException {
            File file = new File();
            file.setFileName(multipartFile.getOriginalFilename());
            file.setDateCreated(new Date());
            file.setFileType(multipartFile.getContentType());
            Long fileSize = multipartFile.getSize() / 1024;
            file.setSize(fileSize.toString());
            file.setUserId(userId);
    
            java.io.File convertedFile = convertMultiPartToFile(multipartFile);
            Path filePath = convertedFile.toPath();
            String objectName = generateFileName(multipartFile);
    
            Storage storage = StorageOptions.getDefaultInstance().getService();
    
            BlobId blobId = BlobId.of(firebaseBucket + "/folder/subfolder/", objectName);
            BlobInfo blobInfo = BlobInfo.newBuilder(blobId).build();
            Blob blob = storage.create(blobInfo, Files.readAllBytes(filePath));
    
            System.out.println("File " + filePath + " uploaded to bucket " + firebaseBucket + " as " + objectName);
    
            return ResponseEntity.ok().body(file);
        }

    But the console returning me that my bucket name is invalid

    2020-10-22 10:15:07.156 ERROR 5552 --- [0.0-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.google.cloud.storage.StorageException: Invalid bucket name: 'messaging-app-55f65.appspot.com/folder/subfolder/'] with root cause
    
    com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request
    POST https://storage.googleapis.com/upload/storage/v1/b/messaging-app-55f65.appspot.com%2Ffolder%2Fsubfolder%2F/o?projection=full&uploadType=multipart
    {
      "code" : 400,
      "errors" : [ {
        "domain" : "global",
        "message" : "Invalid bucket name: 'messaging-app-55f65.appspot.com/folder/subfolder/'",
        "reason" : "invalid"
      } ],
      "message" : "Invalid bucket name: 'messaging-app-55f65.appspot.com/folder/subfolder/'"
    }

    I hope you can enlighten me on this one.

    Travis Tomsu
    @ttomsu
    @jaypeetancero - it looks like you have the blobId incorrect - try BlobId.of(firebaseBucket, "folder/subfolder/" + objectName)
    Marcin Grzejszczak
    @marcingrzejszczak
    hi! since Spring Cloud GCP is using Spring Cloud Sleuth you might want to check out this PR spring-cloud/spring-cloud-sleuth#1757 (I know that it's gigantic so in case of any questions don't hesitate to ping me)
    Mike Eltsufin
    @meltsufin
    @marcingrzejszczak Thanks for the pointer. Is this going into Ilford?
    Travis Tomsu
    @ttomsu
    Good question ^ since I literally just sent out the PR yesterday to bring us up to Sleuth 3.0.0-M4
    Marcin Grzejszczak
    @marcingrzejszczak
    Yes. This is ilford
    Marcin Grzejszczak
    @marcingrzejszczak
    Like i mentioned in the pr if you're using brave api directly there should be no visible change
    Travis Tomsu
    @ttomsu
    @spencergibb - Trying to figure out where/how spring.io is published and what options we have post-Ilford release for refdocs. Can you help me understand how to go from https://github.com/spring-io/sagan --> https://spring.io/projects/spring-cloud-gcp#overview ?
    3 replies
    Travis Tomsu
    @ttomsu
    @spencergibb Could I get at least read access to jenkins.spring.io ?
    1 reply
    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?