Closed amyXia1994 closed 1 year ago
U can move this issue into the konfig repo.
I completely agree with you! Your suggestion about improving tests and enhancing user experience is fantastic.
By the way, are there any updates or progress regarding this issue? I believe it's important and we should try to speed up the process.
Background
Those golden files are used mainly for the smoking test, listing affected stacks and displaying the expected YAML diffs in the PR CI progress. But the downsides are appearing:
stdout.golden.yaml
files. That's time-consuming. And it's also not evident to users who are first to the Kusion stack.For all the above reasons, The golden files need to be removed from the repo, on the premise that all the usages of them are reserved:
Furthermore, the stability of the code in konfig still needs to be enhanced by unit and end-to-end tests. That will be discussed in issue: todo
Solution
Tools
Update: kusion compile
Current
usage is:
kusion compile -w <stackPath>
. When the-o
option is not specified, the command will by default output to theci-test/stdout.golden.yaml
file.Update to
--front
option to output the frontend configuration.Optimize: kusion deps
The
kusion deps
tools should be optimized to identify the configuration changes more precisely, so to reduce the re-compile time, then improve the local and the CI efficiency.Current
The dependency analysis is based on the import relationship between files.
Update to
The
kusion deps
tool should support attribute-level dependency analysis.Update: CI
The CI pipeline needs to support listing affected stacks and the diff details:
Update: Konfig script
check-App
scriptAdd: Kusion IDE
Kusion IDE needs to provide convenient user interaction based on the above tools:
live preview of app configuraiton's Yaml representation
the feature is detailed in: https://github.com/KusionStack/vscode-kcl/issues/14
Provide a preview Yaml output panel when the user's active editor is at a
base.k
/main.k
file under a stack:filter and focus on the changed stacks to provide a local review
Provide filters when displaying the konfig apps:
change review panel
If the repo is adopting a source control, the Kusion IDE needs to add a panel to display the changed stack list and a left-to-right Yaml diff of stacks, so users could review these changes before committing.
The related components need to be updated
There are some components that are aware of or rely on the
stdout.golden.yaml
files. They need to be updated before the golden files are finally removed from the konfig repo:During the migration,
deprecated warnings
could be widely used to inform users to migrate to the new process. And users should be announced before the changes are public released.Phased Goals
stage 1:
kusion compile
: remove default output to goldenstage 2:
kusion deps
tool to support attribute-level dependency analysis.