init google scaffold generates incorrect networks INSERT and statecheck
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Bắt đầu tại entry point stackql-deploy init google và tìm định nghĩa tài nguyên Compute Network được tạo. Sử dụng DESCRIBE METHOD google.compute.networks.insert để xác minh các trường bắt buộc trong request-body, sau đó so sánh INSERT và statecheck được tạo với các dạng đang hoạt động trong issue. Hoàn tất khi một Google scaffold vừa được tạo sử dụng các trường data__, khớp chính xác với autoCreateSubnetworks và hoàn thành build flow mà không cần chỉnh sửa thủ công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The Google scaffold generated by stackql-deploy init google contains two issues in the generated VPC resource definition:
- The
google.compute.networks.insertstatement does not use the method-specificdata__fields required for the request body. - The generated
statecheckcomparesautoCreateSubnetworkswithfalse, which did not match the deployed resource in my validation. Comparing it with0worked correctly.
After correcting both, I successfully validated the complete stackql-deploy build flow against a real GCP project.
Reproduction
Generate a Google stack:
stackql-deploy init google
Then run the generated stack with a valid GCP project.
The generated network resource contains an INSERT similar to:
INSERT INTO google.compute.networks
(project, name, autoCreateSubnetworks, routingConfig)
SELECT
'{{ project }}',
'{{ vpc_name }}',
false,
'{"routingMode": "REGIONAL"}';
When executed against google.compute.networks.insert, this resulted in a GCP HTTP 400 response:
Required field 'resource' not specified
Issue 1: generated INSERT fields
For this provider method, project is the path parameter, while the request-body fields use the data__ prefix.
The working INSERT is:
INSERT INTO google.compute.networks
(project, data__name, data__autoCreateSubnetworks, data__routingConfig)
SELECT
'{{ project }}',
'{{ vpc_name }}',
false,
'{"routingMode": "REGIONAL"}';
The method contract can be inspected directly with:
DESCRIBE METHOD google.compute.networks.insert;
Provider reference:
https://google-provider.stackql.io/services/compute/networks#insert-examples
The Google provider itself is working correctly; this appears to be an issue with the generated init google scaffold for this resource.
Issue 2: generated statecheck
The generated statecheck contains:
AND autoCreateSubnetworks = false
During validation, this returned no matching row even though the VPC had autoCreateSubnetworks disabled.
Changing it to:
AND autoCreateSubnetworks = 0
matched the deployed resource correctly and allowed the statecheck to pass.
End-to-end validation
After applying both changes, the stack completed successfully through the full resource lifecycle:
exists
create
statecheck
exports
successfully deployed resource
build complete
The deployment completed successfully against a real GCP project.
Expected behavior
A project generated by:
stackql-deploy init google
should produce a working scaffold that can be built without manually correcting the generated SQL.
For the generated Compute Network resource, the scaffold should:
- use the method-specific
data__fields required bygoogle.compute.networks.insert - generate a statecheck expression that correctly matches the returned
autoCreateSubnetworksvalue
Root cause
The issue is in the generated Google scaffold for the Compute Network resource, rather than the stackql-deploy runtime or the Google provider specification.
The provider issue originally opened during diagnosis has been closed after confirming the provider method works correctly with the proper INSERT contract.
- Ngôn ngữ chính
- Rust
- Star
- 1
- Fork
- 0
- Merge trung bình
- 26 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 stackql/stackql-deploy-rs
-
[FEATURE] Waiter semantics for `callback`: stop on terminal failure, time-based bounds, backoffĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
stackql/stackql-deploy-rs#60 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
stackql/stackql-deploy-rs#58 ·
Tất cả issue của stackql/stackql-deploy-rs
Issue tương tự
-
area:release bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
registrystack/registry-stack#1874 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
component:midnight-toolkit status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midnightntwrk/midnight-node#2237 ·
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 88/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 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày