Skip to content

fix: CI reliability improvements - timeouts, test timing, and integration tags - #4

Merged
k8ika0s merged 18 commits into
mainfrom
fix/all-ci-failures
Jan 19, 2026
Merged

fix: CI reliability improvements - timeouts, test timing, and integration tags#4
k8ika0s merged 18 commits into
mainfrom
fix/all-ci-failures

Conversation

@k8ika0s

@k8ika0s k8ika0s commented Jan 19, 2026

Copy link
Copy Markdown
Owner

Summary

This PR improves CI/CD pipeline reliability and test stability by adding timeout configurations, adjusting test timing parameters, and properly tagging integration tests.

Changes Made

1. CI Workflow Improvements (.github/workflows/ci.yml)

  • Added job-level timeout: 15-minute timeout for backend-test job to prevent indefinite hangs
  • Added test-level timeout: 10-minute timeout flag (-timeout=10m) for Go test execution
  • Fixed frontend test command: Changed from --watchAll=false (Jest syntax) to --run (Vitest syntax)
  • Removed non-existent step: Removed format:check step that doesn't exist in package.json

2. JWT Test Timing Fixes (backend/pkg/auth/jwt_test.go)

  • Increased token duration: Changed from 500ms to 2s in expiration tests
  • Increased sleep buffer: Changed from 200ms to 500ms to ensure reliable expiration
  • Affected tests:
    • TestGenerateToken_CustomExpiration (lines 99, 111)
    • TestGenerateBreakGlassToken_ExpirationCheck (lines 326, 344)

3. Integration Test Tagging

  • Tagged Temporal tests: Added //go:build integration to:
    • backend/pkg/temporal/activities_test.go
    • backend/pkg/temporal/workflows_test.go
  • Rationale: These tests require external Temporal server and take 600+ seconds, causing CI timeouts
  • Impact: Tests now skip in CI but can be run locally with -tags=integration

Testing Performed

Local verification:

  • JWT tests pass with new timing parameters
  • Temporal tests properly skip without integration tag
  • Temporal tests run successfully with -tags=integration

CI verification: Awaiting CI run to confirm:

  • Backend tests complete within timeout
  • Frontend tests run with correct Vitest syntax
  • No test failures from timing issues

Breaking Changes

None - this is a CI/test infrastructure improvement.

Remaining Known Issues

This PR addresses the most critical CI failures. Additional issues to be addressed in follow-up work:

  • Frontend Lint warnings (React Hooks, ESLint violations)
  • Frontend Build errors
  • Integration test container/service failures
  • Security scan configuration issues

Checklist

  • Code follows project style guidelines
  • Tests added/modified as needed
  • Documentation updated (N/A for CI fixes)
  • No breaking changes
  • Commit messages follow convention
  • Branch is up to date with main

Related Issues

Part of comprehensive CI remediation effort following PR #3.

Deployment Notes

No deployment changes required - CI configuration only.

- Add job timeout (15min) and test timeout (10min) to prevent long waits
- Tag Temporal tests as integration tests (skip in CI)
- Fix JWT test timing issues (increase token duration from 500ms to 2s)

Changes:
- .github/workflows/ci.yml: Add timeout-minutes and -timeout flag
- backend/pkg/temporal/*_test.go: Add //go:build integration tags
- backend/pkg/auth/jwt_test.go: Increase test token durations

This resolves Backend Tests timeout and JWT test failures.
- Fix Vitest command: use --run instead of --watchAll=false
- Remove non-existent format:check step from CI

Changes:
- .github/workflows/ci.yml: Update test command and remove format check

This resolves Frontend Tests 'Unknown option --watchAll' error.
- Upgrade github/codeql-action/upload-sarif from v2 to v3
- Add security-events: write permission to security-scan job
- Add contents: read permission for proper access

This resolves:
- CodeQL Action v2 deprecation warning
- 'Resource not accessible by integration' error when uploading SARIF results

Changes:
- .github/workflows/ci.yml: Update CodeQL action versions and add permissions
- Add workflow-level permissions (contents: read, security-events: write)
- Upgrade github/codeql-action/upload-sarif from v3 to v4
- Remove redundant job-level permissions (inherited from workflow)

This resolves:
- 'Resource not accessible by integration' error
- CodeQL Action v3 deprecation warning (v4 is latest)

Changes:
- .github/workflows/ci.yml: Add workflow permissions and upgrade CodeQL action
- add actions read permission for SARIF uploads
- start MinIO via docker run and clean up
- upgrade upload-artifact to v4
- guard location health checks for empty IDs
- default NATS logger to nop for nil input
- fix cache pipeline test JSON encoding
- lock logger test writer for concurrency
- align middleware context key extraction
- remove unused temporal helper
- move AdvancedSearch/ContextMenu hooks to dedicated files
- update UI tests for current classes and behavior
- harden toast container defaults and exports
- fix easter egg tracking and loader behavior
- add dashboard refresh callback memoization
@k8ika0s
k8ika0s merged commit 34424fd into main Jan 19, 2026
7 checks passed
@k8ika0s
k8ika0s deleted the fix/all-ci-failures branch January 19, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant