-
Notifications
You must be signed in to change notification settings - Fork 0
release: v2.4.0 #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release: v2.4.0 #37
Conversation
- Simplified generate-changelog.rb to require only --version parameter - Auto-detect repository URL for commit links - Removed complex configuration files (YAML configs) - Updated workflows to call script directly like pico-api-docs - Removed unnecessary DevOps tooling (Docker, GitHub Actions, etc.) - Made the script self-contained and easily reusable The changelog generator now works like pico-api-docs version: Just run: ruby generate-changelog.rb --version X.Y.Z
- Restored working deploy.yml from develop branch - Simplified release-branch-creation.yml to call script directly - Removed complex DevOps over-engineering - Kept essential workflows: CI, Deploy, Release Branch Creation, Release Workflow - Added empty lines at end of files per requirement The workflows now follow the pico-api-docs pattern: - Simple changelog generation with --version parameter - No complex configuration or Docker requirements - Focus on essential functionality that works
✅ Fixed all duplicate jobs and workflow conflicts: - Removed duplicate deployment logic from release-workflow.yml - Enhanced deploy.yml with proper trigger conditions - Fixed duplicate GitHub release creation - Added missing newlines to all workflow files - Ensured clear separation of concerns: - ci.yml: Development quality gates - release-branch-creation.yml: Release preparation - release-workflow.yml: Git Flow orchestration - deploy.yml: Production deployment Perfect Git Flow automation: 1. Release branch created → Generate changelog, create PRs 2. Release merged to main → Create tag, setup back-merge 3. Tag created → Deploy to production, create GitHub release No more duplicates, conflicts, or circular dependencies!
- Fix Go version inconsistency in release-branch-creation.yml (1.21 -> 1.25.x)
- Add version_files configuration to .version-config.yml
- Create scripts/update-version.sh for automated version updates
- Replace hardcoded file updates with configuration-driven approach
- Support pattern-based version replacement with {version} and {major} placeholders
…rganization - Add swagger regeneration step after version updates - Move generate-changelog.rb to scripts/ directory for better organization - Update workflow to use Ruby script instead of Go script - Ensure swagger docs reflect version changes automatically - Maintain script organization consistency across project
…nerator feat: simplify changelog generator and remove unnecessary complexity
… API - Add TransformToResponseWithoutProvince methods to ProvinceCase models - Update GetProvincesWithLatestCase service to use new transformation - Remove duplicate province information from latest_case object - Maintain backward compatibility for other endpoints - Add comprehensive test coverage for new transformation methods The province list API now returns cleaner data structure without redundant province information in the latest_case object.
…ndant-data fix: remove redundant province data from latest_case in province list API
- Add smart change detection to only test modified packages - Create centralized test configuration (.test-config.yml) with: * Per-package coverage thresholds * Configurable enforcement policies (warn vs enforce) * Test execution settings and triggers - Enhance CI workflow with selective testing: * Only run unit tests on changed packages * Smart integration test triggering * Selective linting based on changes * Fallback to full suite for critical changes - Improve coverage reporting: * Per-package threshold validation * Clear pass/warn/fail indicators * Actionable recommendations * Enhanced PR comments with testing strategy - Optimize CI performance while maintaining comprehensive coverage - Default to warning mode (non-enforcing) for gradual adoption The CI now provides faster feedback by testing only relevant changes while ensuring critical paths are always validated.
- Add documentation for new CI/CD features and intelligent testing - Update project structure to include scripts/ directory and config files - Document test coverage configuration and per-package thresholds - Add version management documentation with automated file updates - Include comprehensive testing commands and workflow information - Document selective testing and performance optimization features The README now reflects all recent enhancements including: - Intelligent CI/CD with selective package testing - Centralized test configuration with .test-config.yml - Automated version management and Swagger regeneration - Enhanced Git Flow automation with changelog generation
- Remove separate production build files in favor of single file approach - Add conditional Swagger UI routing based on ENV variable - Provide clear instructions for minimal production builds (6.1MB vs 23MB) - Update build documentation with optimization flags and size comparisons - Maintain full Swagger functionality in development mode - Update deployment workflow to use optimized build flags Key improvements: - 73% binary size reduction possible (23MB → 6.1MB) by commenting docs import - 26% reduction (23MB → 17MB) with optimized flags but keeping Swagger - Environment-based Swagger UI enable/disable (ENV=production disables) - Clear production vs development build instructions - Single codebase approach without build tags For minimal production build, comment out docs import in cmd/main.go and use: CGO_ENABLED=0 go build -ldflags="-w -s" -o pico-api-go cmd/main.go
- Disable docs import in cmd/main.go for production deployment - Comment out httpSwagger import in routes.go to exclude dependencies - Remove Swagger generation step from deploy workflow (served from static site) - Update deploy workflow messaging for minimal production build - Verified: 6.1MB production binary vs 23MB development binary (73% reduction) Changes: - cmd/main.go: Commented out docs import for production - routes.go: Disabled httpSwagger import and handler for minimal build - deploy.yml: Removed Swagger generation, updated build messaging - README.md: Updated production build documentation The deploy workflow now builds truly minimal production binaries since Swagger documentation is served from separate static website.
- Fix integration test failure by updating SetupRoutes call signature - Add missing enableSwagger parameter to api_test.go setupTestServer - Fix Go code formatting issues with gofmt across multiple files - All tests now pass: unit tests, integration tests, and formatting checks Changes: - test/integration/api_test.go: Updated SetupRoutes call with enableSwagger=true - cmd/main.go: Fixed import formatting and comment placement - Multiple files: Applied gofmt formatting fixes Verified: - All unit tests pass - All integration tests pass - No gofmt formatting issues - Code ready for CI pipeline
- Fix "unknown flag: --out-format" error by specifying compatible golangci-lint version - Use golangci-lint v1.54.2 instead of "latest" to avoid version conflicts - Remove --out-format flag for better compatibility with older versions - Ensure linter runs successfully in CI pipeline The issue was caused by the CI downloading an old version (v2.4.0) that doesn't support the --out-format flag, while the install script was supposed to get "latest". This fix ensures consistent, compatible linter execution.
- Change db.PingContext to db.DB.PingContext - Change db.QueryRowContext to db.DB.QueryRowContext - Change db.Stats to db.DB.Stats - Fixes typecheck errors where linter couldn't resolve embedded *sql.DB methods
- Add .golangci.yml to properly configure linter for test files - Exclude typecheck linter for test files to avoid mock/embed false positives - Add specific exclusions for testify mock methods (Called, On, AssertExpectations) - Add exclusion for sqlmock undefined issues - Enable other important linters while avoiding problematic ones for tests This resolves the 40+ linting errors related to mock interfaces and test dependencies.
feat: optimize binary size with conditional Swagger compilation
Following release branch creation for v2.4.0, updating develop branch to target the next minor version v2.5.0. Changes: - Update project version to 2.5.0 - Prepare for next development cycle This maintains the Git Flow pattern where develop always contains the next planned version.
- Add page parameter to pagination-enabled endpoints
- Regenerate Swagger docs with complete pagination support
- Fix /provinces/cases and /provinces/{provinceId}/cases endpoints
- All pagination endpoints now include limit, offset, page, and all parameters
- Fix database embedded field selector issues for linter compliance - Update mock interfaces to include new pagination methods - Fix version assertions in tests from 2.4.0 to 2.5.0 - All tests and linting now pass successfully
- Fix version script bug that replaced rate limiting "100" with "2.5.0" - Remove formatting artifacts (\t\t) from API description - Regenerate Swagger docs with correct "100 requests per minute" value - Maintain proper API documentation consistency
- Revert database method calls to use db.DB.MethodName() format - Fix typecheck linter errors in CI pipeline - Local staticcheck warnings acceptable vs CI build failures - All tests continue to pass with explicit field access
chore: bump version to v2.5.0 for next development cycle
- Update version to 2.4.0 in project files - Generate release changelog This commit prepares the release/v2.4.0 branch for release.
- Fix embedded field selector warnings in database package - Complete pagination parameter documentation in all endpoints - Add page parameter support to province cases endpoints - All tests passing and linter clean
- Fix version update script regex patterns to prevent rate limiting value corruption - Update database method calls to use explicit db.DB format for CI compatibility - Regenerate Swagger documentation with corrected rate limiting values
- Add hybrid pagination to /national endpoint (returns all data by default, paginated when parameters provided) - Implement GetNationalCasesPaginated and GetNationalCasesPaginatedSorted service methods - Add GetAllPaginated and GetByDateRangePaginated repository methods with total count - Support limit, offset, and page query parameters with date range filtering - Update Swagger documentation with pagination parameter descriptions - Add pagination methods to all mock interfaces for comprehensive test coverage - Maintain backward compatibility for existing API consumers - Follow consistent pagination pattern matching province endpoints
- Add new job to automatically create PRs to main when release/* or hotfix/* branches are created - Use conventional commit style for PR titles (release: vX.X.X or fix: vX.X.X) - Include deployment checklists and proper labeling - Prevent duplicate PRs with existing PR detection - Support both release and hotfix branch patterns - Clean PR descriptions without attribution text
🎯 CI Pipeline Summary🔄 Running full test suite (triggered by critical file changes) 📊 Job Status
🎉 Overall Result: SUCCESSAll CI checks completed successfully! The code is ready for review/merge. |
- Remove duplicate method implementations in covid_service.go - Fix code formatting with gofmt - Update test expectations to match current version 2.4.0 - All tests now passing, build successful
🔍 Linting Results🔄 Running full test suite (triggered by critical file changes)
|
📊 Enhanced Code Coverage Report🔄 Running full test suite (triggered by critical file changes) 🎯 Coverage Summary
📦 Package Coverage Analysis
🔍 Testing Strategy Applied
💡 RecommendationsPackages needing attention:
📋 Detailed CoverageClick to expand detailed coverage by file |
|
🚀 Release Process Completed Successfully The complete Git Flow release process has finished: ✅ Completed Actions
🔄 Deployment PipelineThe deployment workflow will be automatically triggered and will:
🎉 Git Flow CompleteYour release tag has been created and deployment triggered! Monitor the deployment progress and merge the back-merge PR when ready. |
|
🔄 Back-merge PR Created A back-merge PR has been automatically created to sync the develop branch:
Please review and merge the back-merge PR to complete the release process. |
Summary
Release v2.4.0 ready for merge to main branch.
Changes
Deployment
This release will be deployed to production after merge.
Checklist