Skip to content

Feature/docker/cicd round 2#101

Merged
SakanaIsReal merged 133 commits intomainfrom
feature/docker/cicd-round-2
Nov 21, 2025
Merged

Feature/docker/cicd round 2#101
SakanaIsReal merged 133 commits intomainfrom
feature/docker/cicd-round-2

Conversation

@SakanaIsReal
Copy link
Copy Markdown
Owner

No description provided.

SakanaIsReal and others added 30 commits October 18, 2025 09:14
- Fix cypress.config.js syntax from export default to module.exports
- Add configurable base URL with environment variable support
- Add cypress-file-upload and cypress-xpath plugins
- Configure frontend proxy to port 16048 for backend communication
…line

fix(ci): clean up sql before starting new test and fix the docker tag…
…line

fix(ci): fix check mysql-ci existent before rm it
- Add comprehensive port cleanup for MySQL (3307), backend (16048), and frontend (3000)
- Force-stop and remove docker containers with timeout and force flags
- Kill Java and Node processes from previous test runs
- Add MySQL health check with retry logic before proceeding
- Improve error handling in network creation
- Apply consistent cleanup logic to both initial and final cleanup steps
…line

fix(ci): enhance cleanup to prevent port binding conflicts in E2E tests
- Add Windows port exclusion detection using netsh
- Check for TIME_WAIT and ESTABLISHED connections, not just LISTENING
- Increase cleanup wait time from 2s to 5s for TCP connection closure
- Verify port 3307 is free before starting MySQL with emergency cleanup fallback
- Improve error diagnostics with port status and container logs
- Skip docker stop and use docker rm -f directly for faster cleanup
…line

fix(ci): enhance port cleanup to prevent binding conflicts in E2E tests
…ocation

- Add Hyper-V port exclusion detection step before MySQL start
- Restart WinNAT service to clear stale port reservations
- Implement automatic fallback from port 3307 to 50307
- Make MySQL port dynamic using GITHUB_ENV variable
- Update backend to use dynamic MYSQL_PORT from environment
- Add comprehensive runner setup documentation
- Improve error diagnostics with port exclusion details

This fixes the "An attempt was made to access a socket in a way forbidden
by its access permissions" error caused by Windows Hyper-V reserving ports
in the dynamic range, which prevents Docker from binding to them.
…line

fix(ci): resolve Windows Hyper-V port conflicts with dynamic port all…
…line

fix(ci): eliminate sql password warning
…romptpay-qr-from-phone-number

feat(paypage): use newly generated qr from promptpay.io
…areserivce

feat(api): edit according to phase 1
…y-to-item

Feature/frontend/add currency to item
SakanaIsReal and others added 29 commits November 21, 2025 09:03
package-lock.json is preserved - Contains the exact dependency tree that works locally
npm ci instead of npm install - Installs exact versions from the lockfile, ensuring ajv-keywords gets a compatible ajv version
Faster CI runs - npm ci is optimized for CI environments (skips certain checks, deletes node_modules itself)
IPv4 vs IPv6: On Windows, localhost often resolves to IPv6 (::1), but Docker usually maps ports to IPv4 (127.0.0.1). Java tries to connect to ::1:3307, finds nothing, and hangs/retries.

Console Buffering: Using Start-Process without redirecting output on Windows can sometimes cause a process to pause if the console output buffer fills up.
…flict

react-scripts@5.0.1 requires TypeScript ^3.2.1 || ^4 but project uses
TypeScript 5.x. Adding --legacy-peer-deps allows npm to proceed with
installation despite the peer dependency mismatch.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- react-router@7.9.6 requires Node >= 20.0.0
- Fixes ajv module resolution error during build
- Node 18 was causing EBADENGINE warnings and build failures

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The ajv-keywords package requires ajv/dist/compile/codegen which is
only available in ajv v8+. Legacy peer deps caused ajv v6 to be
installed, causing the MODULE_NOT_FOUND error during build.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add MYSQL_ROOT_PASSWORD and MYSQL_DATABASE env vars for E2E tests
- Fix port mismatch: use docker-compose ports (8080/8081) instead of
  dev server ports (3000/16048)
- Update wait-on and Cypress config to use correct ports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add Docker Compose network alias for backend.smartsplit.svc.cluster.local
  so nginx.conf (configured for K8s) works in Docker Compose
- Fix Cypress action: remove start: false which was trying to execute
  a file named "false" on Windows
- Use install-command to properly install Cypress with legacy-peer-deps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
After services start, nginx may cache failed DNS lookups. Restart
frontend container after backend is healthy to ensure proper resolution
of backend.smartsplit.svc.cluster.local network alias.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create cypress/seed-data.sql with test user data
- Add "Seed Test Data" step in CI workflow to populate database
  before Cypress tests run

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
PowerShell backticks escape characters; use double quotes instead
for the database name with hyphens.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Truncate all tables in correct order (with FK checks disabled)
to ensure clean database state before each E2E test run.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@SakanaIsReal SakanaIsReal merged commit 5752b3a into main Nov 21, 2025
3 checks passed
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.

4 participants