CI: CodeQL java-kotlin intermittently fails to resolve Gradle plugins (no dependency cache)

未关闭 适合新手
#103 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
半天
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, kotlin
领域
ci-cd

调研方向

从 codeql.yml 和 ci.yml 中的 Android job 开始,然后将其 Gradle 配置与 settings.gradle.kts 进行比较。为固定版本的 actions/setup-java 步骤启用 Gradle 依赖缓存,并核实为什么插件解析只列出 Google 和 MavenRepo,而不是 gradlePluginPortal()。完成的标准是所需的 CodeQL job 能够可靠地解析 Kotlin 插件,无需重新运行,并且仍保持启用。

由索引模型根据 Issue 内容生成。

描述

ci

Analyze (java-kotlin) (CodeQL, a required check) fails intermittently while resolving Gradle plugins, before any analysis:

Plugin [id: 'org.jetbrains.kotlin.jvm', version: '2.3.10', apply: false] was not found in any of the following sources:
  ... Searched in the following repositories: Google, MavenRepo

Seen on #89, #99 and #101 (3 times in 2 days). A rerun passes, so this is a download problem, not the code.

Neither codeql.yml nor the Android job in ci.yml caches Gradle dependencies, so every run downloads everything from Maven Central.

Proposed fix (needs review, CI change):

  • Enable Gradle dependency caching for the CodeQL java-kotlin job, e.g. cache: gradle on the existing pinned actions/setup-java.
  • Check why the error lists only Google and MavenRepo although settings.gradle.kts also declares gradlePluginPortal().

The check stays required and is not skipped.

主要语言
Kotlin
星标
0
派生
0
平均合并
17 小时 56 分钟
30 天内合并 PR
10

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ft-dev-org/cloudbridge-oss 的其他 Issue

查看 ft-dev-org/cloudbridge-oss 的全部 Issue

相似的 Issue

更多 Kotlin Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。