[test] Verify CI workflow + upload_accounts fixes + podman test DB#624
Merged
Conversation
* Fix technical1990.cfg * Fix technical1995.cfg * Fix technical2002.cfg * Fix technical2007.cfg * Fix technical2010.cfg * Fix technical_pre2017.cfg * Adapt new n2o values (changes from T.K.) * Partially apply patched changes to other tech files * Apply changes part 2 * Adapt changes from Thomas (Application) * Adapt changes from Thomas (Livestock) * Remove depricated nhd file * Differentiate between mobile vs. permanent housing for free range * Adapt test data set to include free_range=mobile * Fix wrong variable naming for mobile share * Add new beef cattle categories * Remove digestate effect on application emission * Add first version of crop residues * Clean up recycling fertilizers * Add crop residue er values * Add patched diff to residual tech files * Fix issues introduced with latest code additions/changes * Fix wrong er (Thomas) * Adapt changes from Thomas (Storage) * Add more changes from Thomas (air scrubber)
Pin @qooxdoo/framework to exact 7.8.0 to avoid a 7.9.2 regression where compiled output rewrites qx.locale.Manager.tr(...) into qx.locale.Manager.getInstance().tr(...), which fails at runtime because tr is a static method (upstream issue qooxdoo/qooxdoo#10864). Switch the frontend build from npm/npx to pnpm: configure.ac picks up the pnpm binary, Makefile.am drives qx through 'pnpm exec', and package.json declares packageManager and pnpm.onlyBuiltDependencies (replacing the old pnpm-workspace.yaml approach which broke under pnpm 10). frontend/.npmrc relocates the pnpm virtual store to /scratch for faster CephFS-side installs. Add regenerator-runtime as an explicit devDependency (qooxdoo 7.8.0 imports it but pnpm doesn't hoist it). Drop unused 'showdown.Converter' warning by adding @ignore(showdown.*) to Changelog.js. Stop wrapping data[1] in qx.locale.Manager.tr() in Error.js where senders already pass translated strings, which silences "Cannot interpret message ID null" warnings. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Split 2 words in English GUI terms * Fix reporting crop residues etc. * Refactor free_range: fix->yes * Fix wrong excretion value for new category * Add further changes from Thomas
Wrap the existing t/Dockerfile (Postgres 16 + schema/dump) in make targets so contributors don't have to remember the podman invocation: make db-start # build image + run container, wait for pg_isready make test # prove6 -l t/ with AGRAMMON_CFG pointing at it make unit-test # AGRAMMON_UNIT_TEST=1 prove6 -l t/ (skips DB tests) make db-stop # stop + remove container make db-restart # stop + start make db-logs # podman logs make db-psql # open psql against the test DB Variables PODMAN, DB_IMAGE, DB_CONTAINER, DB_PORT are overridable. Update t/README accordingly (replaces the old docker quick-start). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ropResidues fixtures upload_accounts route handlers (REST + browser) had a control-flow bug where bad-request set the response but the handler kept executing, causing 500s on empty / malformed CSV instead of the intended 400. Rewrite both handlers with explicit if/else so the success path is unreachable when validation fails. Adjust agrammon-rest.openapi accordingly: drop format: binary on the accounts field (current Cro multipart parser hands the validator a decoded Str, which the binary-string check rejects), and declare a '400' response so Cro's response validator doesn't turn 400s into 500s on validation failure. t/routes-user.rakutest: add `use Cro::HTTP::Body;` so Cro::HTTP::Body::MultiPartFormData::Part resolves at parse time (without it the module name is parsed as &Part, a sub). t/run-complex-model-with-filters.rakutest and t/webservice.rakutest: update expected outputs for the hr-inclNOxExtendedWithFilters and SummaryTotal cases to reflect the recent PlantProduction::CropResidues addition. Old values preserved as comments per existing convention. CI workflow cleanup (.github/workflows/backend-and-models.yml): - bump actions/checkout from v2 (Node 20 deprecation) to v4 - fail-fast: false so both ubuntu-22.04 and -24.04 legs report - actions/cache path: $HOME/.agrammon → ~/.agrammon (the action does not expand $VAR; the model cache was effectively never hitting) - replace deprecated CREATE GROUP with CREATE ROLE + GRANT - scope postgres health check to a real user/db so the service log isn't flooded with `role "root" does not exist` from pg_isready - drop -v from the prove6 invocation; CI logs were huge Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cro::HTTP 0.8.12 (released after 0.8.11) added a `.name` lookup in
Cro::HTTP::Router::Route.definition-complete (line 447) that does not
work with the OperationHandler shape produced by
Cro::OpenAPI::RoutesFromDefinition 1.0.4 (the version we use):
No such method 'name' for invocant of type
'Cro::OpenAPI::RoutesFromDefinition::OperationSet::OperationHandler'
CI hits this on any fresh `zef install` because META6.json was open-
ended. Pin the working version until upstream RoutesFromDefinition
releases support for the new Router internal API.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…TTP pin The previous Cro::HTTP:ver<0.8.11> pin in META6.json doesn't fully help: zef installs both 0.8.11 (matching our pin) and 0.8.12 (pulled in transitively, e.g. by Cro::HTTP::Test), and Raku's runtime then loads 0.8.12 for any unversioned `use Cro::HTTP::Router`. The pin restricts our direct dep but not what the runtime actually picks up. The real fix is the missing `.name` and `.url-prefix` attributes on Cro::OpenAPI::RoutesFromDefinition::OperationSet::OperationHandler; PR proposed at croservices/cro-openapi-routes-from-definition#15. Until that PR lands and 1.0.5 ships, install a patched fork from zaucker/cro-openapi-routes-from-definition@add-name-attr-to-operationhandler into the Raku module path *before* the main zef install, so the project's deps-only install sees Cro::OpenAPI::RoutesFromDefinition already satisfied at 1.0.4 and skips it. Drop the workaround step (and bump nothing else) once upstream releases the fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Test PR — verifies that the CI workflow changes and code fixes work correctly. Not for merging in this form; this PR is to surface CI green/red status and any remaining issues.
Contents
Three commits (all already on
zaucker:main; this branch points at the same HEAD):270643a4"fixes and text/gui improvements from Thomas (fixes and text/gui improvements from Thomas #623)"e735475c"Add podman-based test DB targets to top-level Makefile"1335a917"Fix upload_accounts handlers, OpenAPI spec, and CI workflow; update CropResidues fixtures"What changed and why
Bug fixes the upstream CI was failing on:
lib/Agrammon/Web/Routes.rakumodandAPIRoutes.rakumod— theupload_accountshandlers hadbad-requestfollowed by fall-through into success-path code; bad input ended up returning 500 instead of 400. Restructured with explicitif/else.share/agrammon-rest.openapi— added a'400'response (without it Cro's response validator turned 400s into 500s) and droppedformat: binaryon theaccountsfield (Cro's multipart parser hands the validator a decodedStr, which the binary-string check rejects).t/routes-user.rakutest— addeduse Cro::HTTP::Body;soCro::HTTP::Body::MultiPartFormData::Partresolves.Test fixture updates for the
PlantProduction::CropResiduesmodel addition (numerical drift was masking real problems in CI):t/run-complex-model-with-filters.rakutest— new expected nh3/n outputs forhr-inclNOxExtendedWithFilters, old values preserved as comments per existing convention.t/webservice.rakutest—get-outputs-for-restSummaryTotal updated 141 → 156.CI workflow cleanup (
.github/workflows/backend-and-models.yml):actions/checkout@v2→@v4(Node 20 deprecation)fail-fast: falseso both ubuntu-22.04 and -24.04 legs report independentlyactions/cachepath:$HOME/.agrammon→~/.agrammon(the action does not expand$VAR; the model cache was effectively never hitting)CREATE GROUPwithCREATE ROLE+GRANT--health-cmd pg_isreadyto-U postgres -d agrammon_testso the service log isn't flooded withrole "root" does not existfrom health probes-vfrom theprove6invocation; CI logs were hugeNew developer convenience (
Makefile.am,t/README):make db-start/make db-stop/make testetc. wrap the existingt/Dockerfileso contributors can run the full DB-backed suite locally with one command.Local test result
Against the podman-launched test DB:
Test plan
Agrammon backend and modelsworkflow onubuntu-22.04passesAgrammon backend and modelsworkflow onubuntu-24.04passesactions/checkoutNode versionrole "root" does not exist