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

Pin k8s.io/{apimachinery|api|client-go} to v0.26.1 #119

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

a-hilaly
Copy link
Member

@a-hilaly a-hilaly commented Mar 7, 2023

Addresses aws-controllers-k8s/community#1719

This patch updates k8s.io/{apimachinery|api|client-go} to v0.26.1
and fixes the generated/usage of the mocks used for unit testing.

Note that controller-runtime/pkg/client/StatusWriter is no longer
declared properly, and is a copy of SubResourceWriter now.

Changes to the mocks:

  • Brings and uses SubResourceWriter instead of StatusWriter
  • Removes TestMetaV1ObjectEqual_ClusterName (deprecated field) and
    test TestMetaV1ObjectEqual_RemainingItemCount instead
  • Get rid of unused mock files (rm -rf ./mocks && make mocks)

Changes to the go modules:

  • Pin k8s.io/{apimachinery|api|client-go} to v0.26.1
  • go mod tidy

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Addresses aws-controllers-k8s/community#1719

This patch updates `k8s.io/{apimachinery|api|client-go}` to `v0.26.1`
and fixes the generated/usage of the mocks used for unit testing.

Note that `controller-runtime/pkg/client/StatusWriter` is no longer
declared probably, and is a copy of `SubResourceWriter` now.
https://github.com/kubernetes-sigs/controller-runtime/blob/main/pkg/client/interfaces.go#L132-L133

Changes to the mocks:
- Brings and uses `SubResourceWriter` instead of `StatusWriter`
- Removes `TestMetaV1ObjectEqual_ClusterName` (deprecated field) and
  test `TestMetaV1ObjectEqual_RemainingItemCount` instead
- Get rid of unused mock files (`rm -rf ./mocks && make mocks`)
@ack-prow ack-prow bot requested review from jljaco and vijtrip2 March 7, 2023 12:40
@ack-prow ack-prow bot added the approved label Mar 7, 2023
@a-hilaly
Copy link
Member Author

a-hilaly commented Mar 7, 2023

Tested with ecr-controller and s3-controller

a-hilaly added a commit to a-hilaly/ack-code-generator that referenced this pull request Mar 7, 2023
…time to `v0.14.5`

Similarily to aws-controllers-k8s/runtime#119..
upgrading the k8s libraries versions.
Copy link
Collaborator

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

Good work identifying the source of the dependabot spam... thank you @a-hilaly!

github.com/google/go-cmp v0.5.5
github.com/cenkalti/backoff/v4 v4.1.3
github.com/go-logr/logr v1.2.3
github.com/google/go-cmp v0.5.9
Copy link
Collaborator

Choose a reason for hiding this comment

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

we really should not be using this lib... future PR to remove it would be good.

Copy link
Member Author

Choose a reason for hiding this comment

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

google/go-cmp is used by apimachinery :/

@RedbackThomson
Copy link
Contributor

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2023
@ack-prow
Copy link

ack-prow bot commented Mar 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: A-Hilaly, jaypipes, jljaco, RedbackThomson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [A-Hilaly,RedbackThomson,jljaco]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow ack-prow bot merged commit 02fe7bf into aws-controllers-k8s:main Mar 7, 2023
a-hilaly added a commit to aws-controllers-k8s/code-generator that referenced this pull request Mar 7, 2023
…time to `v0.14.5` (#425)

Similarily to aws-controllers-k8s/runtime#119..
upgrading the k8s libraries versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants