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: support terraform runtime #112

Merged
merged 1 commit into from
Aug 16, 2022

Conversation

markliby
Copy link
Contributor

@markliby markliby commented Aug 8, 2022

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

  • N
  • Y

re #22

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

pkg/engine/runtime
pkg/terraform

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

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

support kusion terraform runtime:
1、WorkspaceStore store Terraform workspaces.
2、InitWorkSpace、Apply、Read、Destroy call terraform cli and parse terraform output

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

  • N
  • Y

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

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

6. Release note

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

None

@markliby markliby requested review from a team August 8, 2022 06:56
@github-actions
Copy link

github-actions bot commented Aug 8, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@markliby markliby force-pushed the feat_terraform_runtime branch 2 times, most recently from 5bbb826 to 21732d7 Compare August 8, 2022 07:48
@markliby
Copy link
Contributor Author

markliby commented Aug 8, 2022

I have read the CLA Document and I hereby sign the CLA

pkg/engine/runtime/Init/init.go Outdated Show resolved Hide resolved
pkg/engine/operation/graph/resource_node.go Show resolved Hide resolved
pkg/terraform/state.go Outdated Show resolved Hide resolved
pkg/terraform/state.go Outdated Show resolved Hide resolved
pkg/terraform/testdata/.terraform.lock.hcl Outdated Show resolved Hide resolved
pkg/terraform/tferrors.go Outdated Show resolved Hide resolved
pkg/engine/runtime/terraform_runtime.go Outdated Show resolved Hide resolved
pkg/engine/runtime/terraform_runtime.go Outdated Show resolved Hide resolved
@markliby markliby force-pushed the feat_terraform_runtime branch 4 times, most recently from 185289c to db424d4 Compare August 15, 2022 03:26
@coveralls
Copy link

coveralls commented Aug 15, 2022

Pull Request Test Coverage Report for Build 2860840545

  • 273 of 399 (68.42%) changed or added relevant lines in 8 files are covered.
  • 13 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.3%) to 74.447%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/engine/operation/graph/resource_node.go 2 3 66.67%
pkg/engine/runtime/terraform/tfops/state.go 14 16 87.5%
pkg/kusionctl/cmd/destroy/options.go 9 11 81.82%
pkg/engine/runtime/terraform/tfops/tferrors.go 22 26 84.62%
pkg/engine/runtime/terraform/tfops/store.go 32 50 64.0%
pkg/engine/runtime/terraform/tfops/workspace.go 135 180 75.0%
pkg/engine/runtime/terraform/terraform_runtime.go 54 108 50.0%
Files with Coverage Reduction New Missed Lines %
pkg/engine/operation/graph/resource_node.go 3 61.11%
pkg/engine/operation/parser/parser.go 3 75.0%
pkg/kusionctl/cmd/destroy/options.go 7 84.31%
Totals Coverage Status
Change from base Build 2838069109: -0.3%
Covered Lines: 4274
Relevant Lines: 5741

💛 - Coveralls

@SparkYuan
Copy link
Member

SparkYuan commented Aug 15, 2022

  1. Please move pkg/runtime to engine/runtime/tf_runtime
  2. Keep runtime's difference into runtime pkg and do not add if-branch in main logic
  3. Capitalize the first letter in runtime Types
  4. Move tf runtime into a individual project latter

@markliby markliby force-pushed the feat_terraform_runtime branch 12 times, most recently from 1b9aff4 to b882001 Compare August 15, 2022 13:04
SparkYuan
SparkYuan previously approved these changes Aug 15, 2022
@SparkYuan SparkYuan merged commit 62dc842 into KusionStack:main Aug 16, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2022
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.

None yet

4 participants