Skip to content

Comments

Add ingress-client API with typed reqwest clients, docs, and integration coverage#100

Open
robertream wants to merge 4 commits intorestatedev:mainfrom
robertream:client-macro
Open

Add ingress-client API with typed reqwest clients, docs, and integration coverage#100
robertream wants to merge 4 commits intorestatedev:mainfrom
robertream:client-macro

Conversation

@robertream
Copy link

Summary

Adds a new ingress-client capability to the Rust SDK with a typed reqwest-based client API, macro-generated typed ingress clients, and runtime/compile-time test coverage.

Included in this commit

New ingress client module

  • Added src/ingress.rs with:
    • Client
    • ServerUrl (+ TryFrom conversions)
    • AuthToken
    • Request<Res>
    • RequestError
  • Request customization support:
    • headers
    • idempotency key
    • timeout
    • delay query parameter

Macro-generated typed ingress clients

  • Updated macros/src/generator.rs to generate typed ingress client impls for services, objects, and workflows.
  • Generated ingress interfaces use request-oriented trait naming (Into*Request, Request<'a>, create_request).

Crate exports

  • Updated src/lib.rs and feature wiring so ingress client APIs are available behind ingress-client.

Tests

  • Added tests/ingress.rs runtime coverage for ingress behavior, including:
    • typed service/object/workflow invocation
    • auth token validation
    • status propagation
    • idempotency header propagation
    • serialize failure propagation
    • delay=...ms query serialization
  • Updated compile/UI tests for feature-gated ingress paths:
    • tests/compiletest.rs
    • tests/ui/ingress-client/*

Testcontainers

  • Added ingress-client feature forwarding in testcontainers/Cargo.toml.
  • Updated testcontainers/tests/test_container.rs to include a feature-gated typed ingress client integration path alongside the existing HTTP-based one.

Documentation

  • Added module-level ingress docs and typed usage examples.
  • Added API docs for ingress structs/methods and RequestError variants.
  • Added/updated doctests for key ingress entry points.

Validation

  • cargo test -q
  • cargo test --features ingress-client -q
  • cargo test -p restate-sdk-testcontainers --no-run
  • cargo test -p restate-sdk-testcontainers --features ingress-client --no-run

@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


Robert Ream seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@robertream
Copy link
Author

I hadn't read the original issue and PR from a year ago. I updated the implementation to support the "executor" API that was suggested.

@robertream
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

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