You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not all Makefiles of the instance contain the make test command, for example, the Makefile under the abstraction folder does not contain the test command
set -e does not work, especially when I use a version of KCL that itself contains errors
It is difficult to distinguish the output of each sample
Even if an error occurs during execution, "Test success" is still displayed.
Minimal reproduce step:
install KCLVM
git clone https://github.com/KusionStack/kcl-lang.io.git && cd kcl-lang.io/examples && ./test.sh
2. What did you expect to see? (Required)
Repair the test command of the Makefile under the abstraction folder
If the script sets the set -e flag, when the script encounters an execution error, it will stop immediately
Better display of results for each test case
If an error occurs during execution, it will display "Test FAILED".
3. What did you see instead (Required)
The script will continue to execute even if an error is encountered
The abstraction Makefile lacks the make test command
Difficult to tell what is wrong with each example
Even if an error occurs during execution, "Test success" is still displayed.
Testing configuration ...
make nginx
make[1]: Entering directory '/home/ch/kcl-lang.io/examples/configuration'
kcl nginx.k
nginx:
http:
server:
listen: 80
location:
root: /var/www/html
index: index.html
make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/configuration'
make db
make[1]: Entering directory '/home/ch/kcl-lang.io/examples/configuration'
kcl db.k
env: dev
database: ~
hosts:
dev: postgres.dev
stage: postgres.stage
prod: postgres.prod
dbConfig:
host: postgres.dev
database: ~
port: "2023"
conn: "postgres://postgres.dev:2023/None"
make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/configuration'
Test success - configuration
Testing validation ...
make run
make[1]: Entering directory '/home/ch/kcl-lang.io/examples/validation'
kcl-vet data.json schema.k
While deleting: %kclvm_value_ref_t** %$backtrack_cache
Use still stuck around after Def is destroyed: %"$backtrack_cache6" = load %kclvm_value_ref_t*, %kclvm_value_ref_t** %"$backtrack_cache", align 8
kclvm_cli: /home/ch/llvm-12.0.0.src/lib/IR/Value.cpp:100: llvm::Value::~Value(): Assertion `materialized_use_empty() && "Uses remain when a value is destroyed!"' failed.Aborted (core dumped)make[1]: *** [Makefile:2: run] Error 134make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/validation'make: *** [Makefile:5: test] Error 2Test success - validationTesting abstraction ...make: *** No rule to make target 'test'. Stop.Test success - abstractionTesting definition ...make runmake[1]: Entering directory '/home/ch/kcl-lang.io/examples/definition'kcl main.kWhile deleting: %kclvm_value_ref_t** %$backtrack_cacheUse still stuck around after Def is destroyed: %"$backtrack_cache6" = load %kclvm_value_ref_t*, %kclvm_value_ref_t** %"$backtrack_cache", align 8kclvm_cli: /home/ch/llvm-12.0.0.src/lib/IR/Value.cpp:100: llvm::Value::~Value(): Assertion `materialized_use_empty() && "Uses remain when a value is destroyed!"' failed.
Aborted (core dumped)
make[1]: *** [Makefile:2: run] Error 134
make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/definition'
make: *** [Makefile:5: test] Error 2
Test success - definition
Testing mutation ...
make run
make[1]: Entering directory '/home/ch/kcl-lang.io/examples/mutation'
kcl -Y kcl.yaml
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx-deployment
spec:
replicas: 4
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: "nginx:1.14.2"
name: nginx
ports:
- containerPort: 80
make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/mutation'
Test success - mutation
Testing data-integration ...
make yaml
make[1]: Entering directory '/home/ch/kcl-lang.io/examples/data-integration'
kcl yaml.k
server:
ports:
- 80
- 8080
server_yaml: "ports:\n - 80\n - 8080\n"
make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/data-integration'
make json
make[1]: Entering directory '/home/ch/kcl-lang.io/examples/data-integration'
kcl json.k
server:
ports:
- 80
- 8080
server_json: "{\"ports\": [80, 8080]}"
make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/data-integration'
Test success - data-integration
Testing automation ...
make update
make[1]: Entering directory '/home/ch/kcl-lang.io/examples/automation'
kcl main.k -O app.name='new_app'
app:
name: new_app
replicas: 1
labels:
app: new_app
key: value
make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/automation'
make delete
make[1]: Entering directory '/home/ch/kcl-lang.io/examples/automation'
kcl main.k -O app.labels.key-
app:
name: app
replicas: 1
labels:
app: app
make[1]: Leaving directory '/home/ch/kcl-lang.io/examples/automation'
Test success - automation
4. What is your KusionStack components version? (Required)
This error comes from a version of KCL that contained a bug of its own, which I discovered when I was trying to fix this issue.
The text was updated successfully, but these errors were encountered:
niconical
changed the title
bug: The script examples/test.shset -e flag doesn't work as expected.
The script examples/test.sh doesn't work as expected.
May 29, 2023
Bug Report
1. Minimal reproduce step (Required)
This script contains four questions:
make test
command, for example, the Makefile under the abstraction folder does not contain the test commandset -e
does not work, especially when I use a version of KCL that itself contains errorsMinimal reproduce step:
git clone https://github.com/KusionStack/kcl-lang.io.git && cd kcl-lang.io/examples && ./test.sh
2. What did you expect to see? (Required)
set -e
flag, when the script encounters an execution error, it will stop immediately3. What did you see instead (Required)
make test
command4. What is your KusionStack components version? (Required)
This error comes from a version of KCL that contained a bug of its own, which I discovered when I was trying to fix this issue.
The text was updated successfully, but these errors were encountered: