用于排查 GitHub Actions 中失败的端到端测试。它会获取并解压运行日志,检查 OAP 及其他组件的错误,并整理可能的原因,包括独立测试进程中的故障。
- 排查 GitHub Actions 中失败的端到端测试
- 检查 OAP、BanyanDB 或 UI 日志
- 追踪独立测试进程的故障
Rebuild SkyWalking’s distribution and OAP Docker image after source changes, choosing a command sequence that includes the updated JARs. It also explains how to inspect the image contents before running end-to-end tests.
中文简介正在准备中。当前显示英语简介。
Rebuild the SkyWalking distribution and OAP Docker image after source changes. Use before running e2e tests so the image reflects your code changes. Avoids the "image looks updated but runtime has stale jars" trap.
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Rebuilding the Docker image after a source-code change has a two-step dependency: rebuild the dist tarball, then rebuild the image. Skipping the first step silently produces an image with stale jars — the Docker build still "succeeds," the image has a fresh timestamp, but the embedded jar is the one from your previous build.
make docker.oap in the root Makefile is defined as:
docker.% push.docker.%: $(CONTEXT)/$(DIST) $(SW_ROOT)/docker/%/*
$(DOCKER_RULE)
It depends on $(CONTEXT)/$(DIST) (the dist tarball) as a file prerequisite. If that tarball already exists, make does not regenerate it — it just copies whatever is on disk into dist/docker_build/oap/ and runs docker buildx build. There is no dependency that rebuilds the tarball from source.
Only make docker triggers the full chain (init → build.all → docker.all). So:
| Command | Rebuilds source? | Rebuilds tarball? | Rebuilds image? |
|---|---|---|---|
./mvnw -pl <module> package | only that module | no | no |
./mvnw -pl apm-dist -am package -Pbackend,dist | all backend deps + dist | yes | no |
make docker.oap | no | no (uses whatever's on disk) | yes |
make docker | yes (build.all) | yes | yes (docker.all) |
flatten:flatten — always run it before package/installSkyWalking's poms use ${revision} as a placeholder version (e.g., 10.5.0-SNAPSHOT). The flatten-maven-plugin resolves ${revision} into concrete versions and writes a .flattened-pom.xml. Without it:
${revision} in their coordinates and cannot be resolved as dependencies.apm-dist) see an inconsistent dependency graph.-pl <module> -am may succeed in isolation but fail or pull in stale transitive artifacts when the same module is consumed by another build invocation in the same session.Always run flatten:flatten in the same goal chain as package or install. The CI dist-tar job and the compile skill both do this. Example:
./mvnw clean flatten:flatten package -Pbackend,dist -DskipTests
Not optional — treat it as part of package.
# Recommended: full chain
make docker
or, faster and equivalent for backend-only changes (skips UI):
./mvnw -pl apm-dist -am -o clean flatten:flatten package -Pbackend,dist -DskipTests -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true
make docker.oap
Do not just run make docker.oap after a code edit — the image will look rebuilt but your change will not be in the jars.
Do not skip flatten:flatten — see the section above.
apm-dist/, log4j2.xml)./mvnw -pl apm-dist -am -o clean flatten:flatten package -Pbackend,dist -DskipTests
make docker.oap
docker/oap/*)The tarball is untouched, so make docker.oap alone is correct:
make docker.oap
Docker's "image created" timestamp updates even when the content is stale (because --no-cache is used). Don't trust the timestamp. Verify the jar contents directly:
# Copy the jar out of the container
docker cp <container-name>:/skywalking/oap-libs/<module>-<version>.jar /tmp/verify.jar
# Extract the specific class
cd /tmp && jar -xf verify.jar <path/to/YourClass.class>
# Grep for a string your fix introduced (unique literal, method name, etc.)
grep -oa "myFixSignature" <path/to/YourClass.class>
If grep finds nothing, the image does not contain your fix — you forgot to rebuild the dist. Re-run with the correct chain.
make docker.oap after ./mvnw package: The module jar is fresh in oap-server/.../target/, but the dist tarball at dist/apache-skywalking-apm-bin.tar.gz is untouched. Image uses the old jar.make docker mid-flight: leaves the dist half-rebuilt. Re-run make docker or delete dist/ first.--no-cache), but if you suspect it, run docker buildx prune.docker images shows when the image was tagged, not when its content actually changed. A no-op rebuild still updates the timestamp.docker buildx build sits silent for minutes with no stdout, kill it and retry. The buildx container driver occasionally stalls; a restart is faster than waiting.After any Java source edit that affects code shipped in oap-libs/, run one of:
make docker (full, safest)./mvnw -pl apm-dist -am -o package -Pbackend,dist -DskipTests -Dcheckstyle.skip=true && make docker.oap (fast)Then verify the fix is in the image's jar before running e2e. Don't assume.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
用于排查 GitHub Actions 中失败的端到端测试。它会获取并解压运行日志,检查 OAP 及其他组件的错误,并整理可能的原因,包括独立测试进程中的故障。
通过 Maven 包装器构建 SkyWalking OAP,并检查 Javadoc 和 Checkstyle。可选择全量、后端、单个模块构建或单项检查,用于提交 PR 前验证改动。
编译 SkyWalking 的 MAL、OAL、LAL 或 Hierarchy DSL 脚本,并输出生成的 `.class` 文件供检查。可选择一种 DSL,也可生成全部四种,再用 `javap` 查看字节码。
在推送前检查构建、Checkstyle、许可证标头和 Java 类名写法,修复问题后提交并推送分支;若当前分支尚无 PR,则按项目模板创建。
用 `license-eye` 检查源文件的 Apache 2.0 标头和依赖许可证清单;可修复标头、重新生成清单,并在提交 PR 前核对差异。
为 SkyWalking OAP 增加监控对象或 Layer 时,梳理不同信号对应的扩展点,并列出 Layer 注册、界面模板、文档和本地验证等相关工作。