Skip to content

add compatibility tests and docs#82

Merged
sourcehawk merged 6 commits intomainfrom
docs/compatibility
Mar 27, 2026
Merged

add compatibility tests and docs#82
sourcehawk merged 6 commits intomainfrom
docs/compatibility

Conversation

@sourcehawk
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 18:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a documented compatibility/support matrix and a GitHub Actions workflow to continuously validate this framework against multiple controller-runtime / Kubernetes dependency combinations, and links that information from the README.

Changes:

  • Add docs/compatibility.md describing supported versions, version policy, and how compatibility is tested.
  • Add a scheduled/on-demand .github/workflows/compatibility.yml matrix job to swap dependencies and run build/tests.
  • Update README.md to reference the compatibility matrix and to mention testify as part of the testing stack.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
docs/compatibility.md Introduces the compatibility policy, matrix, and user guidance for pinning versions.
README.md Links to the new compatibility doc and updates stated requirements/testing tools.
.github/workflows/compatibility.yml Adds a CI workflow to exercise multiple dependency combinations.

Copilot AI review requested due to automatic review settings March 27, 2026 18:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment on lines +28 to +36
The [compatibility workflow](../.github/workflows/compatibility.yml) runs weekly and on demand. For each version
combination in the matrix, it:

1. Swaps the `controller-runtime` and `k8s.io/*` dependencies to the target versions using `go get`.
2. Runs `go mod tidy` to resolve transitive dependencies.
3. Verifies that the entire module compiles (`go build ./...`).
4. Builds all examples (`make build-examples`).
5. Runs the full unit and envtest test suite (`make test`).

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This section says the compatibility workflow runs "weekly and on demand" and that for each matrix entry it swaps dependencies and runs go mod tidy. The workflow is also triggered on PR label events, and it skips the swap/tidy step for the current (go.mod) matrix entry, so the description is currently incomplete/inaccurate. Update the text/bullets to reflect the PR label trigger and the special-case for the current entry.

Suggested change
The [compatibility workflow](../.github/workflows/compatibility.yml) runs weekly and on demand. For each version
combination in the matrix, it:
1. Swaps the `controller-runtime` and `k8s.io/*` dependencies to the target versions using `go get`.
2. Runs `go mod tidy` to resolve transitive dependencies.
3. Verifies that the entire module compiles (`go build ./...`).
4. Builds all examples (`make build-examples`).
5. Runs the full unit and envtest test suite (`make test`).
The [compatibility workflow](../.github/workflows/compatibility.yml) runs weekly, on demand, and on pull request label
events. For each version combination in the matrix, it:
1. For matrix entries that differ from the versions in `go.mod`, swaps the `controller-runtime` and `k8s.io/*`
dependencies to the target versions using `go get`.
2. For those non-`go.mod` entries, runs `go mod tidy` to resolve transitive dependencies.
3. Verifies that the entire module compiles (`go build ./...`).
4. Builds all examples (`make build-examples`).
5. Runs the full unit and envtest test suite (`make test`).
The entry that matches the versions in `go.mod` reuses the existing dependency graph and skips the swap and tidy steps.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings March 27, 2026 18:49
@sourcehawk sourcehawk merged commit 08508e3 into main Mar 27, 2026
5 checks passed
@sourcehawk sourcehawk deleted the docs/compatibility branch March 27, 2026 18:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

if: >-
github.event_name != 'pull_request' ||
github.event.label.name == 'compatibility'
name: "CR v${{ matrix.controller-runtime }} / k8s v${{ matrix.k8s }}"
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

Matrix keys containing hyphens (e.g., controller-runtime) can't be accessed via dot-notation in GitHub Actions expressions. matrix.controller-runtime will be parsed incorrectly and the workflow will fail. Rename the matrix key(s) (e.g., controller_runtime) or use bracket notation like matrix['controller-runtime'].

Suggested change
name: "CR v${{ matrix.controller-runtime }} / k8s v${{ matrix.k8s }}"
name: "CR v${{ matrix['controller-runtime'] }} / k8s v${{ matrix.k8s }}"

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +48
sigs.k8s.io/controller-runtime@${{ matrix.cr-version }} \
k8s.io/api@${{ matrix.k8s-version }} \
k8s.io/apimachinery@${{ matrix.k8s-version }} \
k8s.io/client-go@${{ matrix.k8s-version }} \
k8s.io/apiextensions-apiserver@${{ matrix.k8s-version }}
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

These expressions reference hyphenated matrix keys (cr-version, k8s-version) using dot-notation (e.g., matrix.cr-version), which will not evaluate correctly in GitHub Actions. Rename the keys (e.g., cr_version, k8s_version) or switch to bracket notation (matrix['cr-version'], matrix['k8s-version']) for all usages in this step.

Suggested change
sigs.k8s.io/controller-runtime@${{ matrix.cr-version }} \
k8s.io/api@${{ matrix.k8s-version }} \
k8s.io/apimachinery@${{ matrix.k8s-version }} \
k8s.io/client-go@${{ matrix.k8s-version }} \
k8s.io/apiextensions-apiserver@${{ matrix.k8s-version }}
sigs.k8s.io/controller-runtime@${{ matrix['cr-version'] }} \
k8s.io/api@${{ matrix['k8s-version'] }} \
k8s.io/apimachinery@${{ matrix['k8s-version'] }} \
k8s.io/client-go@${{ matrix['k8s-version'] }} \
k8s.io/apiextensions-apiserver@${{ matrix['k8s-version'] }}

Copilot uses AI. Check for mistakes.
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