Skip to content

fix: Resolve k8s-openapi version conflict in CI - #124

Merged
pando85 merged 3 commits into
masterfrom
fix/k8s-openapi-version-conflict
Nov 13, 2026
Merged

pando85 merged 3 commits into
masterfrom
fix/k8s-openapi-version-conflict

Conversation

@forkline

@forkline forkline Bot commented Nov 13, 2026

Copy link
Copy Markdown

Summary

Fixed CI failure where build script panicked with "None of the v1_* features are enabled".

Root Cause

The dependency tree had two versions of :

  • (specified in Cargo.toml with feature)
  • (pulled in by )

Cargo's feature unification doesn't work across versions, so ended up without any Kubernetes version feature enabled, causing the build script to fail.

Changes

  • Updated from to
  • Updated from to
  • Updated from to
  • Changed feature from to to match what the dependencies expect

All dependencies now use a single version of with consistent feature flags.

Testing

  • ✅ completes successfully
  • ✅ Only one version of in the dependency tree

*This PR was generated by Forkline — AI-powered code contributions.
The agent analyzed the issue and implemented this fix autonomously.

…nflict

- Update k8s-openapi from 0.28.0 to 0.29.0
- Update kube from 4.0.0 to 5.0.0
- Update kube-leader-election from 0.44.0 to 0.45.0
- Change k8s-openapi feature from v1_35 to v1_33 to match dependencies

This resolves the CI failure where k8s-openapi v0.28.0 had no v1_* features
enabled due to version conflicts with kube-leader-election pulling in v0.29.0.
forkline[bot] added 2 commits November 13, 2026 07:37
Add #[must_use] to is_rate_limited, is_transient_hcloud, and
target_already_defined methods to satisfy clippy::must_use_candidate
lint from clippy::pedantic group.
The patch.crates-io entry pointed to hcloud v0.26.0-fix-deprecated
branch, but the project now uses hcloud 0.27.0. The patch was unused
and generated a cargo warning.
@forkline

forkline Bot commented Nov 13, 2026

Copy link
Copy Markdown
Author

Maintainability Review

Initial expected implementation: matched
Initial reason: PR correctly resolves k8s-openapi version conflict by updating kube ecosystem dependencies to compatible versions
Applied maintenance work: Fixed pre-existing clippy warnings and removed stale patch configuration
Final implementation: matches
Validation: ✅ cargo check, ✅ cargo test (117 tests), ✅ cargo clippy, ✅ cargo fmt, ✅ CI (pre-commit, docker-smoke, helm-unittest)

Findings

Priority: high
Category: bug
Decision: applied
Location: src/error.rs (is_rate_limited, is_transient_hcloud, target_already_defined methods)
Problem: Missing #[must_use] attributes on three methods returning bool caused clippy failures with -D warnings, blocking PR merge
Action: Added #[must_use] attributes to satisfy clippy::must_use_candidate lint from clippy::pedantic group
Why it is worth it: Unblocks PR merge; trivial fix with zero risk
Risk / scope: minimal, no behavioral change


Priority: low
Category: wiring
Decision: applied
Location: Cargo.toml [patch.crates-io section]
Problem: Stale patch for hcloud v0.26.0-fix-deprecated was no longer used after hcloud upgrade to 0.27.0, generating cargo warning
Action: Removed unused patch configuration
Why it is worth it: Eliminates cargo warning and removes dead configuration
Risk / scope: minimal, patch was already unused


Implementation Notes

The change from v1_35 to v1_33 is correct and necessary. Verified that kube-leader-election 0.45.0 explicitly enables v1_33 feature on k8s-openapi, and k8s-openapi only allows one version feature at a time. Attempting to use v1_35 causes build failure with "Both v1_33 and v1_35 features are enabled".

All CI checks now pass.

@forkline

forkline Bot commented Nov 13, 2026

Copy link
Copy Markdown
Author

✅ Fix pushed:

Summary

Fixed the CI failure caused by clippy's must_use_candidate lint errors. The build was failing because three methods in src/error.rs return bool but were missing #[must_use] attributes, and the project uses -D warnings which treats clippy warnings as errors.

Changes Made

Added #[must_use] attributes to three methods in src/error.rs:

  1. is_rate_limited() (line 175)
  2. is_transient_hcloud() (line 223)
  3. target_already_defined() (line 243)

PR Created

PR #125: #125

The fix is minimal and targeted - only adding the required attributes without modifying any logic. The master branch is protected and requires changes through a PR, so the fix was pushed to fix/ci-must-use-clippy and a PR was created targeting master.

@pando85
pando85 merged commit b5ba5b9 into master Nov 13, 2026
3 checks passed
@pando85
pando85 deleted the fix/k8s-openapi-version-conflict branch November 13, 2026 07:46
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