Skip to content

fix(integration-tests): sync .shared/ before make check#44

Merged
jr200 merged 4 commits into
masterfrom
fix/integration-gate-sync-shared
Apr 22, 2026
Merged

fix(integration-tests): sync .shared/ before make check#44
jr200 merged 4 commits into
masterfrom
fix/integration-gate-sync-shared

Conversation

@jr200

@jr200 jr200 commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Integration test template checks out dependent services (e.g. whengas-api) and runs make check / make test against them with the library-under-test force-installed
  • Services that adopted the shared ruff/mypy configs (JRL-27 rollout) have pyproject.toml entries like extend = ".shared/ruff.toml"
  • Pre-commit hooks don't run in CI → .shared/ is empty → ruff dies with ENOENT on the extended config → integration gate fails
  • Fix: add an explicit sync step after the library force-install and before make check

Hit on pyapi-service-kit v0.9.0 gate against whengas-api: https://github.com/whengas/whengas-iac/actions/runs/24757769672

Test plan

  • Merge
  • Re-run pyapi-service-kit v0.9.0 integration gate and confirm green

jr200 added 4 commits April 22, 2026 12:13
Services checked out during integration tests have pyproject.toml
entries like `extend = ".shared/ruff.toml"` but pre-commit hooks
don't run in CI, so the .shared/ cache is empty and ruff fails
with ENOENT on the extended config.

Add an explicit sync step after the library force-install and
before `make check` so the shared lint/type configs resolve.

Hit this on pyapi-service-kit v0.9.0 gate against whengas-api:
https://github.com/whengas/whengas-iac/actions/runs/24757769672
Drop explicit `python` arg — sync.sh already has detect_language()
that keys off pyproject.toml / go.mod / package.json. Future-proofs
this step if the integration matrix ever includes non-Python services.
detect_language() was an elif chain — first marker wins — so a
polyglot repo (Go backend + Node frontend at root) silently missed
the secondary language's configs. Rename to detect_languages() and
iterate every marker file, emitting space-separated languages.

The loop already reads `for section in common $LANGS` so unquoted
expansion splits space-separated input correctly. Explicit arg still
works both as single (`./sync.sh python`) and multi (`./sync.sh "python node"`).

Smoke-tested locally against all four marker combinations.
Useful for tooling/meta repos that don't have a pyproject.toml /
go.mod / package.json at the root (so auto-detect emits nothing)
but still want every shared config cached locally.

Language list is derived from the manifest keys at runtime rather
than hardcoded, so adding a new language section to MANIFEST.json
is automatically picked up by `all` without touching this script.

Reordered manifest fetch above arg handling so `all` can expand
against the live manifest.
@jr200 jr200 merged commit be9deee into master Apr 22, 2026
2 checks passed
@jr200 jr200 deleted the fix/integration-gate-sync-shared branch April 22, 2026 03:27
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.

1 participant