Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the publication of large meeting notulen #37

Merged
merged 3 commits into from
May 5, 2024

Conversation

abeforgit
Copy link
Member

@abeforgit abeforgit commented Apr 30, 2024


Overview

While we already have publications coming in as files from GN, the publish service was still
enhancing the html and storing that as a db string, generating the same problems as before.
Additionally, that service was very very inefficient, and crashing seemingly at random for
large publications. I suspect it was simply hitting some kind of resource limits, but I can't
be sure.

In any case, the publish service has been greatly optimized in the linked PR and the frontend
has been updated to accommodate the file storage.

On the app config itself, I added the file config to the resources config to support the changes in the frontend.

connected issues and PRs:

JIRA: https://binnenland.atlassian.net/browse/GN-4775

service: lblod/besluit-publicatie-publish-service#13
frontend: lblod/frontend-gelinkt-notuleren-publicatie#123

Setup

This app has always assumed it runs on the same machine as Gelinkt Notuleren and required
a volume mount for the GN files (this was initially done for attachments, but is now also used
for the publications).

This kind of setup is also used in production.

(for both of the below configs: merge with what you already have, dont completely overwrite your override file)

app-gelinkt-notuleren-publicatie: docker-compose.override

services:
  publicatie:
    image: !reset null
    build: https://github.com/lblod/frontend-gelinkt-notuleren-publicatie.git#feat/publication-as-files

  besluit-publicatie:
    image: !reset null
    build: https://github.com/lblod/besluit-publicatie-publish-service.git#fix/publication-as-files
    volumes:
      - <location of your app-gelinkt-notuleren folder>/data/files/:/share/
  file:
    volumes:
      - <location of your app-gelinkt-notuleren folder>/data/files/:/share/
      
  # enable the following for linking the consumer to a local stack
  # assumes the app-gn stack is running locally on your host
  # and you've renamed the GN identifier to identifier-gelinkt-notuleren
  published-resource-consumer:

    environment:
      NODE_ENV: development
      SERVICE_NAME: 'published-resource-consumer'

      SYNC_BASE_URL: 'http://identifier-gelinkt-notuleren'
      # for faster ingesting, poll every 5 seconds instead of every minute
      INGEST_INTERVAL: 5000
    networks:
      - default
      - shared-gn-pub

networks:
  shared-gn-pub:
    name: shared-gn-pub
    external: true

app-gelinkt-notulereln: docker-compose.override

services:
  identifier:
    networks:
      default:
      shared-gn-pub:
        aliases:
          - "identifier-gelinkt-notuleren"

networks:
  shared-gn-pub:
    name: shared-gn-pub

How to test/reproduce

  • Start up the GN stack first, as it will create the shared network
  • with the above config, anything you publish on the GN stack should show up on the publication stack within 5-10 seconds
  • try to publish a bunch of things and check if it all works, especially larger meetings with a lot of html content in the notulen (tip: votings and participants on agenda items add a lot of html)

Challenges/uncertainties

Checks PR readiness

  • UI: works on smaller screen sizes
  • UI: feedback for any loading/error states
  • Check cancel/go-back flows
  • Check database state correct when deleting/updating (especially regarding relationships)
  • changelog
  • no new deprecations

Copy link
Contributor

@piemonkey piemonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems to work. I needed to add NODE_ENV: "development" for the backend services with the github build paths, as otherwise it complained there were differences between /app folders, but otherwise the instructions worked fine.

@abeforgit abeforgit merged commit 412bd15 into master May 5, 2024
@abeforgit abeforgit deleted the fix/publication-as-files branch May 5, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants