Skip to content

Add Kubeflow Spark Operator compatibility scraper - #4131

Closed
zbzbdzb wants to merge 2 commits into
pluralsh:masterfrom
zbzbdzb:feat/spark-operator-compatibility
Closed

Add Kubeflow Spark Operator compatibility scraper#4131
zbzbdzb wants to merge 2 commits into
pluralsh:masterfrom
zbzbdzb:feat/spark-operator-compatibility

Conversation

@zbzbdzb

@zbzbdzb zbzbdzb commented Sep 8, 2026

Copy link
Copy Markdown

Adds Kubeflow Spark Operator to the compatibility manifest with a scraper, application metadata, generated YAML, and focused regression tests. Resolves #4130.

The scraper reads the operator/Kubernetes columns from the upstream Version Matrix, matches concrete operator appVersion entries from the official Helm index, and uses the shared updater to reduce versions and render chart images.

The documented 1.16+ minimum is expanded through the repository's KUBE_VERSION (1.36). These are upstream-declared compatibility ranges; this does not claim independent cluster testing on each Kubernetes version. The checked-in output covers the documented 2.0–2.3 families. The upstream matrix does not yet document 2.4/2.5, so they are deliberately skipped. Legacy compound v1beta2-... tags are excluded because they do not fit the shared semantic-version sorting/release URL. Base Spark versions are never treated as operator versions.

Validation:

  • python -m unittest discover -s utils/compatibility/tests -v: 6 tests passed with Python 3.13 and packaging 24.1, including malformed/missing matrix, invalid bounds, operator-vs-Spark/chart separation, prerelease and undocumented-family exclusion, source-to-updater entry-point wiring, and no update on unusable source.
  • Added the focused suite to the existing compatibility schema workflow with compatibility-code path triggers. Tests require no network, Helm or API keys. Workflow YAML and trigger/job wiring verified locally; hosted execution remains subject to repository CI policy.
  • Executed the real scrape() entry point against upstream README and Helm index, using Helm 3.18.6: generated four version rows and resolved all four container image references successfully.
  • git diff --cached --check: passed before commit.

No full Console application tests or live Kubernetes deployment tests were run; changes are confined to compatibility data and its scraper. See utils/compatibility/tests/README.md for reproduction and scope.

Submitted for consideration under the README's $300 new-scraper contributor reward. Payout eligibility and PayPal support are not yet confirmed; see #4130.

@soffi-ai

soffi-ai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Soffi AI Summary

This PR adds Kubeflow Spark Operator to Console's compatibility tracking system. The motivation is to extend the platform's add-on compatibility matrix so that users can see which Spark Operator versions are compatible with which Kubernetes versions, driven by the upstream Version Matrix published in the Spark Operator README.

The scraper parses the upstream Version Matrix table, matches documented operator families (2.0–2.3) against real Helm chart appVersion entries, and expands the undocumented 1.16+ lower bound up through the repository's current Kubernetes ceiling (1.36). Legacy compound v1beta2-... tags and undocumented families (e.g., 2.4/2.5) are deliberately excluded since they don't fit the shared semver sorting/release URL pattern. The generated YAML covers four version rows (2.0.0, 2.1.0, 2.2.0, 2.3.0) with resolved container image references and Kubernetes compatibility ranges.

Regression tests validate correct filtering of Spark-version tags vs. operator tags, legacy/prerelease exclusion, malformed/missing matrix detection, and out-of-bounds Kubernetes version handling.

Changes

Kubeflow Spark Operator compatibility scraper

  • Adds a Python scraper that reads the Version Matrix from the upstream Spark Operator README, matches modern semver operator releases (2.0–2.3) against the official Helm index, and generates static/compatibilities/spark-operator.yaml with per-version Kubernetes compatibility ranges and resolved container image references. Legacy v1beta2-... compound tags, undocumented families, and non-operator (Base Spark) versions are explicitly excluded. Four unit tests cover malformed matrix detection, prerelease/legacy filtering, operator-vs-Spark separation, and bound validation. The manifest registry entry and a test README are also included. (7e03141)

Updated: 2026-09-08 06:07 UTC

Deploy in Soffi

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds Kubeflow Spark Operator compatibility generation and registers its generated compatibility data.

  • Parses documented operator families and Kubernetes minimums from the upstream version matrix.
  • Maps concrete Helm appVersion values to chart versions and resolves chart images through the shared updater.
  • Adds generated compatibility rows for operator versions 2.0.0 through 2.3.0.
  • Adds focused parser and row-generation tests plus manual verification instructions.

Confidence Score: 4/5

The compatibility implementation appears safe to merge, with non-blocking gaps in automated execution and entry-point coverage for the new tests.

No functional or security failure was established; the actionable concerns are limited to the tests not running in CI and not covering the scraper’s shared-utility integration.

Files Needing Attention: utils/compatibility/scrapers/spark-operator.py, utils/compatibility/tests/README.md

Important Files Changed

Filename Overview
utils/compatibility/scrapers/spark-operator.py Adds the matrix parser, version-row builder, and scraper integration; parsing behavior is well tested, but the entry-point integration is not.
utils/compatibility/tests/test_spark_operator.py Covers malformed matrices, version-family filtering, bounds, and operator/chart separation, but does not exercise scrape().
utils/compatibility/tests/README.md Documents focused and live verification, although the focused suite is not wired into CI.
static/compatibilities/spark-operator.yaml Adds schema-compatible generated metadata and compatibility rows for four documented operator families.
static/compatibilities/manifest.yaml Registers the Spark Operator compatibility file using the expected addon naming convention.

Reviews (1): Last reviewed commit: "Add Kubeflow Spark Operator compatibilit..." | Re-trigger Greptile

Comment on lines +3 to +7
Run from the repository root:

```sh
python -m unittest discover -s utils/compatibility/tests -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 Tests Are Not Automated

The new regression suite is only documented as a manual command. No CI workflow runs this unittest discovery path, so parser regressions can pass automated checks unnoticed. Please add the suite to an existing required workflow or create a focused compatibility-scraper check.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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 ff09b05: the existing compatibility schema workflow now runs the focused unittest suite and includes utils/compatibility/** in its PR and master-push path filters. The test job needs only packaging 24.1; no credentials, network calls or Helm are required by the tests.

Comment on lines +79 to +88
def scrape():
from utils import fetch_page, get_chart_versions, current_kube_version, update_compatibility_info

page = fetch_page(README_URL)
if not page:
raise ValueError("Could not fetch Spark Operator version matrix")
rows = build_rows(
page.decode("utf-8"), get_chart_versions("spark-operator"), current_kube_version()
)
update_compatibility_info("../../static/compatibilities/spark-operator.yaml", rows)

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 Scraper Entry Point Untested

The tests cover only parse_matrix and build_rows, leaving the new scrape() entry point untested. A regression in byte decoding, chart lookup, Kubernetes-version retrieval, output-path selection, or updater invocation could therefore pass the focused suite. Please add a mocked entry-point test that verifies these integrations and the rows passed to update_compatibility_info.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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 ff09b05: added a mocked scrape() test verifying the source URL, byte decoding, chart and Kubernetes lookup, output path and exact updater rows. A second test verifies that missing, empty, malformed and invalid UTF-8 source data never invokes the updater. All six tests pass locally on Python 3.13 with packaging 24.1.

@zbzbdzb

zbzbdzb commented Sep 8, 2026

Copy link
Copy Markdown
Author

The review fixes are pushed in ff09b05, with all six focused tests passing locally. The Validate Compatibility Schemas run for this commit currently reports action_required and has zero jobs: https://github.com/pluralsh/console/actions/runs/34193507546 . Could a maintainer check whether this contributor workflow needs approval to run? I have not treated that state as a CI pass.

@zbzbdzb

zbzbdzb commented Sep 8, 2026

Copy link
Copy Markdown
Author

Hi @michaeljguarino, I saw that this PR and #4145 were closed. Are Spark Operator and Antrea compatibility still wanted, or is there something in these implementations that needs changing? A quick pointer would help me understand whether to revise them. Thanks.

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.

Add Kubeflow Spark Operator compatibility scraper

2 participants