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 custom writer and storage for apply and preview #62

Merged

Conversation

elliotxx
Copy link
Contributor

@elliotxx elliotxx commented Jun 7, 2022

Purpose:

  • Public apply and preview func for external system integration
  • Support custom state storage and writer for apply and preview func
  • Bump the github.com/pterm/pterm package to the latest version

@coveralls
Copy link

coveralls commented Jun 7, 2022

Pull Request Test Coverage Report for Build 2507038325

  • 20 of 34 (58.82%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 75.677%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/kusionctl/cmd/apply/options.go 20 22 90.91%
pkg/engine/states/oss_state.go 0 6 0.0%
pkg/engine/states/s3_state.go 0 6 0.0%
Totals Coverage Status
Change from base Build 2499564529: -0.1%
Covered Lines: 3690
Relevant Lines: 4876

💛 - Coveralls

@elliotxx elliotxx requested review from adohe and ldxdl June 9, 2022 08:12
@elliotxx elliotxx force-pushed the support-custom-writer-and-storage-for-apply-and-preview branch from 887d1df to 8d7c0fd Compare June 9, 2022 08:28
@elliotxx elliotxx force-pushed the support-custom-writer-and-storage-for-apply-and-preview branch from 8d7c0fd to e743ad8 Compare June 9, 2022 08:29
go.mod Show resolved Hide resolved
@elliotxx elliotxx requested a review from a team June 9, 2022 09:36
howieyuen
howieyuen previously approved these changes Jun 13, 2022
@elliotxx elliotxx force-pushed the support-custom-writer-and-storage-for-apply-and-preview branch from 6d9b151 to 802c993 Compare June 16, 2022 05:58
Copy link
Contributor

@healthjyk healthjyk left a comment

Choose a reason for hiding this comment

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

look good to me

@ldxdl
Copy link

ldxdl commented Jun 16, 2022

The interface design of the engine and the options’ pub API is not very reasonable. As here, the runtime interface shouldn't be exposed. @elliotxx and @SparkYuan, pls pay more attention to design and work out a more reasonable API interfaces of option and engine layer. And, we need to reconsider the position and functionality of the option layer, cause each individual layer has its design and cost.

BTW. In general, the interface parameters include three parts, the configurations(str, int, bool..), the feature flags(bools..) and the functional structures(IO, client, etc). The functional structures are injected into the lower layer by the middle layer, and obtained by the factory provided by the lower layer. We can design and implement APIs more standardly.

@elliotxx
Copy link
Contributor Author

elliotxx commented Jun 16, 2022

@ldxdl OK, the interface design will continue to be optimized, and we will submit PR separately to solve.
@SparkYuan @howieyuen @markliby We need to optimize the exposed interfaces for the engine and the command line.

Copy link

@ldxdl ldxdl left a comment

Choose a reason for hiding this comment

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

LGTM

@elliotxx elliotxx merged commit ab8fa09 into main Jun 16, 2022
@elliotxx elliotxx deleted the support-custom-writer-and-storage-for-apply-and-preview branch June 16, 2022 11:58
@github-actions github-actions bot locked and limited conversation to collaborators Jun 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/optimization Code optimization
Projects
None yet
5 participants