- Implemented PanicTracker to log panics using tracing within a dedicated span. - Introduced PanicInfo struct to capture panic details. - Added tests for panic catching and hook restoration. feat: implement token-bucket rate limiter - Created RateLimiter to manage token consumption with configurable rates and burst capacity. - Added methods for acquiring tokens and checking available tokens. - Included tests for rate limiting behavior and token availability. feat: add automatic retry with exponential backoff - Developed retry function to handle transient errors with configurable retry strategies. - Introduced RetryConfig for customizing retry behavior and jitter. - Added tests for various retry scenarios and error handling. feat: implement graceful shutdown coordination - Created ShutdownManager to manage shutdown signals and task completion. - Introduced ShutdownSignal for tasks to observe shutdown requests. - Added tests for shutdown request handling and task draining. feat: add timeout functionality for async operations - Implemented with_timeout function to enforce execution time limits on futures. - Created Timeout struct for wrapping futures with a deadline. - Added tests for timeout behavior and error mapping.
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: Publish to crates.io
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*.*.*"]
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: "Git tag to publish (e.g. v0.2.0). Defaults to latest tag."
|
|
required: false
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ inputs.tag || github.event.ref || github.ref }}
|
|
fetch-depth: 0
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
# The workspace crates have no interdependencies, so publish order
|
|
# doesn't matter for crates.io dependency resolution. A brief sleep
|
|
# between publishes avoids hitting crates.io's rate limit.
|
|
- name: Publish workspace crates
|
|
run: |
|
|
for crate in mytheclipse corex-cache corex-storage corex-event corex-config corex-crypto; do
|
|
echo "Publishing $crate..."
|
|
cargo publish -p "$crate" --allow-dirty --no-verify
|
|
sleep 15
|
|
done
|
|
env:
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |