Skip to content

Commit fcfcfc9

Browse files
geofmureithireneoctavioderekleverenz
authored
Prep for version 1 (#1)
* Features + introduce twitter example * Minor fixes and added examples * Introducing PSQL functions * Minor improvements, fixes on failing tests * Added expose feature, and worker config * Fixes on postgres and mysql * Minor fixes to get things working * Introduced getjobs * Introducing v0.5! (#234) * Introducing v0.5! * fix: api and other fixes * Fix: improvements on backends * fix: improve api * fix: remove utils and simplify crates * lint: fmt issues * lint: clippy fixes * fix: moved files * clippy: fixes * tests: updates on tests * fixes: on internal api * ci: update the test features * test: remove some assertions * docs: updated docs for tests * fix: minor clippy and fixes * bench: fixes on bench: * bench: fixes on bench: * bench: ! * bench: ! * fix: version for test * fix: add vacuuming and other apis * fix: improve benches * fix: benches and worker * fix: typo * fix: prepared statement * lint: clippy * fix: redis test * add: use ulid without jid * add: improve the Readme.md * fix: tower link * bump: to 0.5 * add: generic retry persist check (#498) * add: generic retry persist check * fix: test wrapper * fix: use unresolved error * fix: enforce one job at a time * fix: set sql max retries to 5 * fix: ensure no new job started * fix: allow sync between lazy storages * fix: ensure postgres attempts are correctly calculated * fix: kill job after retries are over * fix: get redis retry working * fix: get postgres working * fix: get all storages working * fix: ensure sqlite tests wait fairly * fix: PostgresStorage get_jobs status conditional (#524) * fix: PostgresStorage get_jobs status conditional * fix: added tests, fix offset must be type bigint, not type text * chore: changelog * Support priority in SQL storage backends (#533) * Add support for optional job priority to postgres storage * add migration * revert postgres changes * update mysql and postgres code to use sqlcontext priority * WIP * finish (hopefully) mysql and sqlite job fetch * add priority tests * update changelog * Update CHANGELOG.md * test * cleanup and add missing priority in FromRow impls * fix mysql implementation * fix: Add migration to drop old push_jobs function for postgres (#543) * Add migration to drop old push_jobs function for postgres * changelog * fix sql syntax * fix: more improvements * improve sinks * improve sinks * fix: request becomes task * fix: improve TaskBuilder * introduce custom backends * improve and try generalize task_id * feat: remove task_id constrain as ulid * improve: task_id fixes * wip: generic sinks and fetchers * improve metadata * docs: improvement * chekpoint: improvements in impl * fix: improve meta more * checkpoint: retry policies * checkpoint: generalize cron * bump: version * chore: initial split * fix: improvements to crate --------- Co-authored-by: René Octavio Queiroz Dias <[email protected]> Co-authored-by: Derek Leverenz <[email protected]>
1 parent 3d5a91c commit fcfcfc9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6912
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Bug Report
2+
description: File a bug report to help us improve
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
assignees: []
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report!
12+
13+
- type: textarea
14+
id: what-happened
15+
attributes:
16+
label: What happened?
17+
description: A clear and concise description of what the bug is.
18+
placeholder: Tell us what you see!
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: expected
24+
attributes:
25+
label: Expected behavior
26+
description: A clear and concise description of what you expected to happen.
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: reproduce
32+
attributes:
33+
label: Steps to reproduce
34+
description: Steps to reproduce the behavior
35+
placeholder: |
36+
1. Go to '...'
37+
2. Click on '....'
38+
3. Scroll down to '....'
39+
4. See error
40+
validations:
41+
required: true
42+
43+
- type: textarea
44+
id: code
45+
attributes:
46+
label: Minimal code example
47+
description: If applicable, add a minimal code example that reproduces the issue
48+
render: rust
49+
50+
- type: dropdown
51+
id: version
52+
attributes:
53+
label: Version
54+
description: What version of apalis-postgres are you running?
55+
options:
56+
- 1.0.0-alpha.1
57+
- main branch
58+
- Other (specify in additional context)
59+
validations:
60+
required: true
61+
62+
- type: textarea
63+
id: environment
64+
attributes:
65+
label: Environment
66+
description: |
67+
Please provide information about your environment:
68+
- OS: [e.g. Ubuntu 20.04, macOS 12.0, Windows 11]
69+
- Rust version: [e.g. 1.70.0]
70+
- Cargo version: [e.g. 1.70.0]
71+
value: |
72+
- OS:
73+
- Rust version:
74+
- Cargo version:
75+
validations:
76+
required: true
77+
78+
- type: textarea
79+
id: logs
80+
attributes:
81+
label: Relevant log output
82+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
83+
render: shell
84+
85+
- type: textarea
86+
id: context
87+
attributes:
88+
label: Additional context
89+
description: Add any other context about the problem here.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Feature Request
2+
description: Suggest an idea for this project
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
assignees: []
6+
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to suggest a new feature!
12+
13+
- type: textarea
14+
id: problem
15+
attributes:
16+
label: Is your feature request related to a problem?
17+
description: A clear and concise description of what the problem is.
18+
placeholder: I'm always frustrated when...
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: solution
24+
attributes:
25+
label: Describe the solution you'd like
26+
description: A clear and concise description of what you want to happen.
27+
validations:
28+
required: true
29+
30+
- type: textarea
31+
id: alternatives
32+
attributes:
33+
label: Describe alternatives you've considered
34+
description: A clear and concise description of any alternative solutions or features you've considered.
35+
36+
- type: textarea
37+
id: use-case
38+
attributes:
39+
label: Use case
40+
description: Describe your specific use case and how this feature would help.
41+
validations:
42+
required: true
43+
44+
- type: textarea
45+
id: implementation
46+
attributes:
47+
label: Additional context
48+
description: Add any other context, screenshots, or implementation ideas about the feature request here.
49+
50+
- type: checkboxes
51+
id: terms
52+
attributes:
53+
label: Code of Conduct
54+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/apalis-dev/apalis-postgres/blob/main/CODE_OF_CONDUCT.md)
55+
options:
56+
- label: I agree to follow this project's Code of Conduct
57+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Description
2+
3+
Brief description of what this PR does.
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
- [ ] Performance improvement
12+
- [ ] Refactoring (no functional changes)
13+
14+
## Testing
15+
16+
- [ ] I have added tests that prove my fix is effective or that my feature works
17+
- [ ] I have run the existing tests and they pass
18+
- [ ] I have run `cargo fmt` and `cargo clippy`
19+
20+
## Checklist
21+
22+
- [ ] My code follows the code style of this project
23+
- [ ] I have performed a self-review of my own code
24+
- [ ] I have commented my code, particularly in hard-to-understand areas
25+
- [ ] I have made corresponding changes to the documentation
26+
- [ ] My changes generate no new warnings
27+
- [ ] I have added tests that prove my fix is effective or that my feature works
28+
- [ ] New and existing unit tests pass locally with my changes
29+
30+
## Additional Notes
31+
32+
Any additional information, context, or screenshots about the pull request here.

.github/dependabot.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for Cargo
4+
- package-ecosystem: "cargo"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
time: "06:00"
10+
open-pull-requests-limit: 10
11+
reviewers:
12+
- "mureithinjuguna"
13+
assignees:
14+
- "mureithinjuguna"
15+
commit-message:
16+
prefix: "deps"
17+
include: "scope"
18+
labels:
19+
- "dependencies"
20+
- "rust"
21+
22+
# Enable version updates for GitHub Actions
23+
- package-ecosystem: "github-actions"
24+
directory: "/"
25+
schedule:
26+
interval: "weekly"
27+
day: "monday"
28+
time: "06:00"
29+
open-pull-requests-limit: 5
30+
reviewers:
31+
- "geofmureithi"
32+
assignees:
33+
- "geofmureithi"
34+
commit-message:
35+
prefix: "ci"
36+
include: "scope"
37+
labels:
38+
- "dependencies"
39+
- "github-actions"

.github/workflows/bench.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Benchmarks
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
benchmark:
14+
name: Performance Benchmarks
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout sources
18+
uses: actions/checkout@v4
19+
20+
- name: Install Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Cache cargo registry
24+
uses: actions/cache@v4
25+
with:
26+
path: |
27+
~/.cargo/registry
28+
~/.cargo/git
29+
target
30+
key: ${{ runner.os }}-cargo-bench-${{ hashFiles('**/Cargo.lock') }}
31+
32+
- name: Run benchmarks
33+
run: |
34+
if find . -name "*.rs" -exec grep -l "#\[bench\]" {} \; | grep -q .; then
35+
echo "Found benchmark tests, running cargo bench"
36+
cargo bench
37+
else
38+
echo "No benchmark tests found, skipping"
39+
fi
40+
41+
- name: Install cargo-criterion (if criterion benchmarks exist)
42+
run: |
43+
if find . -name "*.rs" -exec grep -l "criterion::" {} \; | grep -q .; then
44+
echo "Found criterion benchmarks, installing cargo-criterion"
45+
cargo install cargo-criterion
46+
cargo criterion
47+
else
48+
echo "No criterion benchmarks found, skipping"
49+
fi
50+
51+
msrv:
52+
name: Minimum Supported Rust Version
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout sources
56+
uses: actions/checkout@v4
57+
58+
- name: Get MSRV from Cargo.toml
59+
id: msrv
60+
run: |
61+
MSRV=$(grep "rust-version" Cargo.toml | sed 's/.*rust-version.*=.*"\(.*\)".*/\1/' || echo "1.70.0")
62+
echo "msrv=$MSRV" >> $GITHUB_OUTPUT
63+
echo "Detected MSRV: $MSRV"
64+
65+
- name: Install MSRV Rust toolchain
66+
uses: dtolnay/rust-toolchain@master
67+
with:
68+
toolchain: ${{ steps.msrv.outputs.msrv }}
69+
70+
- name: Cache cargo registry
71+
uses: actions/cache@v4
72+
with:
73+
path: |
74+
~/.cargo/registry
75+
~/.cargo/git
76+
target
77+
key: ${{ runner.os }}-cargo-msrv-${{ steps.msrv.outputs.msrv }}-${{ hashFiles('**/Cargo.lock') }}
78+
79+
- name: Test with MSRV
80+
run: cargo test --all-features

0 commit comments

Comments
 (0)