Skip to content

Fix Calico compatibility scraping by release family - #4227

Open
lazzyms wants to merge 1 commit into
pluralsh:masterfrom
lazzyms:bounty-calico-4213
Open

Fix Calico compatibility scraping by release family#4227
lazzyms wants to merge 1 commit into
pluralsh:masterfrom
lazzyms:bounty-calico-4213

Conversation

@lazzyms

@lazzyms lazzyms commented Sep 9, 2026

Copy link
Copy Markdown

Summary

Refs #4213.

Calico's scraper previously applied the Calico 3.28 Kubernetes range to every release. This change:

  • fetches the matching versioned Tigera requirements page for each Calico release family;
  • extracts only the Kubernetes versions that the source explicitly says are tested;
  • fails closed when the source is unavailable or its supported-versions section changes; and
  • refreshes the stored Calico compatibility rows while preserving the existing release metadata.

The 3.32.2 row now records the documented Kubernetes versions 1.34, 1.35, and 1.36.

Source

Validation

  • python3 -m unittest discover -s utils/compatibility/tests -p 'test_*.py' (105 passed)
  • Calico compatibility YAML schema validation
  • black --check utils/compatibility/scrapers/calico.py utils/compatibility/tests/test_calico.py
  • ruff check utils/compatibility/scrapers/calico.py utils/compatibility/tests/test_calico.py
  • git diff --check

The proposed bounty amount, eligibility, and payout route remain subject to maintainer confirmation, review, and merge under the contributor program terms.

@lazzyms

lazzyms commented Sep 9, 2026

Copy link
Copy Markdown
Author

The repository workflows currently show action_required for the forked PR (CI, CI / Console, Helm, and Validate Compatibility Schemas). The local compatibility suite and schema validation are green; please approve the fork workflows when convenient so the repository checks can run.

@soffi-ai

soffi-ai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Soffi AI Summary

This PR fixes a bug in the Calico compatibility scraper where Kubernetes version ranges were hardcoded to Calico 3.28's documented range (v1.27–v1.30) and applied uniformly to every Calico release, regardless of what each release actually supports.

The fix makes the scraper fetch the versioned Tigera requirements page for each distinct Calico release family (e.g., 3.32, 3.31) rather than always using the latest URL. It parses the explicit "We test Calico vX.Y against the following Kubernetes versions" sentence from the documentation, extracts only the versions listed there, and fails safely (without writing partial data) if the page is unavailable or its structure has changed. Deduplication ensures each family's requirements page is only fetched once even when multiple patch releases share the same family.

The update also corrects the stored calico.yaml compatibility data — for example, Calico 3.32.x now records the documented Kubernetes versions 1.34, 1.35, and 1.36 instead of the stale 1.27–1.30 range.

A full offline test suite (test_calico.py) is added covering: correct version parsing and sort order, rejection of malformed or structurally changed source pages, deduplication of HTTP fetches across patch releases, and the fail-closed guarantee that no partial data is written on fetch failure.

Changes

Per-release Calico Kubernetes compatibility scraping

  • Rewrote the Calico compatibility scraper to fetch each release family's versioned Tigera requirements page instead of hardcoding the Calico 3.28 Kubernetes range. Added parse_kube_versions to extract the explicitly tested Kubernetes versions from the documentation, with fail-closed behaviour when the page is unavailable or its structure changes. Added a full offline test suite covering parsing correctness, malformed-source rejection, per-family HTTP deduplication, and the no-partial-write guarantee. Updated calico.yaml with corrected compatibility data. (b764fe2)

Updated: 2026-09-09 00:08 UTC

Deploy in Soffi

@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge with no concrete correctness, security, or repository-rule violations identified.

Summary

  • Fetches and caches each family’s versioned Tigera requirements page.
  • Extracts, deduplicates, and sorts explicitly tested Kubernetes versions.
  • Avoids writing partial compatibility data when fetching or parsing fails.
  • Refreshes stored compatibility ranges and adds offline parser and failure-path tests.

@lazzyms

lazzyms commented Sep 9, 2026

Copy link
Copy Markdown
Author

@michaeljguarino The Calico scraper patch is ready for review. GitHub has the required fork workflows in action_required (CI, Console, Helm, and schema validation); the focused local suite and schema/lint/format checks are green. Could you approve the workflows when convenient and confirm whether the README's $50 per-version award and private PayPal payout apply to this contribution after merge? I'm holding the branch unchanged while it is reviewed.

@lazzyms

lazzyms commented Sep 9, 2026

Copy link
Copy Markdown
Author

Fresh verification of head b764fe2: 105 compatibility tests passed; calico.yaml validates against static/compatibilities/schema.json; Black, Ruff, and git diff --check all pass. The four required fork runs remain action_required because GitHub requires repository admin approval.

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.

1 participant