Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ramon Navarro Bosch
    @bloodbare
    Captura de Pantalla 2020-04-24 a les 15.09.42.png
    Jordi Masip
    @masipcat_gitlab
    nice, merged!
    Kumar Akshay
    @kakshay21
    Hello everyone!
    I was reading getting started guide on guillotina and while I was making any change in the endpoint, I had to stop the server, install the package pip install -e mypackage and then starting the server. Doesn't guiilotina reload on its own on every code change like django or rails?
    Jordi Masip
    @masipcat_gitlab
    Hi! By default doesn't reload automatically. You need to add the --reload flag on guillotina -c config.yaml serve --reload. Hope this solves you problem.
    Kumar Akshay
    @kakshay21
    oh great, thanks!
    David Bain
    @pigeonflight
    This message was deleted
    1 reply
    Md Nazrul Islam
    @nazrulworld
    Happy to announce the new release of https://pypi.org/project/fhirpath-guillotina/ [a fhirpath addon for guillotina ]
    Eric BREHAULT
    @ebrehault
    the only role having guillotina.AddContent is guillotina.Owner, so if we want to create a simple app where any member can add a new content, we need to change the permissions on guillotina.Member. Couldn't we have a default role allowing to view + add?
    Jordi Masip
    @masipcat_gitlab
    Hi everyone! Now that G6 has been released I created this PR to awesome-asgi repo to add Guillotina florimondmanca/awesome-asgi#41. It needs 20 upvotes to be merged... Can you help with a :+1: ? :)
    David Bain
    @pigeonflight
    I'm getting "POST /db/site/@search HTTP/1.1" 501 Not Implemented when making a call to the search endpoint
    Nathan Van Gheem
    @vangheem
    @ebrehault I think the idea was to be safe by default. It's not obvious that members being to create content is desirable. Maybe there should be a way to activate different permission profiles based on what you'd like to do with the app... Or, the workflow implementation...
    @masipcat_gitlab about the docs, builds for 6.x have been failing: https://readthedocs.org/api/v2/build/11271404.txt
    @pigeonflight you need to configure a search catalog. What settings are you using? Maybe you want to use the postgresql implementation? https://guillotina.readthedocs.io/en/latest/contrib/jsonbcatalog.html
    David Bain
    @pigeonflight
    @vangheem I have that I believe:
    applications:
      - checkup
      - guillotina.contrib.catalog.pg
      - guillotina.contrib.swagger
    databases:
      db:
        storage: postgresql
        ...
    David Bain
    @pigeonflight
    This is kinda bad.... I downgraded to guillotina 5.x and @search works
    David Bain
    @pigeonflight
    1. I can see the cons of having @search work out of the box.
    2. I'm not sure how to activate @search on the 6.x version of guillotina
    Jordi Masip
    @masipcat_gitlab
    @vangheem Yeah, I know, I took a quick look with @bloodbare but I had some trouble installing docs dependencies... I'll try again during this week
    @pigeonflight do you have the python traceback on you access logs? can you share it?
    Jordi Masip
    @masipcat_gitlab

    @pigeonflight I think I found the problem: plone/guillotina@34c6bc0 In G6 we changed some methods of the ICatalog interface and the behavior of the catalog api.

    GET @search uses ICatalog.search and expects queries to be parsed
    POST @search uses ICatalog.search_raw and expects raw queries (i.e. ES queries)

    The former is not supported in pgcatalog. So, I'd say it's not a bug and could be solved changing the api call to a GET. Maybe this breaking change could have had been documented better

    Petri Savolainen
    @petri

    With a simple reservation calendar thus:

    class ICalendar(Interface):
        name = TextLine()
    
    @contenttype(type_name="Calendar", schema=ICalendar, behaviors=[DCbehavior])
    class ReservationCalendar(content.Folder):
        "calendar resource type”

    .. and then POSTing a new calendar with JSON body:

    {
        "@type": "Calendar",
        "name": "Test calendar"
    }

    the response is:

    {
        "@id": "http://localhost:8080/db/calendars/d9a348011fea46d5baab516fdd534941",
        "@name": "d9a348011fea46d5baab516fdd534941",
        "@type": "Calendar",
        "@uid": "c19|d9a348011fea46d5baab516fdd534941"
    }

    Why is the calendar name not returned? As far as I can tell, this is 100% according to how docs instruct? Is name a reserved word because @name, or something?

    Jordi Masip
    @masipcat_gitlab
    which endpoint are you using to fetch the calendar? Are you using the endpoint @items ?
    Petri Savolainen
    @petri
    @masipcat_gitlab this ^ is actual POST response. But no, I was using just GET /db/calendars … ?
    ohh blush ok @items returns everything… thanks!
    Jordi Masip
    @masipcat_gitlab
    The response of the POST doesn't include the object, just a summary to know the ids of the newly created object.
    GET /db/calendars/d9a348011fea46d5baab516fdd534941 should return the field name as well
    Petri Savolainen
    @petri
    I see.. same ”philosophy” with the bare / endpoint without @items . ok makes sense.
    David Bain
    @pigeonflight

    @pigeonflight I think I found the problem: plone/guillotina@34c6bc0 In G6 we changed some methods of the ICatalog interface and the behavior of the catalog api.

    GET @search uses ICatalog.search and expects queries to be parsed
    POST @search uses ICatalog.search_raw and expects raw queries (i.e. ES queries)

    The former is not supported in pgcatalog. So, I'd say it's not a bug and could be solved changing the api call to a GET. Maybe this breaking change could have had been documented better

    I need to re-read this to understand the implications. Are you just saying that GET based search is off the table when using pgcatalog?

    Jordi Masip
    @masipcat_gitlab
    Jordi Collell
    @jordic
    /all anyone on the guillotina sync?
    Nathan Van Gheem
    @vangheem
    ouch, I'm sorry, I had a meeting and didn't realize I was in conflict here
    did you all meet?
    Ramon Navarro Bosch
    @bloodbare
    Was Jordis and me
    Ferran Llamas
    @lferran
    hi guys!
    In 5.x we had this pointer to the server on the root application object that was used to inspect active connections.
    https://github.com/plone/guillotina/blob/5.x/guillotina/factory/app.py#L185
    Any idea how to do this in 6.x?
    Ferran Llamas
    @lferran
    I'm interested in knowing the active connections of the server
    Jordi Masip
    @masipcat_gitlab
    I'd say with an asgi middleware
    Jordi Masip
    @masipcat_gitlab

    Hi! I want to choose the pool_size of the db pool from my k8s yaml:

    I have the following name/value

    - name: G_databases__db__pool_size
    - value: "4"

    the problem is that guillotina doesn't convert the "4" to integer and asyncpg crashes with: TypeError '<=' not supported between instances of 'str' and 'int'

    I was thinking to convert the str to int here https://github.com/plone/guillotina/blob/4c814b60b774f94a39344514b6127fa1ad85963f/guillotina/db/factory.py#L64 but I'm asking to know if there is a better way / place to do it.

    Thank you!

    ps: k8s doesn't like a numeric value under env:

    Ramon Navarro Bosch
    @bloodbare
    I would feel ok with that aproach
    Jordi Masip
    @masipcat_gitlab
    :+1: I'll open the PR soon
    Nathan Van Gheem
    @vangheem

    how would everyone feel about simply adding prometheus directly to guillotina?

    I'd like to add metrics to our database layers and adding some kind of metrics utility in order for us to capture this seems a bit silly. Prometheus has very low overhead and most of us use it anyways. Thoughts?

    @all ^^
    Ramon Navarro Bosch
    @bloodbare
    As a contrib?
    Nathan Van Gheem
    @vangheem
    nah, we'd need to put metrics on specific things in the db and probably other caching layers
    no way could it be in contrib unless we added other generics
    Ramon Navarro Bosch
    @bloodbare
    At least should be possible to deactivate and not collect metrics
    Nathan Van Gheem
    @vangheem
    ok, I guess I just see minimal value in having it optional/configurable
    Ramon Navarro Bosch
    @bloodbare
    Yups
    Nathan Van Gheem
    @vangheem
    we okay with introducing prometheus and directly using it then?
    Jordi Masip
    @masipcat_gitlab
    Sounds good :)
    Ramon Navarro Bosch
    @bloodbare
    @all we open sourced two small guillotina packages we’ve been using just in case are interesting: https://pypi.org/project/guillotina-nats/ and https://pypi.org/project/guillotina-numpy/
    To connect guillotina to Nats or Nats streaming and to store numpy fields on guillotina objects