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

Add "description" field for each workload from ListWorkloads API #824

Merged
merged 1 commit into from
Dec 28, 2020

Conversation

zzxwill
Copy link
Collaborator

@zzxwill zzxwill commented Dec 25, 2020

Workload item doesn't have descriptin property, added it to help display
the description in capability list on Dashboard

Fix #821

@codecov
Copy link

codecov bot commented Dec 25, 2020

Codecov Report

Merging #824 (37cb5cc) into master (32bc744) will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #824      +/-   ##
==========================================
+ Coverage   35.92%   35.98%   +0.05%     
==========================================
  Files          99       99              
  Lines        8656     8656              
==========================================
+ Hits         3110     3115       +5     
+ Misses       5199     5196       -3     
+ Partials      347      345       -2     
Flag Coverage Δ
unittests 35.98% <ø> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
...plicationconfiguration/applicationconfiguration.go 85.12% <0.00%> (+0.82%) ⬆️
...andard.oam.dev/v1alpha1/routes/route_controller.go 67.26% <0.00%> (+1.78%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32bc744...37cb5cc. Read the comment docs.

Workload item doesn't have descriptin property, added it to help display
the description in capability list on Dashboard
@@ -47,9 +47,9 @@ type WorkloadRunBody struct {

// WorkloadMeta store workload metadata for dashboard restful API server
type WorkloadMeta struct {
Name string `json:"name"`
Parameters []types.Parameter `json:"parameters,omitempty"`
AppliesTo []string `json:"appliesTo,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

why delete appliesTo?

Copy link
Collaborator

Choose a reason for hiding this comment

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

BTW, it's better to have a unit test for it. Now, even we delete some field(which should be a break change) that the CI won't fail.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Workload should not have AppliesTo field. And I have confirmed all callers of this struct and it's only called by pkg/server/workloadHandler.go.

@wonderflow wonderflow merged commit e8cabdc into kubevela:master Dec 28, 2020
@zzxwill zzxwill deleted the issue-workloads branch February 1, 2021 07:50
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