-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add trogon-cron scheduler #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yordis
wants to merge
83
commits into
main
Choose a base branch
from
CRON
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
0513a32
feat(trogon-cron): use native NATS scheduling
yordis 6938f23
refactor(trogon-cron): keep write checks aligned
yordis a392093
fix(trogon-cron): keep deleted jobs reusable
yordis e7a71aa
fix(trogon-cron): preserve sampling source subjects
yordis f92b9ee
refactor(trogon-cron): clarify control-plane boundaries
yordis 9919953
refactor(trogon-cron): tighten command handler boundaries
yordis 9885b54
refactor(trogon-cron): simplify NATS storage boundaries
yordis acb4f3e
refactor(trogon-cron): remove fake storage abstractions
yordis bebe20e
refactor: keep behavior at concrete boundaries
yordis 3f52c9c
refactor: keep job commands valid by construction
yordis f7a64b8
refactor(trogon-cron): keep stream transitions consistent
yordis 2821077
refactor(trogon-cron): keep event boundaries direct
yordis e940e83
fix(trogon-nats): keep coverage builds using real stream traits
yordis 6c5ba32
fix(trogon-cron): reject impossible command transitions early
yordis 06082e4
refactor: keep write rules at the decision boundary
yordis e5a6ab8
refactor: keep stream identity at the boundary
yordis c8ff32a
fix(ci): keep coverage focused on exercised cron paths
yordis 1b2a468
refactor: keep stream ids typed at the command boundary
yordis f2f3826
refactor: keep snapshot envelopes generic
yordis 8b03daa
refactor: keep command state owned by the handler
yordis 10888ba
refactor: keep command names aligned with domain intent
yordis e750da3
refactor: keep commands as the only command boundary
yordis 0010fe4
refactor: keep projection concerns at the projection boundary
yordis 6846f90
refactor(eventsourcing): keep event envelopes opaque at the boundary
yordis 1cdc193
refactor(cron): keep event components at their boundaries
yordis 31f2f5a
refactor(cron): keep cron jobs projection explicit in shared storage
yordis 1b52858
refactor(eventsourcing): keep stream and snapshot policies at the bou…
yordis 3fa0c9c
refactor(cron): keep service startup at the binary boundary
yordis 0185c24
fix(ci): keep coverage builds from failing on gated command paths
yordis b6cea8a
fix(cron): keep command entrypoints real under coverage
yordis fd32b76
refactor(eventsourcing): keep command execution at the shared boundary
yordis bbe08d3
refactor(eventsourcing): keep expected versions at the shared boundary
yordis ce4590e
refactor(eventsourcing): keep expected state at the shared boundary
yordis c217bed
refactor(eventsourcing): keep snapshot revisions inside execution
yordis 76665f6
refactor(eventsourcing): keep OCC precedence at execution time
yordis e89a932
refactor(eventsourcing): keep command execution behind one boundary
yordis baadb86
refactor(cron): keep command defaults explicit at the boundary
yordis dcd0189
refactor(eventsourcing): keep command stores aligned with the boundary
yordis 9126442
refactor(cron): keep command runtime noise out of call sites
yordis b79db23
refactor(cron): keep command boundaries transport-agnostic
yordis 1d85d59
refactor(cron): keep scheduling as a processor over raw events
yordis f5f8168
refactor(cron): keep job ids valid across the domain
yordis e082c43
refactor(cron): keep identifiers inside the domain module
yordis 749941e
feat(eventsourcing): make decider behavior easy to verify
yordis 2ba8efb
feat(eventsourcing): make stream histories composable in tests
yordis d8650ad
fix(cron): keep duplicate registration out of OCC
yordis 6f88b64
refactor(eventsourcing): keep command outcomes explicit at the boundary
yordis de7e586
refactor(cron): keep command failures scoped to each command
yordis 839979a
refactor(eventsourcing): keep command OCC rules explicit
yordis 360eebc
Rename `CommandStateModel` and `SnapshotStateModel` traits
yordis f913bfd
Move job spec types from config to domain::spec
yordis feb51b8
refactor(eventsourcing): keep snapshot wiring at one boundary
yordis 4e6d9aa
fix(cron): keep deleted job ids terminal
yordis dd4c884
refactor(eventsourcing): keep event codecs pluggable
yordis 0416720
refactor(cron): keep event codecs explicit in the domain
yordis da07baf
Rename `ExpectedState`/`ExpectedStateRule` to
yordis 387fbb2
refactor(eventsourcing): keep execution decisions explicit at the bou…
yordis 3559a83
Strengthen `DeliverySpec` field types with validation
yordis 1d72468
refactor(cron): keep read paths separate from commands
yordis 0689ce0
refactor(cron): keep queries on the read model
yordis d1f2efc
Cache bucket/stream handles in Store instead of reopening
yordis 68a0ac0
Add UuidV7 abstraction to trogon-std and migrate usages
yordis c7373b5
Split `EventStore` into `StreamRead` and `StreamAppend` traits
yordis 7c190ad
refactor(eventsourcing): keep execution results intact at the boundary
yordis e5a3a98
Refactor snapshot state to use `From`/`TryFrom` traits
yordis 4a1a5bc
Remove `Infallible` conversions by using `From` instead of `TryFrom`
yordis 4dfd7fb
Simplify snapshot state by removing `SnapshotState` trait
yordis 3ed8a78
Move domain types to `jobs` module and relocate schedule logic
yordis 7e51803
Split `change_job_state` into `pause_job` and `resume_job` commands
yordis 6a05286
Rename `RegisterJob` command to `AddJob`
yordis 022d96b
Replace job payload/metadata with MessageContent/MessageHeaders
yordis 5aaeedc
Add MessageHeaders and MessageContent types for job specs
yordis 285bd25
Rename `JobRegistered`/`RegisteredJobSpec` to `JobAdded`/`JobDetails`
yordis 216525c
Add generic `JetStreamStore` with pluggable subject resolver
yordis 38a6f02
Merge event and snapshot stores into a single store parameter
yordis 8471877
refactor(cron): keep store wiring direct at the boundary
yordis 0eb7226
Split `SnapshotStore` into `SnapshotRead` and `SnapshotWrite` traits
yordis 75709a1
Refactor `JobEvent` variants to use tuple structs
yordis 93453eb
Replace `SnapshotStoreConfig` static consts with `SnapshotSchema` trait
yordis 2f3bcf8
Refactor snapshot schema and command execution API
yordis 333dfd3
Use optimistic concurrency when writing snapshots
yordis cb75240
Reorganize eventsourcing NATS modules under `nats` namespace
yordis baea3d6
Extract snapshot types into dedicated module
yordis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| FROM rust:1.93-slim AS chef | ||
|
|
||
| RUN cargo install cargo-chef --locked | ||
|
|
||
| WORKDIR /build | ||
|
|
||
| FROM chef AS planner | ||
|
|
||
| COPY Cargo.toml Cargo.lock ./ | ||
| COPY crates/ crates/ | ||
|
|
||
| RUN cargo chef prepare --recipe-path recipe.json | ||
|
|
||
| FROM chef AS builder | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| pkg-config libssl-dev \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| COPY --from=planner /build/recipe.json recipe.json | ||
| RUN cargo chef cook --release --recipe-path recipe.json -p trogon-cron | ||
|
|
||
| COPY Cargo.toml Cargo.lock ./ | ||
| COPY crates/ crates/ | ||
|
|
||
| RUN cargo build --release -p trogon-cron && \ | ||
| strip target/release/trogon-cron | ||
|
|
||
| FROM debian:bookworm-20250317-slim AS runtime | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| ca-certificates \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN useradd --no-create-home --shell /usr/sbin/nologin trogon | ||
|
|
||
| COPY --from=builder /build/target/release/trogon-cron /usr/local/bin/trogon-cron | ||
|
|
||
| USER trogon | ||
|
|
||
| STOPSIGNAL SIGTERM | ||
|
|
||
| ENTRYPOINT ["/usr/local/bin/trogon-cron", "serve"] | ||
|
cursor[bot] marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Always use `enum` over booleans in the edges such as HTTP, gRPC, Databases, etc, | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.