Skip to content

[Docs] Self-host Ask DeepWiki badge image to fix broken rendering - #12830

Merged
davidzollo merged 1 commit into
apache:devfrom
zhangshenghang:fix/deepwiki-badge
Oct 16, 2026
Merged

davidzollo merged 1 commit into
apache:devfrom
zhangshenghang:fix/deepwiki-badge

Conversation

@zhangshenghang

@zhangshenghang zhangshenghang commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Purpose of this PR

The Ask DeepWiki badge in the README currently renders as a broken image.

Root cause: the badge image https://deepwiki.com/badge.svg currently returns HTTP 429 with a Vercel Security Checkpoint challenge page for all non-interactive (server-side) clients. GitHub renders README images through its camo image proxy, which fetches server-side, so it receives the 429 HTML page instead of the SVG and the badge shows as broken. The README markup itself follows DeepWiki's official recommended badge syntax — the issue is purely on the image host side, and it affects every repository hot-linking this badge.

What changes

  • Add the badge SVG to the repository at docs/images/deepwiki-badge.svg (identical content to the official badge, same as what a browser receives after passing the challenge).
  • Point the README badge at the relative path docs/images/deepwiki-badge.svg, consistent with the existing README usage of relative image paths (e.g. docs/images/architecture_diagram.png). The link target remains https://deepwiki.com/apache/seatunnel.

This makes the badge rendering independent of third-party service availability.

How is this PR tested?

  • Rendered the README locally with the relative path: badge displays correctly.
  • Validated docs/images/deepwiki-badge.svg as well-formed XML, byte-identical to the official badge image.
  • Confirmed line 8 of README.md on dev is unchanged upstream, so no merge conflict.

Checklist

  • Code compiles and all tests pass — N/A: docs/asset-only change, no code touched (build not run)
  • mvn clean install -DskipTests finished successfully — N/A (not applicable to this change)
  • No new exceptions in the log — N/A
  • Docs updated and aligned with English docs — N/A (README only)

deepwiki.com/badge.svg currently returns HTTP 429 (Vercel security
challenge) to non-browser clients, so GitHub's camo image proxy fails
to fetch it and the badge renders as a broken image on the README.

Serve the badge SVG from docs/images/ and reference it with a relative
path, consistent with other README images, so it no longer depends on
third-party availability.

@DanielLeens DanielLeens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, and thanks a lot for your valuable contribution to Apache SeaTunnel! Fixing a broken README badge is a small change, but it is the first thing every visitor sees, so it is worth doing well. I reviewed the full diff of the current head and traced how the badge is rendered.

What Problem Does This PR Solve?

User pain point: The "Ask DeepWiki" badge in the README is rendered through GitHub's image proxy, which fetches https://deepwiki.com/badge.svg server-side. According to the PR description, that host now answers non-interactive clients with a 429 security-challenge page, so the proxy gets HTML instead of an SVG and the badge shows as a broken image.

Fix approach: Commit the badge SVG into the repository (docs/images/deepwiki-badge.svg) and point the README at that relative path. The link target (https://deepwiki.com/apache/seatunnel) is unchanged.

One-sentence summary: The badge no longer depends on a third-party host being reachable by GitHub's proxy.

Before / after:

-[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/apache/seatunnel)
+[![Ask DeepWiki](docs/images/deepwiki-badge.svg)](https://deepwiki.com/apache/seatunnel)

1. Code Change Review

1.1 Core Logic Analysis

The change touches two files only: README.md (line 8, one image URL) and the new docs/images/deepwiki-badge.svg (1801 bytes).

Key Findings:

  • The change is documentation-only. No engine, API, connector, config option, serialization or checkpoint path is touched, so there is no runtime path to trace.
  • The README edit is a one-line swap of the image source; the click-through link is identical, and the relative-path style matches the existing ![SeaTunnel Workflow](docs/images/architecture_diagram.png) usage in the same file.
  • The SVG parses as well-formed XML (I parsed it at the PR head), has no <script> element, no event handler attributes, and no external references. Its only href is an inline data: image, so GitHub's SVG sanitization and the <img> rendering context will not be a concern.
  • docs/images/ already holds other SVGs (ASFSeaTunnel.svg, seatunnel-slack.svg, seatunnel-workflow.svg), so adding another one follows existing practice.

In-depth correctness: GitHub resolves relative image paths in the root README against the repository default branch, so the badge will render from the committed file regardless of DeepWiki availability. The flip side is that this is now a static snapshot: the label text is fixed, which is fine for a constant "Ask DeepWiki" badge.

1.2 Compatibility Impact

Fully compatible. No config, API, data format or runtime behavior changes, and nothing needs an entry in incompatible-changes.md.

1.3 Performance / Side-Effect Analysis

No runtime impact. The repository grows by about 1.8 KB. One minor side effect: copies of the README rendered outside GitHub (for example a package or mirror page that does not resolve relative paths) would not show the badge, but that applies equally to the existing relative-path images in this README.

1.4 Error Handling and Logging

No blocking issues found. Remaining non-blocking observations are listed in the Issue Summary.

2. Code Quality Assessment

2.1 Coding Standards

No Java code. The SVG is a single-line generated asset; license-header rules for source files do not apply to binary-like image assets, and the repo already carries header-less SVGs in the same folder.

2.2 Test Coverage and Test Stability

No tests are applicable for a README asset change. No UT/E2E is added or modified, so there is no flakiness exposure. The GitHub Build check on this head completed successfully (note that the apache-side Build check is a pointer to the contributor fork run), along with labeler and the notify workflow.

2.3 Documentation Updates

The README is the document being fixed. No docs/en or docs/zh content references this badge, so nothing else needs updating.

3. Architectural Soundness

3.1 Elegance

Long-term, low-risk solution: it removes a runtime dependency on a third-party image host for a purely cosmetic element, with a minimal diff.

3.2 Maintainability

Trivial. If DeepWiki ever changes its badge design, the local copy will simply keep showing the old one, which is acceptable.

3.3 Extensibility

Not applicable. The same pattern can be reused for other third-party badges that become unreliable.

3.4 Historical-Version Compatibility

No impact on any released version, state, or upgrade path.

4. Issue Summary

Number Issue Location Severity
1 Optional: note the provenance of the embedded DeepWiki logo (it is a third-party asset embedded as a base64 PNG); if you want to be extra careful for an ASF project, a one-line confirmation in the PR description that its redistribution is permitted would be nice docs/images/deepwiki-badge.svg Low

Issue 1: Provenance of the embedded third-party logo - Location docs/images/deepwiki-badge.svg:1
Problem description: The badge embeds the DeepWiki logo as an inline PNG, copied from the official badge. Risk: practically none for a README badge that DeepWiki itself asks projects to display, but ASF projects generally prefer to be explicit about third-party assets. Best improvement: mention in the PR description that the file is the unmodified official badge as published for repository README use. Severity Low. Raised by another reviewer: No.

5. Merge Recommendation

Conclusion: Ready to merge

  1. Blockers - must be fixed: None. No blocking issues found.
  2. Recommended fixes - non-blocking: Issue 1 above (description-only note). The branch is 49 commits behind dev, but the only touched README line is unchanged upstream, so this is metadata only and not a reason to rebase.

Overall assessment: a tiny, safe, well-explained fix that makes the README independent of an unreliable external host. Remaining risk is limited to the badge being a static snapshot. Thanks again for the fix!

@davidzollo davidzollo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
LGTM

@davidzollo
davidzollo added this pull request to the merge queue Oct 16, 2026
Merged via the queue into apache:dev with commit 636fc16 Oct 16, 2026
4 checks passed
zhangshenghang pushed a commit to zhangshenghang/seatunnel that referenced this pull request Oct 18, 2026
The branch was 400 commits behind dev and missing two upstream CI fixes:
- apache#12287 and follow-ups: Docker Hub minio/minio no longer serves anonymous
  pulls, S3-backed e2e tests now use a digest-pinned ghcr.io mirror
- apache#12830: self-host the DeepWiki badge image

Both caused failures unrelated to this PR's test-only changes (all
transform-v2 jobs passed on the old head). PR test additions unchanged;
verified with JDK 17: NumericFunctionTest + SQLNumericFunctionsTest green
(46 tests), spotless:check clean.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Asthenia0412 added a commit to Asthenia0412/seatunnel that referenced this pull request Oct 18, 2026
…ache#12830)

Signed-off-by: Asthenia0412 <Asthenia0412@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants