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

Chore: remove schematic kube and helm #6099

Merged

Conversation

Somefive
Copy link
Collaborator

@Somefive Somefive commented Jun 9, 2023

Description of your changes

Continue #6095
Progress on #5702

🤖 Generated by Copilot at a17a6ca

Summary

🗑️🛠️📊

This pull request simplifies the core APIs and CRDs by removing unused or deprecated types, fields, and imports. It also adds a profiling server option to the core component and moves a type from apis to cli package.

The core APIs had some fields to prune
So they removed helm and kube from schematic
They also cleaned up common and Capability
And simplified ResourceTracker and Revision
Now the code is more concise and less erratic

Walkthrough

  • Remove Kube and KubeParameter types and their methods from common package and update Schematic type to only include CUE and Terraform fields (link, link, link, link, link)
  • Remove WorkflowState type and its constants from common package and move them to vela-system package (link)
  • Remove RawComponent type from common package (link)
  • Remove Helm type and its methods from common package (link, link)
  • Remove Status field and its methods from ResourceTracker type in v1beta1 package and change the receivers of other methods from value to pointer (link, link, link, link, link, link, link, link, link)
  • Remove addClusterObjectReference and AddTrackedResource methods from ResourceTracker type in v1beta1 package (link)
  • Remove github.com/oam-dev/kubevela/apis/interfaces import from v1beta1 package (link)
  • Remove HelmCategory and KubeCategory constants and SetFlagBy function from types package (link, link)
  • Remove KubeTemplate and KubeParameter fields from Capability type in types package (link)
  • Remove github.com/oam-dev/kubevela/pkg/utils import from app package (link)
  • Remove github.com/coreos/prometheus-operator import from go.mod (link)
  • Remove helm and kube fields from the output and outputs schemas of the ApplicationRevision CRD in charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml (link, link, link, link, link)
  • Remove helm and kube fields from the schematic schema of the ComponentDefinition, DefinitionRevision, PolicyDefinition, ResourceTracker, TraitDefinition, and WorkflowStepDefinition CRDs in charts/vela-core/crds (link, link, link, link, link, link, link, link, link)
  • Replace PprofAddr flag with profiling server flag in options package and update CoreOptions type and its methods accordingly (link, link, link, link, link, link, link)
  • Replace pprof server logic with profiling server logic in run function in app package (link, link)
  • Update RegistryConfig type to use cli package instead of apis package in e2e package and update the import accordingly (link, link)
  • Delete apis/interfaces/resourcetracker.go file as it was no longer used by the core logic (link)
  • Delete apis/types/workflow.go file as it was no longer used by the core logic (link)

Fixes #

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

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
@Somefive Somefive changed the title Chore/remove schematic kube and helm Chore: remove schematic kube and helm Jun 9, 2023
@Somefive Somefive marked this pull request as draft June 9, 2023 03:24
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch coverage: 80.48% and project coverage change: +0.01 🎉

Comparison is base (c255d21) 66.46% compared to head (1514a58) 66.47%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6099      +/-   ##
==========================================
+ Coverage   66.46%   66.47%   +0.01%     
==========================================
  Files         191      184       -7     
  Lines       24780    24016     -764     
==========================================
- Hits        16469    15965     -504     
+ Misses       6711     6488     -223     
+ Partials     1600     1563      -37     
Flag Coverage Δ
core-unittests 55.54% <43.90%> (+0.38%) ⬆️
e2e-multicluster-test 31.23% <41.46%> (+0.46%) ⬆️
e2etests 32.72% <14.28%> (-0.90%) ⬇️

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

Impacted Files Coverage Δ
pkg/appfile/appfile.go 67.51% <ø> (-2.32%) ⬇️
pkg/appfile/template.go 45.00% <ø> (-12.59%) ⬇️
pkg/auth/round_trippers.go 91.30% <0.00%> (ø)
pkg/controller/utils/utils.go 88.00% <ø> (ø)
pkg/multicluster/cluster_management.go 32.89% <ø> (-2.72%) ⬇️
pkg/policy/envbinding/patch.go 70.76% <ø> (+5.52%) ⬆️
pkg/policy/envbinding/placement.go 31.42% <ø> (-57.33%) ⬇️
pkg/utils/errors/resourcetracker.go 0.00% <ø> (ø)
pkg/utils/helm/helm.go 39.47% <ø> (+31.82%) ⬆️
pkg/utils/json.go 100.00% <ø> (+42.85%) ⬆️
... and 14 more

... and 17 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.

@Somefive Somefive force-pushed the chore/remove-schematic-kube-and-helm branch from a17a6ca to a6cb05e Compare June 9, 2023 03:46
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
@Somefive Somefive force-pushed the chore/remove-schematic-kube-and-helm branch from a6cb05e to 1514a58 Compare June 9, 2023 06:50
@Somefive Somefive marked this pull request as ready for review June 9, 2023 07:19

package utils

import (
Copy link
Member

Choose a reason for hiding this comment

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

Why are we removing the whole pprof module?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@FogDong FogDong merged commit f1bae16 into kubevela:master Jun 12, 2023
22 checks passed
@Somefive Somefive mentioned this pull request Jun 12, 2023
4 tasks
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

3 participants