Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Daniel Zou
    @dzou
    Just an update, this is the method I used to add the converters if you are interested. Maybe let me know if there are pitfalls with this approach since I discovered this method through digging around framework code; was unable to find official documentation about this: https://github.com/spring-cloud/spring-cloud-gcp/pull/2168/files#diff-04e47cc423dee80f0eb313f527e9f5b2R73-R90
    Oskar Olsson
    @olssonoskar
    Hey everyone!
    Quick question, is there a way to model subcollections in firestore with repositories or are they meant for root level only? I can't find anything about this in the reference documentation. Any pointers to where I can find some sources on this would be appreciated.
    dmitry-s
    @dmitry-s
    @olssonoskar I believe it should just work. If anything doesn't work, please create an issue and we will investigate.
    Oskar Olsson
    @olssonoskar
    @dmitry-s I see, well I might have done something incorrectly. I have a top level collection with a repository that works great, I then tried to make a repository for a subcollection of the top-level collection, but I did not get that to work. As i understand it, Firestore links every document to its own subcollection with isolated documents. You refrence a document and then you can query for that documents subcollections. Is this something that the 'subcollection' repository would have any knowledge of? It feels strange since the two repositories is in no way linked in my application so that information would be lost, so how then would a query know which of the documents subcollection it should query? If you think this is a question better suited for something like stack overflow I can of course ask there instead! :)
    Daniel Zou
    @dzou
    @olssonoskar - Hey thanks for reporting the issue. I think we might not actually support non-root level collections right now but I am not 100% sure. But yeah from your description of the issue, I think we do not offer a way of specifying the parent document for the repository which would mean there would be no way to isolate non-root-level collections. Would you mind posting an issue to our Issuetracker and sharing some code samples of what you tried to do? I think this may be a missing feature and our team will discuss to see how to implement it.
    Oskar Olsson
    @olssonoskar
    @dzou Alright, Ill do that. Thank you for taking your time to respond, cheers!
    Daniel Zou
    @dzou
    @olssonoskar - of course! Please don't hesitate to ask questions here or on our issuetracker; we really appreciate when people reach out and ask questions.
    Oskar Olsson
    @olssonoskar
    I think @dmitry-s opened #2189 in response to this? Just to make sure and to avoid duplicate the issue!
    Mike Eltsufin
    @meltsufin
    Yep, he did! :)
    Oskar Olsson
    @olssonoskar
    Great!
    Henry Brown
    @hgbrown

    Query for Help on GCP with Cloud Storage

    Hi,

    I am hoping someone can help me with the following. I have a Google App Engine Standard Environment Java application in which I am trying to create a bucket into which I want to store some data. When I create a bucket, it creates it in the root of my buckets (I.e. /Buckets/) as a sibling to my project bucket (i.e. the bucket with the name /Buckets/<projectId>.appspot.com). When I try to specify the full name of the bucket as: <projectId>.appspot.com/<new_bucket_name> it tells me my bucket name is invalid. When I simply use <new_bucket_name> as the name of the bucket to be created it does create it but at the location /Buckets/<new_bucket_name>.

    How do I create a new bucket inside of my project bucket?

    The code I am using is as follows:

    Storage storage = StorageOptions.getDefaultInstance().getService()
    Bucket bucket = storage.create(BucketInfo.of(bucketName))
    bucket.create(fileName, fileContent.getBytes(StandardCharsets.UTF_8)

    Any help would be greatly appreciated.

    Mike Eltsufin
    @meltsufin
    Elena Felder
    @elefeint
    So what you want to do is:
    storage.create(
                    BlobInfo.newBuilder(BlobId.of("<projectId>.appspot.com", "<new_folder_name>/<file_name>")).build(),
                    fileContent.getBytes()
            );
    By the way, if you use spring-cloud-gcp-starter-storage, you can autowire the Storage object
    Daniel Zou
    @dzou

    @ryanjbaxter - Hey I had a question about the spring.io learn tab - Is there a way for us to control where the "API doc." link links to for the various versions of our library? https://spring.io/projects/spring-cloud-gcp#learn

    i.e. like by modifying our sagan-index.adoc or some similar edit.

    Ryan Baxter
    @ryanjbaxter
    I dont think so I think it needs to be done manually, I can update it if you want
    Daniel Zou
    @dzou
    Ah I gotcha, sorry to bother you on this front. I'm currently republishing the javadocs for our snapshot version and will follow up in a few minutes. But regarding general practices, would it be ok for us to ask to update the API docs link for new GA release versions in the future? I guess this should occur sparingly.
    Ryan Baxter
    @ryanjbaxter
    yes
    Daniel Zou
    @dzou
    Cool, many thanks for your help.
    Ryan Baxter
    @ryanjbaxter
    any time
    Daniel Zou
    @dzou

    @ryanjbaxter - Hey just following up - could you update the API doc link for 1.2.2 SNAPSHOT with this link: https://googleapis.dev/java/spring-cloud-gcp/1.2.2.BUILD-SNAPSHOT/index.html

    Really appreciate the help!

    Ryan Baxter
    @ryanjbaxter
    done
    haiderali22
    @haiderali22
    Henry Brown
    @hgbrown
    Thanks Mike Eltsufin and Elena Felder for the help! I got it working. Really appreciate the help Thanks!!
    Mike Eltsufin
    @meltsufin
    @haiderali22 I posted a reply.
    Mike Eltsufin
    @meltsufin
    @spencergibb Is the the Hoxton.SR3 going out tomorrow?
    Spencer Gibb
    @spencergibb
    Moved to Monday
    date updated in milestone
    Mike Eltsufin
    @meltsufin
    ok, thanks!
    Mike Eltsufin
    @meltsufin
    @spencergibb during the last SR for Hoxton, it looks like Spring Cloud GCP release was skipped?
    Spencer Gibb
    @spencergibb
    @meltsufin Hoxton.SR2 was an unscheduled release specifically for spring-cloud-stream and spring-cloud-function, everything was skipped except those. Hoxton.SR3 is what SR2 was originally scheduled to be.
    Mike Eltsufin
    @meltsufin
    I see. Sounds good. Just wanted to make sure we're part of the next one.
    Spencer Gibb
    @spencergibb
    everyone will be
    Mike Eltsufin
    @meltsufin
    Also, note we will be releasing from the master branch rather than 1.2.x after spring-cloud/spring-cloud-gcp#2222 is in.
    Spencer Gibb
    @spencergibb
    Please let us know as we need to change jenkins config. Will this be happening before monday?
    Mike Eltsufin
    @meltsufin
    hopefully the PR will be in by EOD tomorrow. I'll give you an update.
    Spencer Gibb
    @spencergibb
    If it isn't is will need to wait until the next release
    Mike Eltsufin
    @meltsufin
    The PR has been merged. So, we're ready on our side to release from master.
    If you're able, please unlock the 1.2.x branch so that we can delete it.
    Maurice Zeijen
    @mzeijen
    Hi, just want to give a headsup that I created a draft pull request today, for making the PubSub reactive pull non-blocking: spring-cloud/spring-cloud-gcp#2227
    Its a draft as not everything is implemented yet, but before I spend any time on it, I would like to know if this has a future in the master branch ;).
    Elena Felder
    @elefeint
    @mzeijen Thank you! At the time we were adding reactive Pub/Sub, it was experimental, as it was not yet clear how prevalent reactive adoption would be. This is why we tried build on top of existing, blocking APIs. By now, though, it's clear that reactive has become an important pattern in Java applications, and that asynchronous APIs in general are useful/necessary. Your code looks great; we are happy to work with you on incorporating async APIs into PubSubTemplate.
    I would say that it's good to file a separate issue for the bugs in existing code, even if they end up being addressed by this PR.
    Time-wise, the team is focusing on a service release today, but we'll review later in the week. It might also be good to get together on a call to go over it in person.
    Spencer Gibb
    @spencergibb
    @meltsufin 1.2.x should be deletable
    Mike Eltsufin
    @meltsufin
    thanks!
    Are we still on track for the release today?
    Spencer Gibb
    @spencergibb
    likely tomorrow, but very close
    Mike Eltsufin
    @meltsufin
    ok great! I'm asking because we have a couple of PRs we want to try to get in today