spenpal opened a new issue, #8585:
URL: https://github.com/apache/incubator-devlake/issues/8585

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   The `.devcontainer` configuration has several version mismatches compared to 
the main Docker setup and is missing PostgreSQL support:
   
   **Critical Issues:**
   1. **Go Version Mismatch**: 
      - Backend uses Go 1.20.5 (`backend/Dockerfile`, `go.mod`)
      - DevContainer uses Go 1.22 (`.devcontainer/Dockerfile`)
      
   2. **libgit2 Version Mismatch**:
      - Backend uses v1.3.2 (newer)
      - DevContainer uses v1.3.0 (older)
   
   3. **Missing PostgreSQL Support**:
      - `docker-compose-dev.yml` supports both MySQL and PostgreSQL
      - `.devcontainer/docker-compose.yml` only includes MySQL
   
   ### What do you expect to happen
   
   The devcontainer environment should match the production build environment 
exactly to ensure:
   - Consistent behavior across development environments
   - No build issues when switching between environments
   - Same database options available in both setups
   - Dependencies behave identically
   
   ### How to reproduce
   
   1. Compare `.devcontainer/Dockerfile` line 16: 
`mcr.microsoft.com/devcontainers/go:1-1.22-bookworm`
   2. With `backend/Dockerfile` line 34: `golang:1.20.5-bookworm`
   3. Compare `.devcontainer/Dockerfile` line 24: `git clone -b v1.3.0`
   4. With `backend/Dockerfile` line 66: `v1.3.2.tar.gz`
   5. Compare services in `.devcontainer/docker-compose.yml` vs 
`docker-compose-dev.yml`
   
   ### Anything else
   
   **Required Changes:**
   
   ### `.devcontainer/Dockerfile`:
   - Need to reconcile the correct Go version (1.20 vs. 1.22). Follow this 
issue for more info: https://github.com/apache/incubator-devlake/issues/8584
   
   ```dockerfile
   # Change from:
   RUN git clone -b v1.3.0 https://github.com/libgit2/libgit2.git
   # To:
   RUN git clone -b v1.3.2 https://github.com/libgit2/libgit2.git
   ```
   
   ### `.devcontainer/docker-compose.yml`:
   Add PostgreSQL service:
   ```yaml
   postgres:
     image: postgres:17.2
     volumes:
       - postgres-storage:/var/lib/postgresql
     restart: always
     ports:
       - 5433:5432  # Different port to avoid conflicts
     environment:
       POSTGRES_DB: lake
       POSTGRES_USER: merico
       POSTGRES_PASSWORD: merico
       TZ: UTC
     networks:
       - default
   ```
   
   Add to volumes section:
   ```yaml
   postgres-storage:
   ```
   
   The Go version mismatch is particularly critical as it can cause 
compatibility issues and inconsistent behavior between development environments.
   
   **Relevant past devcontainer issues:**
   - https://github.com/apache/incubator-devlake/issues/8192
   - https://github.com/apache/incubator-devlake/issues/8553
   
   ### Version
   
   Latest
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to