xqerl icon indicating copy to clipboard operation
xqerl copied to clipboard

container instance checks

Open grantmacken opened this issue 2 years ago • 0 comments

This is a reworking of of the gh workflow actions after the erlang and rebar3 removal from the standard ubuntu:latest runner.

The workflow now contains workflow calls.

  1. build-check.yml: Initial checks are run by
  • building a production tar on the official erlang:alpine container,
  • unpacking then running xqerl
  • running pass -fail or informational checks
  1. xqerl-slim-tar.yml: If these checks succeed, then we
  • build a production tar on the official erlang:slim container
  • check if it runnable. if the runnable check succeeds AND if we have pushed an annotated tag then a github semver release tar is created based on the slim build.
  1. xqerl-alpine-image.yml:
  • runs on ubuntu-latest
  • image built with buildah then saved as a tar and uploaded as an artefact
  • subsequent jobs,
    • download the tar,
    • load the image into the local image registry,
    • then run a container instance
    • then run checks using the container instance These checks include
  • db CRUD ops with_curl
  • demonstration of data backup and restore using container volumes
  • bulk db ops - xml
  • bulk db ops - json TODO
  • JSON test suite compliance
  • these checks are warning - informational

NOTE: duplicate items are appearing the database https://github.com/zadean/xqerl/actions/runs/4033491594/jobs/6934066347#step:6 At the moment a warning is given however, this should be a fail when an attempt is made to resolve issue

Below is the original issue #75 I was working from

Use gh actions to run typical db CRUD ops using a reasonable amount of data in a container instance. The idea is to check the xqerl app server database for db op regression bugs

  • [x] Build the xqerl container image then run a container instance with volume mounts
  • [x] Working with xqerl rest db api
    • create XDM document-node resource with Slug header
    • create XDM document-node resource without slug
    • use HEAD method to check if database resource available
    • use Accept header to retrieve XDM document-node resource serialized as XML
    • use PUT method to update database XML resource
    • use GET method after PUT to retrieve modified resource
    • use DELETE method to remove resource
  • Check in xqerl logs if the above ops created a CRASH and that we can list resources
  • [x] stop start checks
    • pause container instance - this will stop all running processes in container
    • unpause container instance and check if xqerl is running, no Crash occurred, and db data can be listed
    • stop container instance, remove named container.
    • run new container instance with same named volume mounts and check if no Crash occurred, and db data can be listed
  • [x] bulk loading of data into database: with each load stop container, remove container instance, then run new instance and check if no Crash occurred, and that db data can be listed
    • [x] with rest db API load source data obtained from the test directory.
    • [x] with ''xqldb_dml:import_from_directory()" and xqerl eval
    • [ ] with restXQ module functions
  • [x] Demonstrate code and data backup by exporting xqerl-data and xqerl-code volumes

grantmacken avatar Dec 05 '22 03:12 grantmacken