Skip to content

Fix/ci integration tests#122

Open
codxbrexx wants to merge 3 commits intometacall:masterfrom
codxbrexx:fix/ci-integration-tests
Open

Fix/ci integration tests#122
codxbrexx wants to merge 3 commits intometacall:masterfrom
codxbrexx:fix/ci-integration-tests

Conversation

@codxbrexx
Copy link
Copy Markdown
Contributor

Summary

Fixes three independent CI failures that were blocking the integration test suite. No production behaviour changes — all fixes are either infra config or test-image-only patches.

Related issue

Part of tracking epic #99

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Chore / CI
  • Breaking change

How to test

cd faas/
docker compose down --remove-orphans
docker compose up --build --exit-code-from test --abort-on-container-exit
# Expected: metacall_faas_test exited with code 0

Checklist

  • I have read the contributing guidelines
  • I added tests that prove my fix is effective or that my feature works
  • I updated documentation if necessary

Notes for reviewers

Three independent bugs, three minimal fixes:

1. Container always unhealthy
docker-compose.yml healthcheck used curl but the runtime image only ships wget. Changed to wget.

2. Node.js crash — Unexpected end of form
file.on('error') was registered inside the async mkdtemp callback in src/controller/package.ts. If busboy emitted the error before mkdtemp resolved, no listener existed and Node.js threw an unhandled error event crashing the process. Fixed by attaching the error guard immediately at the top of the file handler, before any async work.

3. HTTP 400 on every metacall-deploy --dev
form-data.getLengthSync() computes the wrong byte count for archiver streams, setting an incorrect Content-Length header. The server reads exactly that many bytes and treats the remainder as a malformed second request → 400. Fixed by patching @metacall/protocol in the Dockerfile test stage to force chunked transfer encoding. The patch only affects the test image and fails the build loudly if the upstream source changes.

test/test.shBASE_URL now reads from $FAAS_URL env var (default: http://localhost:9000) so CI can redirect the runner without editing the script.

Release notes

CI integration tests now pass end-to-end. No changes to production server behaviour.

Test
image

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