app-gn-publicatie 1.2.1

Fixed

  • batch inserts to database to better support large publications

  • prioritize new publications over retries of failed publications

  • correctly preserve number of retries if service crashes with a pending operation

  • correctly sort decisions in decisions list

Deployment guide

  1. set up the maintenance frontend in docker-compose.override.yml (note that this should replace the identifier, as that is the entrypoint in this stack)

  2. optional: create a backup of the database with /data/useful-scripts/virtuoso-backup.sh ${name-of-container}

  3. bring down everything with docker-compose down

  4. bring up just the maintenance frontend with docker-compose up -d maintenance

  5. git fetch && git checkout v1.2.1

  6. On the GN stack run the following query:

    1. PREFIX dct: <http://purl.org/dc/terms/>
      PREFIX schema: <http://schema.org/>
      CONSTRUCT {
      ?s schema:position ?position.
      }
       where {
      ?s a <http://data.vlaanderen.be/ns/besluit#BehandelingVanAgendapunt>.
      ?zitting a besluit:Zitting;
               besluit:behandelt ?agendapunt; 
               <http://data.vlaanderen.be/ns/besluit#heeftBesluitenlijst> ?besluitenlijst.
      ?s dct:subject ?agendapunt.
      ?agendapunt schema:position ?position.
      } 

    2. dr inspect app-gelinkt-notuleren_virtuoso_1 | grep IPAddress gives you the IP address of the virtuoso docker container

    3. run the query via curl

    4. curl -X POST "http://IP_ADDRESS_OF_CONTAINER:8890/sparql"  \
        -H "Content-Type: application/x-www-form-urlencoded"  \
        -H "Accept:text/turtle" \
        --data-urlencode 'format=text/turtle' \
        --data-urlencode 'query=PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
      PREFIX dct: <http://purl.org/dc/terms/>
      PREFIX schema: <http://schema.org/>
      CONSTRUCT {
      ?s schema:position ?position.
      }
       where {
      ?s a <http://data.vlaanderen.be/ns/besluit#BehandelingVanAgendapunt>.
      ?zitting a besluit:Zitting;
               besluit:behandelt ?agendapunt; 
               <http://data.vlaanderen.be/ns/besluit#heeftBesluitenlijst> ?besluitenlijst.
      ?s dct:subject ?agendapunt.
      ?agendapunt schema:position ?position.
      } '  > /data/app-gn-publicatie/config/migrations/`date +%Y%m%d%H%M%S`-fix-order-of-decisions.sparql
      

    5. adjust the new migration on the publication stack. Wrap the triples it in a INSERT DATA query to insert into the public graph and make sure to use the correct prefix syntax

    6. INSERT DATA {
      GRAPH <http://mu.semte.ch/graphs/public> {
       ... triples...
      }
      }
  7. start virtuoso and the migrations service docker-compose up -d virtuoso migrations

  8. On production: remove the following from the docker-compose.override.yml file (was added as a hotfix)

      besluit-publicatie:
        image: lblod/besluit-publicatie-publish-service:0.9.1
  9. start the stack docker-compose up -d

  10. remove (comment out) maintenance frontend from docker-compose.override.yml

  11. start the stack docker-compose up -d --remove-orphans(remove orphans removes the maintenance frontend)

  12. verify it's up

Deployments

environment

deployment date

QA

16/07/2021

Sandbox (gebruikerssessie)

19/07/2021

PROD

26/07/2021

Last updated