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

container instance checks #75

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

grantmacken
Copy link
Contributor

@grantmacken grantmacken commented Jan 28, 2023

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

  • Build the xqerl container image then run a container instance with volume mounts
  • 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
  • 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
  • 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
    • with rest db API load source data obtained from the test directory.
    • with ''xqldb_dml:import_from_directory()" and xqerl eval
    • with restXQ module functions
  • Demonstrate code and data backup by exporting xqerl-data and xqerl-code volumes

Copy link
Owner

Choose a reason for hiding this comment

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

Did something format this file as a different file type? Looks like it got mis-formatted a bit.

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