update command with resource with outputs generates corrupt lock file
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- docker, go
- Lĩnh vực
- build-system, cli
Hướng nghiên cứu
Follow the reproduction steps: initialize a project, add prometheus with outputs cli and out, generate the Dockerfile, run devbox update, then build the Docker image. Compare the generated devbox.lock before and after the update, focusing on the outputs entries. Done means the updated lock file preserves the requested outputs and the Docker build succeeds.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened?
When using devbox in a docker container it fails if using a package with outputs specified. This only happens when using the generated devbox dockerfile and it only happens after you have used devbox update.
Here is a snippet of the generated devbox.lock that is causing the corruption issue.
Good file
"x86_64-linux": {
"outputs": [
{
"name": "out",
"path": "/nix/store/959wvhvp9yd1xcaqmmbabk4rhs7x8yyv-prometheus-3.1.0",
"default": true
},
{
"name": "cli",
"path": "/nix/store/bd5qxk8agqvfn5sdjc4whj23sgycmmzz-prometheus-3.1.0-cli"
},
{
"name": "doc",
"path": "/nix/store/jabhy8j1wgaib51c6q0sr6bpp01hy2nq-prometheus-3.1.0-doc"
}
],
"store_path": "/nix/store/959wvhvp9yd1xcaqmmbabk4rhs7x8yyv-prometheus-3.1.0"
}
Bad file after devbox update
"x86_64-linux": {
"outputs": [
{
"name": "cli",
"path": "/nix/store/bd5qxk8agqvfn5sdjc4whj23sgycmmzz-prometheus-3.1.0-cli",
"default": true
},
{
"path": "/nix/store/959wvhvp9yd1xcaqmmbabk4rhs7x8yyv-prometheus-3.1.0",
"default": true
},
{
"name": "cli",
"path": "/nix/store/bd5qxk8agqvfn5sdjc4whj23sgycmmzz-prometheus-3.1.0-cli",
"default": true
},
{
"path": "/nix/store/959wvhvp9yd1xcaqmmbabk4rhs7x8yyv-prometheus-3.1.0",
"default": true
}
],
"store_path": "/nix/store/959wvhvp9yd1xcaqmmbabk4rhs7x8yyv-prometheus-3.1.0"
}
}
}
}
}
0.465 Info: Ensuring packages are installed.
0.552 Error: error running script "echo" in Devbox: Output out not found
0.552
------
Dockerfile:13
--------------------
11 |
12 |
13 | >>> RUN devbox run -- echo "Installed Packages."
14 |
15 | CMD ["devbox", "shell"]
--------------------
ERROR: failed to solve: process "/bin/sh -c devbox run -- echo \"Installed Packages.\"" did not complete successfully: exit code: 1
Steps to reproduce
- devbox init
- devbox add prometheus@latest -o cli,out
- devbox generate dockerfile
- devbox update
- docker build .
See error
Command
update
devbox.json
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.14.0/.schema/devbox.schema.json",
"packages": {
"prometheus": {
"version": "latest",
"outputs": ["cli", "out"]
}
},
"shell": {
"init_hook": [
"echo 'Welcome to devbox!' > /dev/null"
],
"scripts": {
"test": [
"echo \"Error: no test specified\" && exit 1"
]
}
}
}
Devbox version
0.14.0
Nix version
nix (Nix) 2.28.1
What system does this bug occur on?
Linux (x86-64)
Debug logs
[7/7] RUN devbox run -- echo "Installed Packages.":
0.523 Info: Ensuring packages are installed.
0.576 Error: error running script "echo" in Devbox: Output out not found
0.576
Dockerfile:14
12 |
13 | RUN nix --version
14 | >>> RUN devbox run -- echo "Installed Packages."
15 |
16 | CMD ["devbox", "shell"]
ERROR: failed to solve: process "/bin/sh -c devbox run -- echo "Installed Packages."" did not complete successfully: exit code: 1
- Ngôn ngữ chính
- Go
- Star
- 12.4k
- Fork
- 358
- Merge trung bình
- 17 giờ 12 phút
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jetify-com/devbox
-
feature triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jetify-com/devbox#3038 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pulumi is outdatedĐang mởbug p4 package processed triage unrelated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
jetify-com/devbox#2898 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
p4 processed unrelated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
jetify-com/devbox#2750 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
StorydenĐang mởp4 package processed triage unrelated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jetify-com/devbox#2685 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Plugin Request]: apacheKafkaĐang mởlooks easy p4 package processed triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
jetify-com/devbox#2656 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của jetify-com/devbox
Issue tương tự
-
CLI: `describe <ns>.<table>` reports "namespace does not exist" when only the table is missingCó thể đã có người làm @Shruthirdy đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
apache/iceberg-go#2423 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
post-v4
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
rishikanthc/Scriberr#506 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/TypeScript#65290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] rollingUpdatePartition panics when live StatefulSet replicas sit far below the desired countĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
sgl-project/rbg#547 ·
Maintainer thường phản hồi trong vòng 1 ngày