-
Notifications
You must be signed in to change notification settings - Fork 886
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
Update samples for "vela show xxx --web" #1616
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1616 +/- ##
==========================================
+ Coverage 62.00% 62.15% +0.15%
==========================================
Files 120 120
Lines 11899 11900 +1
==========================================
+ Hits 7378 7397 +19
+ Misses 3761 3734 -27
- Partials 760 769 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
references/plugins/references.go
Outdated
specification := fmt.Sprintf("\n\n## Specification\n\n%s\n\n%s", specificationIntro, specificationContent) | ||
title := fmt.Sprintf(`--- | ||
title: %s | ||
---`, capNameInTitle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we change the style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make it consistent with the reference doc in kubevela.io https://kubevela.io/docs/developers/references/component-types/webservice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it still work in vela show --web?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please create a new issue about "generate the sample automatically (low priority)" if you want to close #1602 |
Also stop generating components/traits docs under docs/en/end-user and remove the command from Makefile Fix kubevela#1602
Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
- Find the capability in "vela-system" if notfound in the current ns - Don't depend on local capabilities
In the first time, the coverage was dropped by 0.09%. |
Now it dropped more by 3.86%. |
@@ -57,16 +57,46 @@ func GetCapabilitiesFromCluster(ctx context.Context, namespace string, c common. | |||
return workloads, nil | |||
} | |||
|
|||
// GetNamespacedCapabilitiesFromCluster will get capability from K8s cluster in the specified namespace and default namespace | |||
// If the definition could be found from `namespace`, try to find in namespace `types.DefaultKubeVelaNS` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job!
"github.com/google/go-cmp/cmp" | ||
"io/ioutil" | ||
corev1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please format it.
// go inner packages
// third party packages
// project pakcages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after nit
* Update samples for "vela show xxx --web" Also stop generating components/traits docs under docs/en/end-user and remove the command from Makefile Fix kubevela#1602 * fix doc build issue * Update references/plugins/references.go Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com> * Enhance --web feature for "vela show" - Find the capability in "vela-system" if notfound in the current ns - Don't depend on local capabilities * add ut for GetCapabilityByName in references/plugins/cluster.go * add ut for GetNamespacedCapabilitiesFromCluster in references/plugins/cluster.go * add ut for GenerateTerraformCapabilityProperties in references/plugins/references.go * fix import issue Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
* Update samples for "vela show xxx --web" Also stop generating components/traits docs under docs/en/end-user and remove the command from Makefile Fix kubevela#1602 * fix doc build issue * Update references/plugins/references.go Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com> * Enhance --web feature for "vela show" - Find the capability in "vela-system" if notfound in the current ns - Don't depend on local capabilities * add ut for GetCapabilityByName in references/plugins/cluster.go * add ut for GetNamespacedCapabilitiesFromCluster in references/plugins/cluster.go * add ut for GenerateTerraformCapabilityProperties in references/plugins/references.go * fix import issue Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
Also stop generating components/traits docs under
docs/en/end-user and remove the command from Makefile
Fix #1602