Fix CI pipeline: split unit/integration tests, prevent concurrent flakiness #38

Open
opened 2026-06-18 01:17:24 +00:00 by ldraney · 1 comment
Owner

Type

Feature

Lineage

Standalone — discovered during PR #37 review. Pipelines #5 and #6 ran concurrently against the live GoDaddy API, causing test record collisions (RECORD_NOT_FOUND on cleanup, data mismatch on replace).

Repo

ldraney/godaddy-tofu

User Story

As a contributor
I want reliable CI that doesn't produce false failures
So that PR reviews aren't blocked by flaky tests

Context

Current .woodpecker.yml runs all tests (including live GoDaddy API integration tests) on every push and PR event. When multiple pipelines run concurrently, they stomp on each other's test TXT records in the palinks.app domain. Pipeline #4 passed, then #5 and #6 failed with RECORD_NOT_FOUND and data mismatch errors — same code, just concurrent execution.

The fix: split the pipeline into two concerns:

  1. Build + lintgo build, go vet — runs on all events (fast, no API access)
  2. Integration testsgo test ./pkg/godaddy/ — runs only on push to main (post-merge), serialized

This way PRs get fast feedback from build/vet, and integration tests only run once per merge with no concurrency risk.

File Targets

  • .woodpecker.yml — restructure into build-only (PR) and full test (main push) pipelines

Feature Flag

None

Acceptance Criteria

  • PRs trigger build + vet only (no API credentials needed)
  • Pushes to main trigger build + vet + integration tests
  • No concurrent integration test runs possible

Test Expectations

  • Open a test PR — verify only build/vet runs
  • Merge to main — verify integration tests run and pass

Constraints

  • Keep using golang:1.26 image
  • Integration tests need GODADDY_API_KEY and GODADDY_API_SECRET from repo secrets
  • Woodpecker when conditions control event filtering

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • godaddy-tofu — this repo
### Type Feature ### Lineage Standalone — discovered during PR #37 review. Pipelines #5 and #6 ran concurrently against the live GoDaddy API, causing test record collisions (RECORD_NOT_FOUND on cleanup, data mismatch on replace). ### Repo `ldraney/godaddy-tofu` ### User Story As a contributor I want reliable CI that doesn't produce false failures So that PR reviews aren't blocked by flaky tests ### Context Current `.woodpecker.yml` runs all tests (including live GoDaddy API integration tests) on every push and PR event. When multiple pipelines run concurrently, they stomp on each other's test TXT records in the `palinks.app` domain. Pipeline #4 passed, then #5 and #6 failed with `RECORD_NOT_FOUND` and data mismatch errors — same code, just concurrent execution. The fix: split the pipeline into two concerns: 1. **Build + lint** — `go build`, `go vet` — runs on all events (fast, no API access) 2. **Integration tests** — `go test ./pkg/godaddy/` — runs only on push to main (post-merge), serialized This way PRs get fast feedback from build/vet, and integration tests only run once per merge with no concurrency risk. ### File Targets - `.woodpecker.yml` — restructure into build-only (PR) and full test (main push) pipelines ### Feature Flag None ### Acceptance Criteria - [ ] PRs trigger build + vet only (no API credentials needed) - [ ] Pushes to main trigger build + vet + integration tests - [ ] No concurrent integration test runs possible ### Test Expectations - [ ] Open a test PR — verify only build/vet runs - [ ] Merge to main — verify integration tests run and pass ### Constraints - Keep using `golang:1.26` image - Integration tests need `GODADDY_API_KEY` and `GODADDY_API_SECRET` from repo secrets - Woodpecker `when` conditions control event filtering ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `godaddy-tofu` — this repo
Author
Owner

Scope Review: READY

Review note: review-1479-2026-06-17
Ticket is well-scoped with all template sections complete. Single file target (.woodpecker.yml) verified, 3 testable acceptance criteria, no dependencies, no decomposition needed. Story and Forgejo traceability confirmed. Arch note missing from pal-e-docs but in-repo docs/architecture.md covers the gap acceptably.

## Scope Review: READY Review note: `review-1479-2026-06-17` Ticket is well-scoped with all template sections complete. Single file target (.woodpecker.yml) verified, 3 testable acceptance criteria, no dependencies, no decomposition needed. Story and Forgejo traceability confirmed. Arch note missing from pal-e-docs but in-repo docs/architecture.md covers the gap acceptably.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/godaddy-tofu#38
No description provided.