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

feat: introduce the new command kusion build and delete redundant commands #608

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

SparkYuan
Copy link
Member

…ommands

What type of PR is this?

/kind feature

What this PR does / why we need it:

introduce the new command kusion build and delete redundant commands

Which issue(s) this PR fixes:

Fixes #591 #581

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., design docs, usage docs, etc.:


@adohe
Copy link
Contributor

adohe commented Nov 20, 2023

@SparkYuan imho this pull request is too big, it's too hard to review, please split it into small ones.

@coveralls
Copy link

coveralls commented Nov 21, 2023

Pull Request Test Coverage Report for Build 6940962307

  • 98 of 105 (93.33%) changed or added relevant lines in 11 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.04%) to 75.855%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/generator/kcl/kcl_generator.go 12 19 63.16%
Files with Coverage Reduction New Missed Lines %
pkg/engine/operation/parser/parser.go 3 79.27%
pkg/generator/kcl/kcl_generator.go 3 82.1%
Totals Coverage Status
Change from base Build 6940494935: 0.04%
Covered Lines: 6965
Relevant Lines: 9182

💛 - Coveralls

@SparkYuan
Copy link
Member Author

SparkYuan commented Nov 21, 2023

@SparkYuan imho this pull request is too big, it's too hard to review, please split it into small ones.

I agree with your opinion that we should not push too many changes in one PR, but this PR is a little different.

  • The purpose of this PR is to introduce kusion build as a replacement for the old kusion compile command, which is utilized by many other commands. As a result, this replacement will cause many changes in other files.
  • The build command deletes some KCL-related options like Overrides and OverrideAST which leads to deletions in files likepkg/generator/kcl/kcl_generator.go and pkg/cmd/build/options.go
  • The build command will not generate the ci-test fold which leads to changes in pkg/projectstack/types.go
  • The build options will not contain the isCheck which leads to changes in pkg/cmd/build/options_test.go

The reasons listed above are all caused by the difference between kusion build and kusion compile. Due to the indivisible nature of the replacement, it is not possible to separate it into distinct parts, leading to potential inconsistencies and compilation errors. Besides, the overall change lines is not huge, it only contains +190 −379 changes.

Copy link
Contributor

@elliotxx elliotxx left a comment

Choose a reason for hiding this comment

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

lgtm

@SparkYuan SparkYuan merged commit d42acde into KusionStack:main Nov 22, 2023
6 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2023
@ffforest ffforest linked an issue Nov 30, 2023 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Kusion build subcommand Bug: kusion preview generates an unnecessary ci-test folder
4 participants