KusionStack / konfig

Shared repository of application models and components, and CI suite for GitOps workflows
Apache License 2.0
27 stars 32 forks source link

workaround kcl lint problem #83

Closed amyXia1994 closed 1 year ago

amyXia1994 commented 1 year ago

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

2. What is the scope of this PR (e.g. component or file name):

appops/clickhouse-operator/base/base.k

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

This PR is to workaround the kcl lint bug. The sidecar defined in the base.k file will be overridden by that defined in the prod/main.k file and since kcl lint check works based on the result of the config merge phase, the ContainerPort expression is missing in the lint phase, so kcl lint mistakenly reports an error of "unused import" on the import base.pkg.kusion_models.kube.frontend.container.port as cp statement.

The kcl lint bug will be fixed. issue tracked here: todo @He1pa

To avoid blocking the konfig development (blocked here), this PR removes the "unused" code temporarily.

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

6. Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None