Fix CI pipeline failures in cartsnitch/api #1

Open
Barcode Betty wants to merge 5 commits from barcode-betty/fix-ci-pipeline into dev
Owner

Fix CI pipeline failures in cartsnitch/api

Three distinct CI failures fixed in .gitea/workflows/ci.yml:

1. Lint job: Removed cache: pip from setup-python

Fixes intermittent archive/tar: write too long errors on act_runner pods caused by shared action cache corruption.

2. Test job: Added missing env vars

Added CARTSNITCH_SERVICE_KEY and CARTSNITCH_FERNET_KEY to satisfy Settings pydantic model requirements.

3. Typecheck job: Removed cache: pip from setup-python

Consistency fix across all jobs.

Acceptance criteria:

  • Lint job passes (setup-python succeeds, ruff passes)
  • Test job passes (pytest runs with all required env vars)
  • build-and-push job runs successfully after lint+test pass

cc @cpfarhood

## Fix CI pipeline failures in cartsnitch/api Three distinct CI failures fixed in `.gitea/workflows/ci.yml`: ### 1. Lint job: Removed `cache: pip` from setup-python Fixes intermittent `archive/tar: write too long` errors on act_runner pods caused by shared action cache corruption. ### 2. Test job: Added missing env vars Added `CARTSNITCH_SERVICE_KEY` and `CARTSNITCH_FERNET_KEY` to satisfy Settings pydantic model requirements. ### 3. Typecheck job: Removed `cache: pip` from setup-python Consistency fix across all jobs. **Acceptance criteria:** - [ ] Lint job passes (setup-python succeeds, ruff passes) - [ ] Test job passes (pytest runs with all required env vars) - [ ] build-and-push job runs successfully after lint+test pass cc @cpfarhood
Barcode Betty added 5 commits 2026-05-23 22:01:10 +00:00
Add dev.cartsnitch.com and uat.cartsnitch.com to the CORS origins list
to match the infra HTTPRoute domains and fix auth blocking on UAT.

Refs: CAR-992
Co-Authored-By: Paperclip <noreply@paperclip.ing>
The top-level import of dispose_engine from cartsnitch_api.database was
unused at module scope - the lifespan function already imported it locally.
This dead import caused ImportError at module load, crashing the API pods.

Fix: move dispose_engine import inside the lifespan function where it is
actually used, and remove the dead top-level import.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
fix: add UAT/dev domains to cors_origins (#14)

Refs: CAR-992
fix: remove dead dispose_engine import from API main.py [CAR-932]

Moves dispose_engine import from module scope into the lifespan function
where it is actually used. Fixes ImportError crashing API pods.

Reviewed-by: cs_charlie (QA)
Approved-by: cs_savannah (CTO)
CI-override: pre-existing failures unrelated to this change
- Remove 'cache: pip' from setup-python in lint, typecheck, test jobs to fix
  intermittent 'archive/tar: write too long' errors on act_runner pods
- Add CARTSNITCH_SERVICE_KEY and CARTSNITCH_FERNET_KEY to test job env
  to satisfy Settings pydantic model requirements

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin barcode-betty/fix-ci-pipeline:barcode-betty/fix-ci-pipeline
git checkout barcode-betty/fix-ci-pipeline
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cs_betty/api#1