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

Fix: input error stores structure type data #91

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

yangsoon
Copy link
Contributor

@yangsoon yangsoon commented Nov 29, 2022

Description of your changes

In the following example, if response.data is a struct that contains multiple fields, the if statement will parse incorrectly.
this PR fix this bug.

response: data: {
 success: true
 code: 200
}
- name: test-step
  subSteps:
  - name: test-subStep-1
    outputs:
    - name: subStep-1-result
      valueFrom: response.data
    type: webhook
  # cue parse error 
  - if:  inputs["subStep-1-result"].success == true
    inputs:
    - from: subStep-1-result
    name: test-subStep-2
    type: webhook

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Base: 67.79% // Head: 24.20% // Decreases project coverage by -43.59% ⚠️

Coverage data is based on head (a4ae694) compared to base (3f1eab6).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #91       +/-   ##
===========================================
- Coverage   67.79%   24.20%   -43.60%     
===========================================
  Files          45       41        -4     
  Lines        4065     3735      -330     
===========================================
- Hits         2756      904     -1852     
- Misses        947     2619     +1672     
+ Partials      362      212      -150     
Flag Coverage Δ
e2etests 24.20% <0.00%> (ø)
unit-test ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/tasks/custom/task.go 34.62% <0.00%> (-36.72%) ⬇️
pkg/backup/interface.go 0.00% <0.00%> (-83.34%) ⬇️
api/condition/condition.go 10.38% <0.00%> (-81.82%) ⬇️
pkg/cue/model/instance.go 0.00% <0.00%> (-75.00%) ⬇️
pkg/cue/model/sets/operation.go 0.00% <0.00%> (-74.39%) ⬇️
pkg/providers/email/send.go 7.01% <0.00%> (-73.69%) ⬇️
pkg/cue/utils.go 0.00% <0.00%> (-71.88%) ⬇️
pkg/providers/http/ratelimiter/ratelimiter.go 30.00% <0.00%> (-70.00%) ⬇️
pkg/tasks/builtin/step_group.go 0.00% <0.00%> (-68.82%) ⬇️
pkg/debug/context.go 0.00% <0.00%> (-66.67%) ⬇️
... and 27 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

pkg/tasks/custom/task.go Outdated Show resolved Hide resolved
Signed-off-by: songyang.song <songyang.song@alibaba-inc.com>
@FogDong FogDong merged commit de4facb into kubevela:main Nov 29, 2022
@yangsoon yangsoon deleted the fix/input-value branch November 29, 2022 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants