Skip to content

feat: automatically create network specified via --network option if it does not exist#544

Merged
dionhaefner merged 4 commits intomainfrom
heiko/autogen-network
Apr 1, 2026
Merged

feat: automatically create network specified via --network option if it does not exist#544
dionhaefner merged 4 commits intomainfrom
heiko/autogen-network

Conversation

@zmheiko
Copy link
Copy Markdown
Contributor

@zmheiko zmheiko commented Mar 28, 2026

Relevant issue or PR

#530 documents how to use the --network option and needs updating once this PR is merged.

Description of changes

When --network <name> is passed to tesseract serve or tesseract run and no network with that name exists, we now automatically create it instead of failing with a Docker error.

Testing done

Tested that multi-Tesseract hello world example works without explicit network creation.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 56.75676% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.86%. Comparing base (fcff6c9) to head (d196612).

Files with missing lines Patch % Lines
tesseract_core/sdk/docker_client.py 57.14% 9 Missing ⚠️
tesseract_core/sdk/engine.py 56.25% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #544      +/-   ##
==========================================
- Coverage   77.31%   76.86%   -0.45%     
==========================================
  Files          32       32              
  Lines        4381     4418      +37     
  Branches      723      728       +5     
==========================================
+ Hits         3387     3396       +9     
- Misses        701      726      +25     
- Partials      293      296       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@PasteurBot
Copy link
Copy Markdown
Contributor

PasteurBot commented Mar 28, 2026

Benchmark Results

Benchmarks use a no-op Tesseract to measure pure framework overhead.

🚀 1 faster, ⚠️ 0 slower, ✅ 35 unchanged

Notable changes

Benchmark Baseline Current Change Status
http/apply_1,000 4.920ms 3.836ms -22.0% 🚀 faster
Full results
Benchmark Baseline Current Change Status
api/apply_1,000 0.782ms 0.780ms -0.3%
api/apply_100,000 0.792ms 0.769ms -2.9%
api/apply_10,000,000 0.792ms 0.771ms -2.7%
cli/apply_1,000 2002.826ms 1904.749ms -4.9%
cli/apply_100,000 1974.711ms 1843.437ms -6.6%
cli/apply_10,000,000 2018.659ms 2031.074ms +0.6%
decoding/base64_1,000 0.038ms 0.037ms -2.7%
decoding/base64_100,000 0.898ms 0.897ms -0.1%
decoding/base64_10,000,000 102.403ms 100.286ms -2.1%
decoding/binref_1,000 0.203ms 0.199ms -2.0%
decoding/binref_100,000 0.244ms 0.240ms -1.5%
decoding/binref_10,000,000 11.280ms 10.614ms -5.9%
decoding/json_1,000 0.108ms 0.107ms -1.3%
decoding/json_100,000 9.419ms 8.953ms -4.9%
decoding/json_10,000,000 1085.670ms 1067.833ms -1.6%
encoding/base64_1,000 0.042ms 0.040ms -4.0%
encoding/base64_100,000 0.149ms 0.146ms -1.8%
encoding/base64_10,000,000 28.149ms 27.194ms -3.4%
encoding/binref_1,000 0.310ms 0.304ms -1.8%
encoding/binref_100,000 0.496ms 0.478ms -3.6%
encoding/binref_10,000,000 20.022ms 19.594ms -2.1%
encoding/json_1,000 0.153ms 0.154ms +0.2%
encoding/json_100,000 13.862ms 14.144ms +2.0%
encoding/json_10,000,000 1429.433ms 1442.695ms +0.9%
http/apply_1,000 4.920ms 3.836ms -22.0% 🚀 faster
http/apply_100,000 11.499ms 10.722ms -6.8%
http/apply_10,000,000 799.753ms 780.327ms -2.4%
roundtrip/base64_1,000 0.092ms 0.089ms -2.4%
roundtrip/base64_100,000 1.059ms 1.054ms -0.4%
roundtrip/base64_10,000,000 129.753ms 127.209ms -2.0%
roundtrip/binref_1,000 0.530ms 0.520ms -1.8%
roundtrip/binref_100,000 0.728ms 0.725ms -0.4%
roundtrip/binref_10,000,000 31.885ms 29.943ms -6.1%
roundtrip/json_1,000 0.275ms 0.276ms +0.4%
roundtrip/json_100,000 20.325ms 20.198ms -0.6%
roundtrip/json_10,000,000 2488.797ms 2517.508ms +1.2%
  • Runner: Linux 6.17.0-1008-azure x86_64

Copy link
Copy Markdown
Contributor

@dionhaefner dionhaefner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dionhaefner dionhaefner enabled auto-merge (squash) April 1, 2026 19:22
@dionhaefner dionhaefner merged commit 61a8140 into main Apr 1, 2026
49 checks passed
@dionhaefner dionhaefner deleted the heiko/autogen-network branch April 1, 2026 19:30
@pasteurlabs pasteurlabs locked and limited conversation to collaborators Apr 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants