Repository navigation
Load-test new OCL exports on a real OpenMRS database - #783
Merged
Merged
Conversation
Adds scripts/ocl-load-test.sh, which builds pihemr and the ZL EMR distribution with the export in content/configuration/backend_configuration/ocl/, starts it in a throwaway openmrs-docker instance restored from the nightly ZL seed image (partnersinhealth/zl-emr-seed-haiti), and checks that the OCL import finished with no item errors. Exit 0 pass, 1 import failed (lists the failing items), 2 couldn't run. The "Update OCL export" Action runs it before opening the PR, with a new "Skip testing against a real OpenMRS database" checkbox, uploads the OpenMRS log as an artifact, and puts the result in the PR description. The PIH "ocl" Claude skill runs the same script. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Pushed a fix: the test build was tagged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Update OCL export" Action now load-tests the new export on a real OpenMRS database before opening its PR. The release check only catches problems we already know about (like the 1.8.47–1.8.50 name UUID clash, UHM-9656). This runs the actual import.
What it does
New
scripts/ocl-load-test.sh:content/configuration/backend_configuration/ocl/(mvn install).openmrs-dockerinstance, restores the nightly ZL seed image (partnersinhealth/zl-emr-seed-haiti, which already has master's export loaded), and runsstart --build. So it's the same upgrade production servers go through.openconceptlab_itemerrors. If there are any, it lists them with the database error,mvn -Ucould otherwise use the published pihemr snapshot.Action changes (
update-ocl-export.yml):ocl-load-test-openmrs-logartifact.pihci(DOCKERHUB_PASSWORD, which this repo already gets: its jfrog build pushes with it) to avoid pull limits.The PIH "ocl" Claude skill runs the same script before putting an export into the distro (PIH/claude-plugins PR to follow).
Tested locally
1.8.56 (the seed already has 1.8.57, the latest release) → passed in about 10 minutes, import about 70 seconds: 9 added, 13842 updated, 3 retired, 41943 up to date.
1.8.57 with a deliberately reused name UUID on concept 7228 → failed, exit 1:
The broken concept needs a new
version_url: the importer skips concepts whose version it has already imported, which is also why the test exercises exactly what a real upgrade would.Not yet run on GitHub; the first real run of the Action will tell us the actual time on a runner.
🤖 Generated with Claude Code