Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3e6c80f
fix: complete Doppler Compose integration
vankudothuadhinaik Oct 29, 2026
52dc8b3
test: isolate derived database URL check from CI environment
vankudothuadhinaik Oct 29, 2026
cfb7b56
docs: add actionable CodeScene integration verification
vankudothuadhinaik Oct 29, 2026
ec9f551
docs: record CodeScene analysis and latest CI status
vankudothuadhinaik Oct 29, 2026
8c9f5c4
refactor: simplify Doppler validator for CodeScene quality gate
vankudothuadhinaik Oct 29, 2026
e07cb29
style: format Doppler validator for CI
vankudothuadhinaik Oct 29, 2026
81b567b
docs: record verified CodeScene PR integration and CI status
vankudothuadhinaik Oct 29, 2026
7d49409
docs: record final release verification evidence
vankudothuadhinaik Oct 29, 2026
8f4ba1d
ci: upgrade CodeQL actions to v4
vankudothuadhinaik Oct 29, 2026
79380d7
ci: update actions for Node 24 runtime
vankudothuadhinaik Oct 29, 2026
6967ba6
security: harden example nginx TLS defaults
vankudothuadhinaik Oct 29, 2026
c8c1d9f
docs: update README with current implementation and release status
vankudothuadhinaik Oct 29, 2026
9341876
feat: harden production operations and observability
vankudothuadhinaik Oct 29, 2026
12b0a85
Merge remote-tracking branch 'origin/feat/doppler-integration' into f…
vankudothuadhinaik Oct 29, 2026
87bfda6
refactor: reduce enqueue complexity
vankudothuadhinaik Oct 29, 2026
96604ce
docs: record final CI and integration verification
vankudothuadhinaik Oct 29, 2026
1eeeff6
docs: refresh Codecov and CI verification evidence
vankudothuadhinaik Oct 29, 2026
ab303b1
docs: refresh latest CI status and release gates
vankudothuadhinaik Oct 29, 2026
9b02e30
ci: fail fast on coverage upload errors
vankudothuadhinaik Oct 29, 2026
6890964
docs: record blocked Codecov verification
vankudothuadhinaik Oct 29, 2026
26b0973
docs: refresh current CI verification status
vankudothuadhinaik Oct 29, 2026
54a8e72
docs: record current Codecov token rejection
vankudothuadhinaik Oct 29, 2026
5252449
docs: correct stale latest CI status
vankudothuadhinaik Oct 29, 2026
38fabcc
docs: update CI status after Codecov upload passes
vankudothuadhinaik Oct 29, 2026
2e029a6
docs: record successful Codecov token rotation
vankudothuadhinaik Oct 29, 2026
a91a747
docs: add Docker-first staging closeout
vankudothuadhinaik Oct 29, 2026
dcde57b
Merge remote-tracking branch 'origin/feat/doppler-integration' into f…
vankudothuadhinaik Oct 29, 2026
3d848ea
docs: record final Docker and CI verification
vankudothuadhinaik Oct 29, 2026
d59b0d2
docs: align final CI evidence with Docker closeout
vankudothuadhinaik Oct 29, 2026
78f89b0
docs: align Codecov evidence with final staging CI
vankudothuadhinaik Oct 29, 2026
4ccf423
docs: clarify final CI status and production gates
vankudothuadhinaik Oct 29, 2026
375bd99
docs: simplify Codecov verification record
vankudothuadhinaik Oct 29, 2026
b5a42a3
docs: align integration status with verified CI
vankudothuadhinaik Oct 29, 2026
72292ae
ci: validate example nginx configuration
vankudothuadhinaik Oct 29, 2026
4074852
docs: document nginx syntax validation in CI
vankudothuadhinaik Oct 29, 2026
6535330
feat: support free-tier combined api and worker deployment
vankudothuadhinaik Oct 29, 2026
6e0bf52
docs: record free-tier demo deployment and CI status
vankudothuadhinaik Oct 29, 2026
a8e80a1
fix: expose health endpoints for free-tier worker service
vankudothuadhinaik Oct 29, 2026
d2e372f
style: sort worker health server imports
vankudothuadhinaik Oct 29, 2026
4b9dec8
fix: opt in to worker health listener explicitly
vankudothuadhinaik Oct 29, 2026
aad5146
docs: record final green CI verification
vankudothuadhinaik Oct 29, 2026
41317c1
ci: add scheduled end-to-end deployment smoke test
vankudothuadhinaik Oct 29, 2026
ce0ca12
ci: make deployment smoke test explicitly opt-in
vankudothuadhinaik Oct 29, 2026
5c8c4b4
docs: reconcile deployment closeout status
vankudothuadhinaik Oct 29, 2026
e28b7e6
docs: record latest all-green CI run
vankudothuadhinaik Oct 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.git
.github
.venv
venv
env
__pycache__
*.py[cod]
.pytest_cache
.ruff_cache
.mypy_cache
.coverage
coverage.xml
htmlcov
*.egg-info
build
dist
ci-test.db
fluxqueue.db
*.log
.env
.env.*
!.env.example
tests
scripts
docs
deploy
docker-compose.override.yml
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,11 @@ LOG_LEVEL=INFO
API_KEY=
API_KEYS={}
MAX_ACTIVE_JOBS_PER_TENANT=1000
# Managed PostgreSQL only: use verify-full or verify-ca in production and provision the CA file
# through the deployment environment. Never commit certificates or keys.
# DATABASE_SSLMODE=verify-full
# DATABASE_SSLROOTCERT=/run/secrets/postgres-ca.crt
# DATABASE_SSLCERT=/run/secrets/postgres-client.crt
# DATABASE_SSLKEY=/run/secrets/postgres-client.key
# Example production mapping (store real keys only in Doppler or another secret manager):
# API_KEYS={"replace-with-a-long-random-secret":"tenant-a"}
46 changes: 30 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
env:
DATABASE_URL: sqlite:///./ci-test.db
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
Expand All @@ -44,7 +44,7 @@ jobs:
run: pytest --cov=fluxqueue --cov-report=xml --junitxml=junit.xml
- name: Archive test and coverage reports
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: fluxqueue-test-reports
path: |
Expand All @@ -54,6 +54,8 @@ jobs:
retention-days: 14
- name: Validate Docker Compose configuration
run: docker compose config --quiet
- name: Validate Doppler-to-service environment wiring
run: python scripts/validate_doppler_config.py
- name: Build container image
run: docker build --tag fluxqueue-ci .
- name: Verify container runs as non-root
Expand Down Expand Up @@ -84,12 +86,26 @@ jobs:
test "$(curl --silent --output /dev/null --write-out '%{http_code}' \
--header 'Authorization: Bearer ci-smoke-test-key' \
http://127.0.0.1:8000/api/v1/jobs)" = "200"
- name: Validate example Nginx configuration
shell: bash
run: |
set -euo pipefail
cert_dir="$(mktemp -d)"
trap 'rm -rf "$cert_dir"' EXIT
openssl req -x509 -nodes -newkey rsa:2048 -days 1 \
-keyout "$cert_dir/privkey.pem" \
-out "$cert_dir/fullchain.pem" \
-subj "/CN=fluxqueue.example.com" >/dev/null 2>&1
docker run --rm \
--volume "$PWD/deploy/nginx/fluxqueue.conf.example:/etc/nginx/conf.d/fluxqueue.conf:ro" \
--volume "$cert_dir:/etc/letsencrypt/live/fluxqueue.example.com:ro" \
nginx:alpine nginx -t
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
fail_ci_if_error: true

postgres-integration:
runs-on: ubuntu-latest
Expand All @@ -111,8 +127,8 @@ jobs:
DATABASE_URL: postgresql+psycopg://fluxqueue:fluxqueue@localhost:5432/fluxqueue
FLUXQUEUE_POSTGRES_TEST_URL: postgresql+psycopg://fluxqueue:fluxqueue@localhost:5432/fluxqueue
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
Expand All @@ -123,7 +139,7 @@ jobs:
run: pytest -q tests/test_postgres_integration.py --junitxml=postgres-junit.xml
- name: Archive PostgreSQL integration report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: fluxqueue-postgres-integration-report
path: postgres-junit.xml
Expand All @@ -133,8 +149,8 @@ jobs:
dependency-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
Expand All @@ -150,20 +166,18 @@ jobs:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
- uses: actions/checkout@v7
- uses: github/codeql-action/init@v4
with:
languages: python
queries: security-extended
# Keep CI usable when GitHub code scanning is not enabled for this repository.
# SARIF is retained as an artifact; enabling code scanning allows upload to Security alerts.
- uses: github/codeql-action/analyze@v3
- uses: github/codeql-action/analyze@v4
with:
upload: false
upload: true
output: results
- name: Archive CodeQL SARIF results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: fluxqueue-codeql-sarif
path: results/*.sarif
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/deployment-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Deployment smoke test

on:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: fluxqueue-deployment-smoke
cancel-in-progress: false

jobs:
smoke:
runs-on: ubuntu-latest
timeout-minutes: 8
env:
BASE_URL: https://fluxqueue-api.onrender.com
API_KEY: ${{ secrets.FLUXQUEUE_API_KEY }}
steps:
- name: Validate required secret
shell: bash
run: |
if [[ -z "$API_KEY" ]]; then
echo "::error::Add repository Actions secret FLUXQUEUE_API_KEY using the active FluxQueue tenant API key."
exit 1
fi

- name: Check API liveness and database readiness
shell: bash
run: |
set -euo pipefail
curl --fail --silent --show-error --retry 3 --retry-delay 5 "$BASE_URL/health/live"
echo
curl --fail --silent --show-error --retry 3 --retry-delay 5 "$BASE_URL/health/ready"
echo

- name: Submit and verify a real job lifecycle
shell: bash
run: |
set -euo pipefail
marker="deployment-smoke-$(date +%s)"
payload="$(jq -nc --arg marker "$marker" '{task_type:"echo",payload:{message:$marker},queue:"deployment-smoke",priority:5,max_attempts:2}')"
response="$(curl --fail --silent --show-error -X POST "$BASE_URL/api/v1/jobs" \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-H "Idempotency-Key: $marker" \
--data "$payload")"
job_id="$(jq -er '.id' <<<"$response")"
echo "Submitted job id: $job_id"
for attempt in $(seq 1 30); do
current="$(curl --fail --silent --show-error "$BASE_URL/api/v1/jobs/$job_id" \
-H "Authorization: Bearer $API_KEY")"
status="$(jq -r '.status' <<<"$current")"
echo "Poll $attempt: status=$status"
if [[ "$status" == "succeeded" ]]; then
jq -e --arg marker "$marker" '.result_json.payload.message == $marker' <<<"$current" >/dev/null
echo "End-to-end job processing passed."
exit 0
fi
if [[ "$status" == "dead" || "$status" == "cancelled" ]]; then
echo "::error::Smoke job reached terminal status $status"
jq '{id,status,last_error}' <<<"$current"
exit 1
fi
sleep 2
done
echo "::error::Job did not succeed within 60 seconds."
jq '{id,status,last_error}' <<<"$current"
exit 1
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ COPY src ./src
RUN pip install --no-cache-dir .
USER 10001:10001
EXPOSE 8000
CMD ["sh", "-c", "alembic upgrade head && exec uvicorn fluxqueue.main:app --host 0.0.0.0 --port 8000"]
CMD ["sh", "-c", "alembic upgrade head && if [ \"${RUN_WORKER:-false}\" = \"true\" ]; then python -m fluxqueue.worker & fi; exec uvicorn fluxqueue.main:app --host 0.0.0.0 --port \"${PORT:-8000}\""]
Loading
Loading