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

Bump k8s.io/client-go from 0.26.3 to 0.27.3 #214

Closed

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 18, 2023

Bumps k8s.io/client-go from 0.26.3 to 0.27.3.

Commits
  • 4d71421 Update dependencies to v0.27.3 tag
  • 22da8a5 Merge pull request #118553 from puerco/bump-1.27-go1.20.5
  • 81d8c78 update-vendor: update vendored go.sums
  • 015caa2 Merge pull request #117708Jefftree/automated-cherry-pick-of-#117705
  • fb5347d Update kube-openapi to fix race
  • 353c489 Merge pull request #117685ardaguclu/automated-cherry-pick-of-#117495
  • 6ce3e7e Use absolute path instead requestURI in openapiv3 discovery
  • aab9b0a Merge pull request #117637seans3/automated-cherry-pick-of-#117571
  • a16d525 Refactors discovery content-type and helper functions
  • 559da62 Merge remote-tracking branch 'origin/master' into release-1.27
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.26.3 to 0.27.3.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](kubernetes/client-go@v0.26.3...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/go_modules/k8s.io/client-go-0.27.3 branch from 343b0f2 to f545acc Compare June 20, 2023 17:29
@troy0820
Copy link
Member

troy0820 commented Jul 3, 2023

This fails because of this issue:
kubernetes/client-go#1269

Workaround is to go to [email protected]

Test will fail but this will build it.

Working on getting tests updated to reflect changes

@troy0820
Copy link
Member

troy0820 commented Jul 4, 2023

Test are failing when updating deps:

go test -v ./controllers/... -run TestInstallationReconciler_Reconcile
=== RUN   TestInstallationReconciler_Reconcile
    installation_controller_test.go:48:
        	Error Trace:	/Users/user/workspace/porter-operator/controllers/installation_controller_test.go:48
        	            				/Users/user/workspace/porter-operator/controllers/installation_controller_test.go:57
        	Error:      	Received unexpected error:
        	            	installations.getporter.org "mybuns" not found
        	            	failed to patch Installation
        	            	get.porter.sh/operator/controllers.PatchObjectWithRetry
        	            		/Users/user/workspace/porter-operator/controllers/porter_resource.go:50
        	            	get.porter.sh/operator/controllers.PatchStatusWithRetry
        	            		/Users/user/workspace/porter-operator/controllers/porter_resource.go:68
        	            	get.porter.sh/operator/controllers.(*InstallationReconciler).saveStatus
        	            		/Users/user/workspace/porter-operator/controllers/installation_controller.go:258
        	            	get.porter.sh/operator/controllers.(*InstallationReconciler).syncStatus
        	            		/Users/user/workspace/porter-operator/controllers/installation_controller.go:249
        	            	get.porter.sh/operator/controllers.(*InstallationReconciler).Reconcile
        	            		/Users/user/workspace/porter-operator/controllers/installation_controller.go:79
        	            	get.porter.sh/operator/controllers.TestInstallationReconciler_Reconcile.func1
        	            		/Users/user/workspace/porter-operator/controllers/installation_controller_test.go:47
        	            	get.porter.sh/operator/controllers.TestInstallationReconciler_Reconcile
        	            		/Users/user/workspace/porter-operator/controllers/installation_controller_test.go:57
        	            	testing.tRunner
        	            		/usr/local/opt/go/libexec/src/testing/testing.go:1576
        	            	runtime.goexit
        	            		/usr/local/opt/go/libexec/src/runtime/asm_amd64.s:1598
        	Test:       	TestInstallationReconciler_Reconcile
--- FAIL: TestInstallationReconciler_Reconcile (0.01s)
FAIL
FAIL	get.porter.sh/operator/controllers	0.035s
FAIL

Logically the tests are correct but the limitation of controller-runtime has the following tidbits:

This client does not have a way to inject specific errors to test handled vs. unhandled errors.
There is some support for sub resources which can cause issues with tests if you're trying to update e.g. metadata and status in the same reconcile.
No OpenAPI validation is performed when creating or updating objects.
ObjectMeta's `Generation` and `ResourceVersion` don't behave properly, Patch or Update operations that rely on these fields will fail, or give false positives.

controller-runtime docs
Release notes for 0.15.0

This doesn't ruin the existing functionality but the tests need to be updated to assert what functionality exists.
This can be achieved by

  1. Breaking the tests down to smaller test
  2. Not rely on the above criteria that is limited with the controller-runtime/client/fake

I don't want to change any controller code until the tests are in place.

Also, I can't push to this branch so we will have to close this and merge the branch I push in a PR.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 5, 2023

Looks like k8s.io/client-go is up-to-date now, so this is no longer needed.

@dependabot dependabot bot closed this Jul 5, 2023
@dependabot dependabot bot deleted the dependabot/go_modules/k8s.io/client-go-0.27.3 branch July 5, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant