Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lookup of backup objects in the cluster #1033

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

nhudson
Copy link
Collaborator

@nhudson nhudson commented Nov 4, 2024

With #1031 changes there is an error when looking up Backups with using a ListParam. This changes how we filter for volumeSnapshot method backups.

2024-11-04T18:05:45.955686Z ERROR reconciling object:reconcile:reconcile:cleanup_old_volume_snapshots: controller::cloudnativepg::retention::snapshots:63: Failed to list backups in namespace barely-permissive-deer: ApiError: field label not supported: spec.method: BadRequest (ErrorResponse { status: "Failure", message: "field label not supported: spec.method", reason: "BadRequest", code: 400 }) object.ref=CoreDB.v1alpha1.coredb.io/barely-permissive-deer.barely-permissive-deer object.reason=object updated trace_id=00000000000000000000000000000000 instance=barely-permissive-deer namespace=barely-permissive-deer retention_days=40

@nhudson nhudson marked this pull request as ready for review November 4, 2024 18:35
@nhudson nhudson self-assigned this Nov 4, 2024
@jasonmp85
Copy link
Contributor

What's the bug preventing the API filter from working?

Code change looks good to me for in-memory workaround, I'm just curious why it broke…

@nhudson
Copy link
Collaborator Author

nhudson commented Nov 4, 2024

What's the bug preventing the API filter from working?

Code change looks good to me for in-memory workaround, I'm just curious why it broke…

Great question. The spec.method field is not a field that ListParams supports to look up objects with. I knew this, but did it anyway and never thought about it until I saw the error.

The ListParams method only supports looking up valid labels or a selector from the metadata, not actual fields inside the API object.

@nhudson nhudson merged commit cedab7d into main Nov 4, 2024
8 of 9 checks passed
@nhudson nhudson deleted the nhudson/fix_field_selector/pro-2209 branch November 4, 2024 19:02
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.

3 participants