gha_build.sh ignores failures of the archetype's own mvn install
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 88/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- bash, github-actions, java
- 领域
- build-system, ci-cd
调研方向
从 gha_build.sh 开始,检查 archetype 函数,尤其是 mvn -q clean install 步骤和后续的 mvn archetype:generate 调用。查看相邻步骤如何处理命令失败。当 archetype 安装失败时,脚本会退出,而不是从缓存的 archetype 生成项目,这就算完成;运行安装失败的脚本以确认这一点。
由索引模型根据 Issue 内容生成。
描述
In gha_build.sh, the archetype function runs mvn -q clean install in the archetype module but doesn't check its exit code. The next step, mvn archetype:generate -DarchetypeCatalog=local, then generates from whatever version of the archetype is in the local catalog.
So when the archetype's integration test fails:
- On a clean machine, which is CI today since setup-java has no Maven cache, nothing is in the local catalog and generate fails with "The desired archetype does not exist". The job goes red, but the error points at the wrong step.
- On a machine that has installed an older archetype before (any dev machine, or CI if Maven caching is turned on later), generate quietly uses the old archetype and the run passes. The new archetype is never tested.
Releases aren't affected: release.yml runs mvn release:prepare/perform over the full reactor, which runs the archetype integration tests and stops on failure.
This came up in #1714. The springboot4 archetype's integration test failed with NoClassDefFoundError for JsonApplyView, and a local gha_build.sh run still reported success because it generated from a cached 3.0.3-SNAPSHOT archetype.
Suggested fix: check the exit code after the archetype install, like the other steps do.
cd ${WORKING_DIR}/${ARCHETYPE_NAME} && mvn -q clean install
if [[ "$?" -ne 0 ]]; then
exit 1
fi
Passing -DarchetypeVersion with the project version to archetype:generate would also stop it from falling back to an older archetype.
- 主要语言
- Java
- 星标
- 1.6k
- 派生
- 575
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 12
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
aws/serverless-java-container 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
aws/serverless-java-container#1729 ·
维护者通常 1 天内回复
-
Support for API Gateway mTLS clientCert field可能已有人在做 @2748109647 于 10 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 48/100
aws/serverless-java-container#1726 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
aws/serverless-java-container#1579 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 42/100
aws/serverless-java-container#1568 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 42/100
aws/serverless-java-container#1551 ·
维护者通常 1 天内回复
查看 aws/serverless-java-container 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
ls1intum/thesis-management#1473 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
LunaDeerMC/Dominion#301 · 1 条评论 ·
-
[FEATURE] Expose external refresh, node-level translog and warmer stats可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭untriaged
难度 2/5 1-3 小时 新手友好度 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100