You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "spenpal (via GitHub)" <gi...@apache.org> on 2025/09/22 15:53:32 UTC
[I] [Bug][DevContainer] Version mismatches and missing PostgreSQL support in .devcontainer configuration [incubator-devlake]
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: dev-unsubscribe@devlake.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][DevContainer] Version mismatches and missing PostgreSQL support in .devcontainer configuration [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8585:
URL: https://github.com/apache/incubator-devlake/issues/8585#issuecomment-3590741356
This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.
--
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: dev-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][DevContainer] Version mismatches and missing PostgreSQL support in .devcontainer configuration [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8585:
URL: https://github.com/apache/incubator-devlake/issues/8585#issuecomment-3565088557
This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.
--
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: dev-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][DevContainer] Version mismatches and missing PostgreSQL support in .devcontainer configuration [incubator-devlake]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #8585:
URL: https://github.com/apache/incubator-devlake/issues/8585#issuecomment-3319884196
<!-- Greeting -->
Hi @spenpal! I'm [Dosu](https://go.dosu.dev/dosubot) and Iām helping the incubator-devlake team.
<!-- Answer -->
You're right about the mismatches: the backend uses Go 1.20.5 and libgit2 v1.3.2, while the devcontainer uses Go 1.22 and libgit2 v1.3.0, and only includes MySQL, not PostgreSQL. These discrepancies can cause build failures and inconsistent behavior across environments, as discussed in [issue #8584](https://github.com/apache/incubator-devlake/issues/8584) and [issue #8553](https://github.com/apache/incubator-devlake/issues/8553). The main docker-compose file supports both MySQL and PostgreSQL, but the devcontainer setup does not ([PR #8554](https://github.com/apache/incubator-devlake/pull/8554)).
For PostgreSQL, the core backend works, but migration scripts and dashboards are MySQL-centric, so using PostgreSQL may require patching migration scripts and updating dashboard configs ([issue #8350](https://github.com/apache/incubator-devlake/issues/8350), [issue #8463](https://github.com/apache/incubator-devlake/issues/8463), [issue #8564](https://github.com/apache/incubator-devlake/issues/8564)). No recent PRs have fixed these mismatches or added PostgreSQL to the devcontainer yet.
To align environments, update the devcontainer Dockerfile to match backend versions (Go 1.20.5, libgit2 v1.3.2) and add a PostgreSQL service to the devcontainer docker-compose file, mirroring the main docker-compose-dev.yml. This will help ensure consistent builds and database options for all contributors.
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
---
<sup>How did I do? [Good](https://app.dosu.dev/response-feedback/036e5ee8-7715-4bee-8e65-0f265bf8360d?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/036e5ee8-7715-4bee-8e65-0f265bf8360d?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/036e5ee8-7715-4bee-8e65-0f265bf8360d?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/036e5ee8-7715-4bee-8e65-0f265bf8360d?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/036e5ee8-7715-4bee-8e65-0f265bf8360d?feedback_type=hallucination) | [Report š](https://app.dosu.dev/response-feedback/036e5ee8-7715-4bee-8e65-0f265bf8360d?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/036e5ee8-7715-4bee-8e65-0f265bf8360d?feedback_type=other)</sup> [](https://app.dosu.dev/b4e8e847-d479-4541-83a8-d88d83fea5c9/ask?utm_source=githu
b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8585)
--
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: dev-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][DevContainer] Version mismatches and missing PostgreSQL support in .devcontainer configuration [incubator-devlake]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8585: [Bug][DevContainer] Version mismatches and missing PostgreSQL support in .devcontainer configuration
URL: https://github.com/apache/incubator-devlake/issues/8585
--
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: dev-unsubscribe@devlake.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org