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 Controller Runtime version to 0.6 #6568

Merged

Conversation

aruniiird
Copy link
Contributor

Signed-off-by: Arun Kumar Mohan amohan@redhat.com

Description of your changes:

Which issue is resolved by this Pull Request:
Resolves #

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

@aruniiird
Copy link
Contributor Author

@umangachapagain , I have updated the dependencies' versions to v0.19.3 . Please take a look...

@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch from 3456b4d to d4a6021 Compare November 6, 2020 13:55
@travisn
Copy link
Member

travisn commented Nov 6, 2020

@aruniiird Some more code updates are needed, see the errors in the CI.

@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch from d4a6021 to c703e48 Compare November 10, 2020 21:21
@aruniiird
Copy link
Contributor Author

Addressed all other issues, but now I have hit the following lib-bucket-provisioner error

/home/arun/go/pkg/mod/github.com/kube-object-storage/lib-bucket-provisioner@v0.0.0-20200610144127-e2eec875d6d1/pkg/client/clientset/versioned/typed/objectbucket.io/v1alpha1/objectbucket.go:71:5: not enough arguments in call to c.client.Get().Resource("objectbuckets").Name(name).VersionedParams(&options, scheme.ParameterCodec).Do
	have ()
	want (context.Context)
/home/arun/go/pkg/mod/github.com/kube-object-storage/lib-bucket-provisioner@v0.0.0-20200610144127-e2eec875d6d1/pkg/client/clientset/versioned/typed/objectbucket.io/v1alpha1/objectbucket.go:87:5: not enough arguments in call to c.client.Get().Resource("objectbuckets").VersionedParams(&opts, scheme.ParameterCodec).Timeout(timeout).Do
	have ()
	want (context.Context)

@leseb
Copy link
Member

leseb commented Nov 12, 2020

Addressed all other issues, but now I have hit the following lib-bucket-provisioner error

/home/arun/go/pkg/mod/github.com/kube-object-storage/lib-bucket-provisioner@v0.0.0-20200610144127-e2eec875d6d1/pkg/client/clientset/versioned/typed/objectbucket.io/v1alpha1/objectbucket.go:71:5: not enough arguments in call to c.client.Get().Resource("objectbuckets").Name(name).VersionedParams(&options, scheme.ParameterCodec).Do
	have ()
	want (context.Context)
/home/arun/go/pkg/mod/github.com/kube-object-storage/lib-bucket-provisioner@v0.0.0-20200610144127-e2eec875d6d1/pkg/client/clientset/versioned/typed/objectbucket.io/v1alpha1/objectbucket.go:87:5: not enough arguments in call to c.client.Get().Resource("objectbuckets").VersionedParams(&opts, scheme.ParameterCodec).Timeout(timeout).Do
	have ()
	want (context.Context)

You might need to make a PR against https://github.com/kube-object-storage/lib-bucket-provisioner

@BlaineEXE
Copy link
Member

Given the timing of the v1.5.0 release

  1. should this block release of v1.5,
  2. should this be included as an update to v1.5,
  3. or should this go into v1.6?

@travisn and @leseb
My gut check is option 3 but wanted to check in.

@leseb
Copy link
Member

leseb commented Nov 13, 2020

Given the timing of the v1.5.0 release

  1. should this block release of v1.5,
  2. should this be included as an update to v1.5,
  3. or should this go into v1.6?

@travisn and @leseb
My gut check is option 3 but wanted to check in.

Let's discuss today, in the meantime, I have raised kube-object-storage/lib-bucket-provisioner#197
Once merged we should be able to get this one in.

@leseb
Copy link
Member

leseb commented Nov 13, 2020

@aruniiird my PR on lib-bucket-provisioner has been merged you can rebase your work on top of it.

@leseb leseb force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch from c703e48 to 0ee8420 Compare November 16, 2020 16:03
@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch 6 times, most recently from 8fefcf6 to 4964105 Compare November 16, 2020 22:39
@aruniiird
Copy link
Contributor Author

All the go vet errors are taken care of. Handling sig-storage-lib-external-provisioner updated api errors...

@aruniiird
Copy link
Contributor Author

All the lint / vet errors are handled...
@leseb , @travisn @BlaineEXE , please take a look

@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch 2 times, most recently from e7f155d to 732d29d Compare November 17, 2020 11:43
@@ -46,23 +48,27 @@ func New(context *clusterd.Context) (Attachment, error) {

// Get queries the Volume CRD from Kubernetes
func (c *crd) Get(namespace, name string) (*rookalpha.Volume, error) {
return c.context.RookClientset.RookV1alpha2().Volumes(namespace).Get(name, metav1.GetOptions{})
ctx := context.TODO()
Copy link
Member

Choose a reason for hiding this comment

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

you don't need ctx just pass context.TODO() directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup done...
Initial idea was to make changes to the attachment.Attachment interface itself (to match it the same with the latest api changes), but later refrained from it.

Copy link
Member

Choose a reason for hiding this comment

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

What's done I still see ctx := context.TODO()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected... I missed other lines...

Copy link
Member

Choose a reason for hiding this comment

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

I still don't see anything

@@ -120,13 +121,17 @@ func (o *Operator) Run() error {
}
}

// creating a context
stopContext, stopFunc := context.WithCancel(context.Background())
Copy link
Member

Choose a reason for hiding this comment

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

please rename stopFunc to contextCancel it's clearer and stopContext just ctx, it's more common.

Copy link
Member

Choose a reason for hiding this comment

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

also, how about using defer instead of calling stopFunc() everywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point... Yup made the change...

@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch 2 times, most recently from e738761 to d6370a6 Compare November 17, 2020 15:36
@mergify
Copy link

mergify bot commented Nov 17, 2020

This pull request has merge conflicts that must be resolved before it can be merged. @aruniiird please rebase it. https://rook.io/docs/rook/master/development-flow.html#updating-your-fork

@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch from d6370a6 to 20f500d Compare November 18, 2020 14:36
Updating the dependencies' versions to match with the newer Operator SDK
version v1.x

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch from 20f500d to e3b9241 Compare November 18, 2020 15:36
Fetched latest lib-bucket-provisioner changes as well.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch 2 times, most recently from ddb1419 to 25cf3f4 Compare November 18, 2020 16:38
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
@aruniiird aruniiird force-pushed the upgrade-dependencies-for-operator-sdk-1.x branch from 25cf3f4 to f5fc08b Compare November 18, 2020 16:41
We must add the finalizer right after the object creation otherwise the
seerver will later return an error on update that the object has been
modified. Indeed, it has been by the task that updates the status when
the object is first created.

Signed-off-by: Sébastien Han <seb@redhat.com>
We don't need to lint go.sum since it's auto generated.

Signed-off-by: Sébastien Han <seb@redhat.com>
@BlaineEXE
Copy link
Member

How close is this to being merged? I'm building multiple fixes for #6650 on top of this for now.

Copy link
Member

@umangachapagain umangachapagain left a comment

Choose a reason for hiding this comment

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

Would it make sense to merge first 4 commits into 1? It's all part of single deps upgrade.

Also, let's not mention SDK here. This is more about supporting K8s 1.19 and Controller Runtime 0.6.z.

@leseb leseb changed the title Updating the dependencies for operator SDK v1.0.0 Bump Controller Runtime version to 0.6 Nov 19, 2020
@leseb
Copy link
Member

leseb commented Nov 19, 2020

How close is this to being merged? I'm building multiple fixes for #6650 on top of this for now.

It will be merged today, I want to manually test it.

Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

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

Successfully tested the change, no side effects observed.

@leseb leseb merged commit f86f830 into rook:master Nov 19, 2020
mergify bot added a commit that referenced this pull request Nov 24, 2020
Bump Controller Runtime version to 0.6 (bp #6568)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ceph main ceph tag
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants