fix: fix CI checks — CRD regeneration, license config, and lint#588
Merged
Conversation
ImageRepository was incorrectly marked +required but is an optional override field. Webhook tests created ExternalLogSet without the required HAKeeperEndpoint field. CRDs were stale and inconsistent with the Go type markers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
license-eye has checked 305 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 0 | 141 | 164 | 0 |
Click to see the invalid file list
- api/core/v1alpha1/br_types.go
- api/core/v1alpha1/bucketclaim_helpers.go
- api/core/v1alpha1/bucketclaim_types.go
- api/core/v1alpha1/cnclaim_helper.go
- api/core/v1alpha1/cnclaim_types.go
- api/core/v1alpha1/cnpool_helper.go
- api/core/v1alpha1/cnpool_types.go
- api/core/v1alpha1/cnset_types.go
- api/core/v1alpha1/common_helpers.go
- api/core/v1alpha1/common_helpers_test.go
- api/core/v1alpha1/common_types.go
- api/core/v1alpha1/dnset_types.go
- api/core/v1alpha1/groupversion_info.go
- api/core/v1alpha1/logset_helpers.go
- api/core/v1alpha1/logset_types.go
- api/core/v1alpha1/logset_types_test.go
- api/core/v1alpha1/matrixonecluster_helpers.go
- api/core/v1alpha1/matrixonecluster_types.go
- api/core/v1alpha1/operator_version.go
- api/core/v1alpha1/proxy_types.go
- api/core/v1alpha1/semver.go
- api/core/v1alpha1/semver_test.go
- api/core/v1alpha1/store_helper.go
- api/core/v1alpha1/toml_config.go
- api/core/v1alpha1/toml_config_test.go
- api/core/v1alpha1/webui_types.go
- api/core/v1alpha1/zz_generated.deepcopy.go
- api/features/features.go
- cmd/hacli/main.go
- cmd/operator/main.go
- cmd/rpccli/main.go
- pkg/cmd/client.go
- pkg/cmd/types.go
- pkg/controllers/br/backup_controller.go
- pkg/controllers/br/command.go
- pkg/controllers/br/common.go
- pkg/controllers/br/gc_controller.go
- pkg/controllers/br/restore_controller.go
- pkg/controllers/bucketclaim/controller.go
- pkg/controllers/bucketclaim/controller_test.go
- pkg/controllers/bucketclaim/jobtpl.go
- pkg/controllers/bucketclaim/options.go
- pkg/controllers/cnclaim/controller.go
- pkg/controllers/cnclaim/controller_test.go
- pkg/controllers/cnclaim/migrate.go
- pkg/controllers/cnclaimset/controller.go
- pkg/controllers/cnclaimset/controller_test.go
- pkg/controllers/cnpool/controller.go
- pkg/controllers/cnpool/controller_test.go
- pkg/controllers/cnset/controller.go
- pkg/controllers/cnset/controller_test.go
- pkg/controllers/cnset/resource.go
- pkg/controllers/cnset/resource_test.go
- pkg/controllers/cnset/utils.go
- pkg/controllers/cnstore/controller.go
- pkg/controllers/cnstore/metric.go
- pkg/controllers/cnstore/pooling.go
- pkg/controllers/common/cnstore.go
- pkg/controllers/common/cnstore_test.go
- pkg/controllers/common/configmap.go
- pkg/controllers/common/configmap_test.go
- pkg/controllers/common/consts.go
- pkg/controllers/common/failover.go
- pkg/controllers/common/fileservice.go
- pkg/controllers/common/fileservice_test.go
- pkg/controllers/common/history.go
- pkg/controllers/common/history_test.go
- pkg/controllers/common/operatorcfg.go
- pkg/controllers/common/pod.go
- pkg/controllers/common/pod_test.go
- pkg/controllers/common/podset.go
- pkg/controllers/common/podset_test.go
- pkg/controllers/common/selector.go
- pkg/controllers/common/template.go
- pkg/controllers/common/types.go
- pkg/controllers/common/volume.go
- pkg/controllers/dnset/controller.go
- pkg/controllers/dnset/controller_test.go
- pkg/controllers/dnset/resource.go
- pkg/controllers/dnset/resource_test.go
- pkg/controllers/dnset/utils.go
- pkg/controllers/logset/bootstrap.go
- pkg/controllers/logset/bucketclaim.go
- pkg/controllers/logset/configmap.go
- pkg/controllers/logset/configmap_test.go
- pkg/controllers/logset/controller.go
- pkg/controllers/logset/controller_test.go
- pkg/controllers/logset/discovery.go
- pkg/controllers/logset/sts.go
- pkg/controllers/logset/sts_test.go
- pkg/controllers/mocluster/controller.go
- pkg/controllers/mocluster/controller_test.go
- pkg/controllers/proxyset/controller.go
- pkg/controllers/proxyset/resource.go
- pkg/controllers/webhook/controller.go
- pkg/controllers/webui/controller.go
- pkg/controllers/webui/controller_test.go
- pkg/controllers/webui/resource.go
- pkg/controllers/webui/utils.go
- pkg/hook/cnclaim.go
- pkg/hook/cnclaimset.go
- pkg/metric/rpc.go
- pkg/metric/types.go
- pkg/mocli/cn_cache.go
- pkg/mocli/lockservice_client.go
- pkg/mocli/manager.go
- pkg/mosql/client.go
- pkg/mosql/fake.go
- pkg/querycli/query.go
- pkg/utils/utils.go
- pkg/webhook/cnset_webhook.go
- pkg/webhook/cnset_webhook_test.go
- pkg/webhook/common.go
- pkg/webhook/convertor/convertor.go
- pkg/webhook/convertor/convertor_test.go
- pkg/webhook/corevalidation/exported.go
- pkg/webhook/dnset_webhook.go
- pkg/webhook/dnset_webhook_test.go
- pkg/webhook/logset_webhook.go
- pkg/webhook/logset_webhook_test.go
- pkg/webhook/matrixonecluster_webhook.go
- pkg/webhook/matrixonecluster_webhook_test.go
- pkg/webhook/proxy_webhook.go
- pkg/webhook/proxy_webhook_test.go
- pkg/webhook/utils.go
- pkg/webhook/webhook.go
- pkg/webhook/webhook_suite_test.go
- pkg/webhook/webui_webhook.go
- test/e2e/bucket_test.go
- test/e2e/claim_test.go
- test/e2e/cnset_test.go
- test/e2e/dnset_test.go
- test/e2e/e2eminio/minios3.go
- test/e2e/logset_test.go
- test/e2e/matrixonecluster_test.go
- test/e2e/proxy_test.go
- test/e2e/sql/sql.go
- test/e2e/suite_test.go
- test/e2e/util/patch.go
- test/e2e/util/portforward.go
- test/e2e/util/template.go
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
license-eye has checked 305 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 0 | 141 | 164 | 0 |
Click to see the invalid file list
- api/core/v1alpha1/br_types.go
- api/core/v1alpha1/bucketclaim_helpers.go
- api/core/v1alpha1/bucketclaim_types.go
- api/core/v1alpha1/cnclaim_helper.go
- api/core/v1alpha1/cnclaim_types.go
- api/core/v1alpha1/cnpool_helper.go
- api/core/v1alpha1/cnpool_types.go
- api/core/v1alpha1/cnset_types.go
- api/core/v1alpha1/common_helpers.go
- api/core/v1alpha1/common_helpers_test.go
- api/core/v1alpha1/common_types.go
- api/core/v1alpha1/dnset_types.go
- api/core/v1alpha1/groupversion_info.go
- api/core/v1alpha1/logset_helpers.go
- api/core/v1alpha1/logset_types.go
- api/core/v1alpha1/logset_types_test.go
- api/core/v1alpha1/matrixonecluster_helpers.go
- api/core/v1alpha1/matrixonecluster_types.go
- api/core/v1alpha1/operator_version.go
- api/core/v1alpha1/proxy_types.go
- api/core/v1alpha1/semver.go
- api/core/v1alpha1/semver_test.go
- api/core/v1alpha1/store_helper.go
- api/core/v1alpha1/toml_config.go
- api/core/v1alpha1/toml_config_test.go
- api/core/v1alpha1/webui_types.go
- api/core/v1alpha1/zz_generated.deepcopy.go
- api/features/features.go
- cmd/hacli/main.go
- cmd/operator/main.go
- cmd/rpccli/main.go
- pkg/cmd/client.go
- pkg/cmd/types.go
- pkg/controllers/br/backup_controller.go
- pkg/controllers/br/command.go
- pkg/controllers/br/common.go
- pkg/controllers/br/gc_controller.go
- pkg/controllers/br/restore_controller.go
- pkg/controllers/bucketclaim/controller.go
- pkg/controllers/bucketclaim/controller_test.go
- pkg/controllers/bucketclaim/jobtpl.go
- pkg/controllers/bucketclaim/options.go
- pkg/controllers/cnclaim/controller.go
- pkg/controllers/cnclaim/controller_test.go
- pkg/controllers/cnclaim/migrate.go
- pkg/controllers/cnclaimset/controller.go
- pkg/controllers/cnclaimset/controller_test.go
- pkg/controllers/cnpool/controller.go
- pkg/controllers/cnpool/controller_test.go
- pkg/controllers/cnset/controller.go
- pkg/controllers/cnset/controller_test.go
- pkg/controllers/cnset/resource.go
- pkg/controllers/cnset/resource_test.go
- pkg/controllers/cnset/utils.go
- pkg/controllers/cnstore/controller.go
- pkg/controllers/cnstore/metric.go
- pkg/controllers/cnstore/pooling.go
- pkg/controllers/common/cnstore.go
- pkg/controllers/common/cnstore_test.go
- pkg/controllers/common/configmap.go
- pkg/controllers/common/configmap_test.go
- pkg/controllers/common/consts.go
- pkg/controllers/common/failover.go
- pkg/controllers/common/fileservice.go
- pkg/controllers/common/fileservice_test.go
- pkg/controllers/common/history.go
- pkg/controllers/common/history_test.go
- pkg/controllers/common/operatorcfg.go
- pkg/controllers/common/pod.go
- pkg/controllers/common/pod_test.go
- pkg/controllers/common/podset.go
- pkg/controllers/common/podset_test.go
- pkg/controllers/common/selector.go
- pkg/controllers/common/template.go
- pkg/controllers/common/types.go
- pkg/controllers/common/volume.go
- pkg/controllers/dnset/controller.go
- pkg/controllers/dnset/controller_test.go
- pkg/controllers/dnset/resource.go
- pkg/controllers/dnset/resource_test.go
- pkg/controllers/dnset/utils.go
- pkg/controllers/logset/bootstrap.go
- pkg/controllers/logset/bucketclaim.go
- pkg/controllers/logset/configmap.go
- pkg/controllers/logset/configmap_test.go
- pkg/controllers/logset/controller.go
- pkg/controllers/logset/controller_test.go
- pkg/controllers/logset/discovery.go
- pkg/controllers/logset/sts.go
- pkg/controllers/logset/sts_test.go
- pkg/controllers/mocluster/controller.go
- pkg/controllers/mocluster/controller_test.go
- pkg/controllers/proxyset/controller.go
- pkg/controllers/proxyset/resource.go
- pkg/controllers/webhook/controller.go
- pkg/controllers/webui/controller.go
- pkg/controllers/webui/controller_test.go
- pkg/controllers/webui/resource.go
- pkg/controllers/webui/utils.go
- pkg/hook/cnclaim.go
- pkg/hook/cnclaimset.go
- pkg/metric/rpc.go
- pkg/metric/types.go
- pkg/mocli/cn_cache.go
- pkg/mocli/lockservice_client.go
- pkg/mocli/manager.go
- pkg/mosql/client.go
- pkg/mosql/fake.go
- pkg/querycli/query.go
- pkg/utils/utils.go
- pkg/webhook/cnset_webhook.go
- pkg/webhook/cnset_webhook_test.go
- pkg/webhook/common.go
- pkg/webhook/convertor/convertor.go
- pkg/webhook/convertor/convertor_test.go
- pkg/webhook/corevalidation/exported.go
- pkg/webhook/dnset_webhook.go
- pkg/webhook/dnset_webhook_test.go
- pkg/webhook/logset_webhook.go
- pkg/webhook/logset_webhook_test.go
- pkg/webhook/matrixonecluster_webhook.go
- pkg/webhook/matrixonecluster_webhook_test.go
- pkg/webhook/proxy_webhook.go
- pkg/webhook/proxy_webhook_test.go
- pkg/webhook/utils.go
- pkg/webhook/webhook.go
- pkg/webhook/webhook_suite_test.go
- pkg/webhook/webui_webhook.go
- test/e2e/bucket_test.go
- test/e2e/claim_test.go
- test/e2e/cnset_test.go
- test/e2e/dnset_test.go
- test/e2e/e2eminio/minios3.go
- test/e2e/logset_test.go
- test/e2e/matrixonecluster_test.go
- test/e2e/proxy_test.go
- test/e2e/sql/sql.go
- test/e2e/suite_test.go
- test/e2e/util/patch.go
- test/e2e/util/portforward.go
- test/e2e/util/template.go
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2025 Matrix Origin | |||
| // Copyright 2025-2026 Matrix Origin | |||
Contributor
There was a problem hiding this comment.
Suggested change
| // Copyright 2025-2026 Matrix Origin | |
| // Copyright 2026 Matrix Origin | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| // Copyright 2025-2026 Matrix Origin |
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2025 Matrix Origin | |||
| // Copyright 2025-2026 Matrix Origin | |||
Contributor
There was a problem hiding this comment.
Suggested change
| // Copyright 2025-2026 Matrix Origin | |
| // Copyright 2026 Matrix Origin | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| // Copyright 2025-2026 Matrix Origin |
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2025 Matrix Origin | |||
| // Copyright 2025-2026 Matrix Origin | |||
Contributor
There was a problem hiding this comment.
Suggested change
| // Copyright 2025-2026 Matrix Origin | |
| // Copyright 2026 Matrix Origin | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| // Copyright 2025-2026 Matrix Origin |
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2025 Matrix Origin | |||
| // Copyright 2025-2026 Matrix Origin | |||
Contributor
There was a problem hiding this comment.
Suggested change
| // Copyright 2025-2026 Matrix Origin | |
| // Copyright 2026 Matrix Origin | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, software | |
| // distributed under the License is distributed on an "AS IS" BASIS, | |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| // See the License for the specific language governing permissions and | |
| // limitations under the License. | |
| // Copyright 2025-2026 Matrix Origin |
The license checker rejects headers like "Copyright 2025-2026" without a pattern that accepts year ranges. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes golangci-lint revive/unused-parameter warning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LogShards, DNShards, and LogShardReplicas all have webhook defaults and are pointer types with omitempty — they are optional fields that get defaulted, not required inputs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
loveRhythm1990
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the
test_workflows / checksCI failure onmaincaused by stale CRDs, license header validation, and a lint warning.Changes
Fix
+required/+optionalmarkers — align kubebuilder markers with actual field semantics:MatrixOneClusterSpec.ImageRepository:+required→+optional— optional override for the default image repositoryInitialConfig.LogShards:+required→+optional— webhook defaults to 1InitialConfig.DNShards:+required→+optional— webhook defaults to 1InitialConfig.LogShardReplicas:+required→+optional— webhook defaults to 3 (or 1)Fix webhook tests (
cnset_webhook_test.go,dnset_webhook_test.go,proxy_webhook_test.go): ProvideHAKeeperEndpoint: "test"when creatingExternalLogSetobjectsRegenerate CRDs: All CRD manifests regenerated with controller-gen v0.16.0
Fix license check (
.licenserc.yml): Addcopyright-yearandpatternto accept year-range headers (Copyright 2025-2026)Fix lint warning (
pkg/controllers/cnclaim/controller_test.go): Rename unused params to_Fields that remain
+requiredand whyExternalLogSet.HAKeeperEndpointVolume.SizeS3Provider.PathNFSProvider.PathCertificateRef.NameCertificateRef.FilesLogSetSpec.VolumeLogSetSpec.SharedStorageBucketClaimSpec.S3MatrixOneClusterSpec.VersionCNGroup.NameRoot Cause
controller-gen v0.16.0 properly enforces
+requiredmarkers in CRD OpenAPI schemas. The committed CRDs were generated with an older version that silently ignored the mismatch between+requiredandomitempty. Several fields were incorrectly marked+requiredwhen they are actually optional with webhook defaults.Test plan
checksjob passese2ejob passes🤖 Generated with Claude Code