Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Elena Felder
    @elefeint
    no issue, just traces not showing up -- the sampling works, but because SpanHandler bean is needed to bridge from instrumentation to reporter, the traces don't make it to reporter. It's configured for Zipkin here: https://github.com/spring-cloud/spring-cloud-sleuth/blob/bd149ce4a7c2154fe8526394d14b6ab89addd62e/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/ZipkinAutoConfiguration.java#L179 , I am guessing we need to do the same for Stackdriver
    I'll look more into it today; don't worry about it yet
    need to read the comprehensive documentation Adrian usually writes for changes. In "hours of troubleshooting can save minutes of reading documentation" situation, clearly.
    Marcin Grzejszczak
    @marcingrzejszczak
    :D
    Kriti
    @Kriti84252554_twitter
    Hi, is there any sample project for generating tokens from google cloud APIs? The userCredentials are stored in GCP
    Mike Eltsufin
    @meltsufin
    @Kriti84252554_twitter Can you clarify what kind of tokens you're looking to generate and for what kind of use case?
    Kriti
    @Kriti84252554_twitter
    Hi @meltsufin I want to validate my users against GCP IAM using spring boot application
    but I do not want to re-direct them to google SSO page
    Mike Eltsufin
    @meltsufin
    How do your users provide the credentials to your app?
    Also, maybe this page is relevant: https://cloud.google.com/iam/docs/testing-permissions.
    Daniel Zou
    @dzou
    @spencergibb -- Hey Spencer, what's your recommendation for how to move forward on this issue: spring-cloud/spring-cloud-config#1695 Our pub/sub integration using the config server is affected by this too. Curious what your recommendations are for integrators; I can see users setting the legacy-processing setting on an individual level, but what are recommended practices for library integrators to get things working out of the box? @ttomsu has some more context too.
    Spencer Gibb
    @spencergibb
    it's a documentation issue
    if bootstrap is required there is a new spring-cloud-starter-bootstrap to enable it by default. We want to move to the spring.config.import style
    Daniel Zou
    @dzou
    Ah I see, thank you for clarifying!
    Spencer Gibb
    @spencergibb
    @dzou made some comments there, you'll need to set a property or include a new starter. But we are planning on moving to the new import as the default way of working.
    Travis Tomsu
    @ttomsu
    Hmmm... I added that spring.cloud.bootstrap.enabled=true value and I'm still not seeing the value in /actuator/env
    @spencergibb ^
    Spencer Gibb
    @spencergibb
    @ttomsu where did you add the property?
    Travis Tomsu
    @ttomsu
    ahh, I think I got it with both the spring-cloud-starter-bootstrap and the property set
    Spencer Gibb
    @spencergibb
    shouldn't be needed. Where did you add the property?
    Travis Tomsu
    @ttomsu
    application.properties
    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