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

Feat: optimize "application-resource-tree-view" #6096

Merged
merged 3 commits into from
Jun 9, 2023
Merged

Feat: optimize "application-resource-tree-view" #6096

merged 3 commits into from
Jun 9, 2023

Conversation

suwliang3
Copy link
Contributor

@suwliang3 suwliang3 commented Jun 8, 2023

Description of your changes

🤖 Generated by Copilot at 58f55ec

Summary

✨🔧📈

This pull request adds a new feature to the velaql service and chart to allow querying the newest or the historical resources in the resource tree. It updates the query package of the stdlib and the query provider of the velaql to support the new feature.

Oh we are the velaql crew and we have a job to do
We query the resources with a flag that's new
We heave and we haul on the queryNewest option
And we skip the history if we want the latest version

Walkthrough

  • Add queryNewest parameter to velaql template to enable filtering history resources (link, link)
  • Store queryNewest parameter value in Query struct of query package (link)
  • Parse queryNewest parameter from velaql service request and store it in FilterOption struct of handler package (link)
  • Skip collecting history resources in ListApplicationResources function of collector package if queryNewest option is true (link)

Fixes #6092

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

add queryNewest=true in velaql

Special notes for your reviewer

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
@Somefive Somefive changed the title [feature] Optimize "application-resource-tree-view" Feat: optimize "application-resource-tree-view" Jun 8, 2023
@suwliang3 suwliang3 changed the title Feat: optimize "application-resource-tree-view" [feature] Optimize application-resource-tree-view Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.12 🎉

Comparison is base (c255d21) 66.46% compared to head (173d772) 66.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6096      +/-   ##
==========================================
+ Coverage   66.46%   66.59%   +0.12%     
==========================================
  Files         191      191              
  Lines       24780    24783       +3     
==========================================
+ Hits        16469    16503      +34     
+ Misses       6711     6682      -29     
+ Partials     1600     1598       -2     
Flag Coverage Δ
core-unittests 55.24% <0.00%> (+0.08%) ⬆️
e2e-multicluster-test 30.87% <0.00%> (+0.10%) ⬆️
e2etests 33.54% <0.00%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
pkg/velaql/providers/query/collector.go 65.61% <0.00%> (-0.91%) ⬇️
pkg/velaql/providers/query/handler.go 49.49% <ø> (ø)

... and 11 files with indirect coverage changes

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

@suwliang3 suwliang3 changed the title [feature] Optimize application-resource-tree-view Feat: optimize "application-resource-tree-view" Jun 8, 2023
Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
@Somefive Somefive merged commit c0cbe24 into kubevela:master Jun 9, 2023
20 of 21 checks passed
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.

[Feature] Optimize "application-resource-tree-view" interface
2 participants