Closed madflojo closed 4 months ago
The changes introduce a new build target, update documentation for new optional parameters, enhance route handling and error management in the server logic, and expand test coverage with retries and initializations. There are also updates to configuration validation and new test data demonstrating a sample counter-based service.
File(s) | Change Summary |
---|---|
Makefile |
Added a new build target successafter5 in the testdata directory. |
docs/wasm-functions/multi-function-services.md |
Corrected typo, added and clarified parameters retries and frequency for scheduled tasks and init functions. |
pkg/app/app.go |
Enhanced Server.Run() with more robust route handling, retry logic, and error management. |
pkg/app/server_test.go |
Added TestInitFuncs and expanded TestFullService with new test cases for retries and initialization. |
pkg/config/config.go |
Updated Route struct, added validation function, constants, and error handling. |
testdata/successafter5/... |
Added new Go project example with Makefile, docker-compose, and Go code for a Tarmac SDK-based service. |
sequenceDiagram
participant Client as Client
participant Server as Server
participant Config as Config
participant Function as Function
Client->>Server: Start server
Server->>Config: Load and validate configuration
Config-->>Server: Return validated config
Server->>Function: Initialize functions with retries
Note over Server,Function: Enhanced error handling with retries
Function-->>Server: Return success or failure
Server-->>Client: Server ready
loop Retry on failure
Server->>Function: Retry initialization
Function-->>Server: Return success or failure
end
In the code fields we roamed, With retries and frequency honed, Initialization anew, Error handling so true, Tarmac’s path is well-known. 🌟🐇
[!TIP]
Early access features
- OpenAI `gpt-4o` model for reviews and chat. Note: - You can disable early access features from the CodeRabbit UI or by setting `early_access: false` in the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are always opted into early access features.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This Pull Request adds retries to Init functions. If an init function errors on boot, this will retry function execution until the number of retries is exceeded or the function succeeds.
Summary by CodeRabbit
New Features
successafter5
project.retries
andfrequency
for scheduling tasks and init functions.Bug Fixes
frequency
parameter documentation for scheduled tasks.Documentation
Tests
Chores
successafter5
example project.