Skip to content

Add OpenKruise compatibility scraper - #4141

Closed
vayungodara wants to merge 2 commits into
pluralsh:masterfrom
vayungodara:feat/openkruise-compatibility
Closed

Add OpenKruise compatibility scraper#4141
vayungodara wants to merge 2 commits into
pluralsh:masterfrom
vayungodara:feat/openkruise-compatibility

Conversation

@vayungodara

@vayungodara vayungodara commented Sep 8, 2026

Copy link
Copy Markdown

OpenKruise is missing from the compatibility catalog. This adds a scraper, metadata, manifest entry, and generated table using the official installation matrix and Helm chart index.

The table records only upstream's pairings, which mean exact API object/field parity. Partial (+/-) and untested (?) combinations are excluded without declaring them incompatible. Missing Kubernetes versions are not interpolated. Stable chart appVersion values are matched to the documented release families, and the existing updater reduces the results to seven rows covering 1.4.0 through 1.9.1.

Live Helm rendering hit the shared image walker's existing crash on CRD schema properties named image. The image walker now accepts string values and skips non-string image subtrees, with regression coverage for nested schema examples. A related type guard is already proposed in #4138; I reproduced the original crash independently with OpenKruise and can reconcile this hunk once that change lands.

Related discussion: #4139. Please confirm whether the conservative matrix mapping is appropriate for the catalog.

Test Plan

  • Python 3.14: all 12 offline tests pass, including the captured upstream table, malformed sources, chart/app version matching, prerelease filtering, and CRD image fields.
  • Live scraper run with Helm 3.21.4 produced seven release rows, all with image references from rendered charts.
  • The generated table and manifest pass static/compatibilities/schema.json.
  • git diff --check passes.
  • Test and regeneration commands are in utils/compatibility/tests/OPENKRUISE.md.
  • No Kubernetes cluster was deployed; this verifies source parsing and chart rendering, not workload execution.

Checklist

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (not applicable: no agent code changed).

Plural Flow: console

Codex implemented and tested this contribution on my behalf. I'd like to submit it under the README's $300 new-scraper contributor program. Could you confirm eligibility and the cash payout method? I understand the reward depends on maintainer review and acceptance; no payment is being claimed as received.

@soffi-ai

soffi-ai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Soffi AI Summary

This PR adds OpenKruise to the Plural Console compatibility catalog by introducing a new Python scraper, test suite, HTML fixture, generated compatibility table, and manifest entry. The scraper parses the official OpenKruise installation documentation to extract only exact API compatibility pairings (✓), deliberately excluding partial, untested, or interpolated matches. Chart versions from the official Helm index are joined to app versions, with pre-release and dev releases filtered out, producing a conservative seven-row matrix covering OpenKruise 1.4.0 through 1.9.1. A prerequisite one-line bug fix in the shared image-walker utility (utils.py) prevents a crash when CRD schema properties are named image (a string-type schema property rather than an actual image reference), which was independently triggered by OpenKruise's CRD structure. The fix includes a regression test.

Changes

OpenKruise compatibility scraper

  • Adds a new compatibility scraper for OpenKruise that parses the official installation matrix, filters to only exact API matches (✓), joins chart versions from the Helm index, and writes the result to static/compatibilities/openkruise.yaml. Includes an HTML fixture, 12 offline unit tests covering parsing edge cases and failure modes, a manifest entry, and a one-line guard in the shared find_nested_images utility to prevent crashes on CRD schema properties named image. (50d1418)

Updated: 2026-09-08 08:48 UTC

Deploy in Soffi

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds OpenKruise to the compatibility catalog and introduces a scraper that joins exact upstream Kubernetes compatibility pairings with stable Helm chart releases.

  • Adds OpenKruise metadata and seven generated compatibility rows.
  • Parses the official compatibility matrix conservatively, retaining only exact pairings.
  • Adds offline parser, integration, and image-extraction regression tests.
  • Adjusts shared Helm image traversal to tolerate non-string image fields, though nested traversal can admit false image values.

Confidence Score: 4/5

The PR appears safe to merge after the non-blocking image-walker traversal concern is addressed or accepted.

The OpenKruise scraper and catalog wiring are consistent with existing infrastructure, but the shared image-walker change can classify nested schema strings as container images.

Files Needing Attention: utils/compatibility/utils.py, utils/compatibility/tests/test_openkruise.py

Important Files Changed

Filename Overview
utils/compatibility/scrapers/openkruise.py Adds a fail-closed OpenKruise matrix parser and stable chart-to-release-family join.
utils/compatibility/utils.py Prevents non-string image values from being inserted directly but still traverses them, allowing nested schema metadata to be misclassified.
utils/compatibility/tests/test_openkruise.py Provides broad offline scraper coverage, but the image regression omits nested image keys beneath a non-string image field.
static/compatibilities/openkruise.yaml Adds schema-compatible metadata and seven generated OpenKruise release rows.
static/compatibilities/manifest.yaml Registers the matching OpenKruise scraper and compatibility file with the dynamic catalog runner.

Reviews (1): Last reviewed commit: "Add OpenKruise compatibility scraper" | Re-trigger Greptile

Comment thread utils/compatibility/utils.py Outdated
Comment on lines 238 to 241
if k == "image" and isinstance(v, str):
images.add(v)
continue
walk(v)

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.

P2 Nested schema values collected

When an image key contains a mapping or list, the new guard recursively walks that value instead of ignoring it. A structure such as image: {properties: {image: {type: string}}} can therefore add "string" to the generated container image list, polluting compatibility metadata. Stop traversal for all values under an image key, and add a regression case with a nested image field.

Suggested change
if k == "image" and isinstance(v, str):
images.add(v)
continue
walk(v)
if k == "image":
if isinstance(v, str):
images.add(v)
continue
walk(v)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Addressed in 965ea0f. The exact example in the review already returned an empty list, but a non-string image value containing an examples object with its own image string did reproduce the problem. I added mapping and list regression cases, verified they fail before the fix, and now skip traversal beneath every image key. All 12 tests pass. Live regeneration still produces the same seven rows and image lists, with no YAML diff.

@vayungodara

Copy link
Copy Markdown
Author

My Discord handle is v.xyyz (display name Vayun). Linking it here to verify that the GitHub and Discord accounts belong to the same contributor, as requested by the README’s bounty process. I posted the eligibility and payout question in the contributor-program channel: https://discord.com/channels/880830238723047424/1081350805254316113/1546813555343364107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants