Skip to content
This repository was archived by the owner on Mar 25, 2026. It is now read-only.

Remove serverless#39

Merged
awantoch merged 7 commits intomainfrom
fix/serverless
Jul 27, 2025
Merged

Remove serverless#39
awantoch merged 7 commits intomainfrom
fix/serverless

Conversation

@awantoch
Copy link
Copy Markdown
Collaborator

Serverless wayyyy to much of a PITA for now. Killing it for awhile.

awantoch added 2 commits July 27, 2025 14:41
Signed-off-by: Alec M. Wantoch <alec@wantoch.com>
Signed-off-by: Alec M. Wantoch <alec@wantoch.com>
@awantoch awantoch self-assigned this Jul 27, 2025
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Bugbot free trial expires on July 29, 2025
Learn more in the Cursor dashboard.

Comment thread storage/postgres.go
Comment thread storage/postgres.go
Comment thread core/cron.go
- Removed test mode environment variable from main.go to streamline server startup during tests.
- Updated main_test.go to include a new test for the 'serve --help' command without starting the server.
- Enhanced cron_test.go and http_test.go to utilize new handler creation for testing without actual server startup.

These changes improve the testing framework and ensure better isolation of tests from server operations.

Signed-off-by: Alec M. Wantoch <alec@wantoch.com>
Comment thread engine/engine.go Outdated
Signed-off-by: Alec M. Wantoch <alec@wantoch.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Bug: Error Handling Masks Specific Exceptions

The error handling logic for StartRun is flawed. The if err.Error() != "" check, performed after confirming err != nil, is redundant and incorrect because a non-nil error's Error() method always returns a non-empty string in Go. This masks the true intention of ignoring specific errors (e.g., from duplicate detection) and causes all non-nil errors to be added to the errors list.

core/cron.go#L640-L645

https://github.com/BeemFlow/beemflow/blob/17cc6570204e5c6afa5b51deaa5c2692d6f3020e/core/cron.go#L640-L645

core/cron.go#L222-L226

beemflow/core/cron.go

Lines 222 to 226 in 17cc657

if _, err := StartRun(ctx, flowName, event); err != nil {
// Ignore nil errors from duplicate detection
if err.Error() != "" {
errors = append(errors, flowName + ": failed to start: " + err.Error())
}

Fix in Cursor Fix in Web


awantoch added 2 commits July 27, 2025 16:43
- Introduced unit tests for `generateDeterministicRunID` to ensure consistent UUID generation for identical inputs and different UUIDs for varying inputs.
- Verified UUID generation with reordered map keys and complex nested structures.
- Added a time window test to confirm UUIDs remain consistent within a 5-minute interval.

These changes enhance the reliability of UUID generation in the engine, ensuring proper deduplication of runs with identical inputs.

Signed-off-by: Alec M. Wantoch <alec@wantoch.com>
- Introduced a new test, `TestCron_ErrorHandling`, to validate the behavior of cron workflows when encountering errors, specifically when a required step is missing.
- The test creates a temporary workflow that is designed to fail and checks that the appropriate error messages are returned in the response.
- Updated error handling in `CheckAndExecuteCronFlows` to ensure that all errors are captured and reported correctly.

These changes enhance the robustness of cron workflow error handling and improve test coverage.

Signed-off-by: Alec M. Wantoch <alec@wantoch.com>
Comment thread storage/sqlite.go
Comment thread storage/sqlite.go
Comment thread registry/remote.go Outdated
…reness

- Replaced the default HTTP client with a context-aware client in `http_adapter.go` to allow proper context cancellation and deadline handling.
- Updated `ListServers` method in `remote.go` to use a context-aware HTTP client, ensuring that context deadlines take precedence over client timeouts.
- Modified database operations in `postgres.go` and `sqlite.go` to use context-aware execution methods, enhancing the responsiveness and reliability of database interactions.

These changes improve the overall handling of context in HTTP requests and database operations, leading to better resource management and error handling.

Signed-off-by: Alec M. Wantoch <alec@wantoch.com>
@awantoch awantoch merged commit 9533f34 into main Jul 27, 2025
1 check passed
@awantoch awantoch deleted the fix/serverless branch July 27, 2025 21:37
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.

1 participant