init google scaffold generates incorrect networks INSERT and statecheck
还没有人认领这个 Issue。
评估
调研方向
从 stackql-deploy init google 入口开始,找到生成的 Compute Network 资源定义。使用 DESCRIBE METHOD google.compute.networks.insert 验证必需的 request-body 字段,然后将生成的 INSERT 和 statecheck 与 issue 中可正常工作的形式进行比较。完成标准是:新生成的 Google scaffold 使用 data__ 字段,正确匹配 autoCreateSubnetworks,并且无需手动编辑即可完成 build flow。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 1
- 派生
- 0
- 平均合并
- 12 分钟
- 30 天内合并 PR
- 3
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stackql/stackql-deploy-rs 的其他 Issue
-
enhancement
难度 5/5 一周以上 新手友好度 45/100
stackql/stackql-deploy-rs#60 ·
-
难度 5/5 一周以上 新手友好度 35/100
stackql/stackql-deploy-rs#58 ·
查看 stackql/stackql-deploy-rs 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
TheLarkInn/aipm#2413 ·
-
documentation
难度 1/5 1 小时以内 新手友好度 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
难度 2/5 1-3 小时 新手友好度 75/100
-
todo:ticket
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
taikoxyz/taiko-mono#22168 · 1 条评论 ·