-
Notifications
You must be signed in to change notification settings - Fork 527
Adapt etcd-druid API go module #11545
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
Conversation
0d940dc
to
cce6cfe
Compare
cce6cfe
to
bf175df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
/lgtm
/test pull-gardener-integration |
d37f6ef
to
1f851a5
Compare
/test pull-gardener-integration |
/test pull-gardener-e2e-kind-operator-seed |
89df475
to
a6111c8
Compare
79781e2
to
0422c9f
Compare
/test pull-gardener-integration |
/test pull-gardener-integration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: b6ba5a80d657d9b94a19ec6d8ee893c13f2be72a
|
I will have a final look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ialidzhikov 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:
Approvers can indicate their approval by writing |
In retrospective, reviewing this PR was not the best experience (at least for me). There were too many changes coupled to the new version of etcd-druid and one cannot upgrade to it without adapting to the breaking changes:
I am providing this feedback for future etcd-druid upgrade PRs. It would be better to do not have that many breaking changes in a single release. I would be much better if a sinle release of etcd-druid switched to the API module. Other release, switched to using the etcds CRDs from the etcd-druid API module. Other release that does other breaking changes like changing the default capacity, introducing the CEL validations, etc. |
Thanks for the feedback @ialidzhikov.
We usually wait for 3 releases before moving to GA. It happened to be the same release as druid API module changes. Now we try and follow regular release cycles instead of doing it adhoc. This was a team decision. Having said that I only realised it much later that this breaking change was included in the PR. This was a clear miss from our side.
Unfortunately till now we have had very limited validation for
Gardener has a specific way to manage/consume CRDs. Since we are also positioning etcd-druid to be used outside Gardener we wanted to provide both ways (via Helm charts) and also programmatic access to CRDs. We wanted to ensure that etcd-druid is the single source for all CRDs. I am aware that it creates a difference in consumption pattern as far as g/g is concerned and we are open to discussions and improving g/g usage as that is the primary consumer for etcd-druid.
Since CRD apis were introduced that caused the import alias to be relooked at.
I will take this as a feedback for any PR that is raised on g/g. Thanks for the time spent on reviewing this PR and getting this in. In hindsight we can perhaps relook at how we manage breaking changes and spread it across releases. Sometimes it gets difficult as development activity in etcd-druid has picked up and there are a lot of refactoring activities that are currently on-going. This causes churn and with that comes changes (some of which will be breaking changes). Overall the goal is to improve the code+design quality and make it easier to add features (which we have a long list of). |
Introduced with gardener#11545. The correct pkg is `github.com/gardener/etcd-druid/api/core/v1alpha1/crds`, not `github.com/gardener/etcd-druid/api/core/crds`.
Introduced with gardener#11545. The correct pkg is `github.com/gardener/etcd-druid/api/core/v1alpha1/crds`, not `github.com/gardener/etcd-druid/api/core/crds`.
* Clean up exclusion of non-existing `pkg/client/extensions` path Extension clients are no longer generated after #4592. * Clean up exclusion of non-existing `builtin$` path I don't find in the project a path matching `builtin$`. * Clean up exclusion of non-existing `examples$` path I don't find in the project a path matching `examples$`. We have a dir named `example/`, not `examples/`. * Update fluent-operator import alias With #11673, the fluent-operator imports were updated from `github.com/fluent/fluent-operator/v2` to `github.com/fluent/fluent-operator/v3`. * Clean up import alias for non-existing pkg `github.com/gardener/gardener/extensions/pkg/apis/config` was removed with #11056. * Clean up import alias for non-existing pkg(s) Internal component config APIs were removed. See #11043 * Add `pkg/client/security` to the list of excluded dirs `pkg/client/security` contains generated clientset, informers and listers. Similar to the other generated dirs, it should be excluded. * Update the import alias for etcd-druid crds pkg Introduced with #11545. The correct pkg is `github.com/gardener/etcd-druid/api/core/v1alpha1/crds`, not `github.com/gardener/etcd-druid/api/core/crds`. * Clean up paths with generated code from `linters.exclusions.paths` We already use `linters.exclusions.generated=lax`. `lax` mode should automatically detect and ignore generated files. Ref https://golangci-lint.run/usage/configuration/#linters-configuration * Clean up the exclusion of the `third_party` path In the Makefile, we explicitly pass the paths to be checked. `third_party` is not among them. Hence, there is no need to exclude it as we don't check for it. https://github.com/gardener/gardener/blob/v1.124.0/Makefile#L165 * Don't check for imports under `third_party` `third_party` currently contains a forked dependency and generated mocks. Hence, I don't see much value for checking for imports there as it does not contain a pkg which is not generated or not copied. * Address PR review feedback from dimitar-kostadinov
* Clean up exclusion of non-existing `pkg/client/extensions` path Extension clients are no longer generated after gardener#4592. * Clean up exclusion of non-existing `builtin$` path I don't find in the project a path matching `builtin$`. * Clean up exclusion of non-existing `examples$` path I don't find in the project a path matching `examples$`. We have a dir named `example/`, not `examples/`. * Update fluent-operator import alias With gardener#11673, the fluent-operator imports were updated from `github.com/fluent/fluent-operator/v2` to `github.com/fluent/fluent-operator/v3`. * Clean up import alias for non-existing pkg `github.com/gardener/gardener/extensions/pkg/apis/config` was removed with gardener#11056. * Clean up import alias for non-existing pkg(s) Internal component config APIs were removed. See gardener#11043 * Add `pkg/client/security` to the list of excluded dirs `pkg/client/security` contains generated clientset, informers and listers. Similar to the other generated dirs, it should be excluded. * Update the import alias for etcd-druid crds pkg Introduced with gardener#11545. The correct pkg is `github.com/gardener/etcd-druid/api/core/v1alpha1/crds`, not `github.com/gardener/etcd-druid/api/core/crds`. * Clean up paths with generated code from `linters.exclusions.paths` We already use `linters.exclusions.generated=lax`. `lax` mode should automatically detect and ignore generated files. Ref https://golangci-lint.run/usage/configuration/#linters-configuration * Clean up the exclusion of the `third_party` path In the Makefile, we explicitly pass the paths to be checked. `third_party` is not among them. Hence, there is no need to exclude it as we don't check for it. https://github.com/gardener/gardener/blob/v1.124.0/Makefile#L165 * Don't check for imports under `third_party` `third_party` currently contains a forked dependency and generated mocks. Hence, I don't see much value for checking for imports there as it does not contain a pkg which is not generated or not copied. * Address PR review feedback from dimitar-kostadinov
How to categorize this PR?
/area control-plane
/kind technical-debt
What this PR does / why we need it:
This PR introduces the following changes:
github.com/gardener/etcd-druid
and replaces it withgithub.com/gardener/etcd-druid/api
dependency.Etcd
andEtcdCopyBackupsTask
CRDs from this repository and instead usesgithub.com/gardener/etcd-druid/api/core/v1alpha1/crds
to get these CRDs directly from etcd-druid.hacks/generate-crds.sh
Which issue(s) this PR fixes:
Fixes #11544
Special notes for your reviewer:
Release note: