-
Notifications
You must be signed in to change notification settings - Fork 903
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: tidy appHandler with serveral deprecation #6300
Conversation
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #6300 +/- ##
===========================================
- Coverage 66.30% 33.13% -33.18%
===========================================
Files 183 180 -3
Lines 23954 23770 -184
===========================================
- Hits 15883 7875 -8008
- Misses 6508 14912 +8404
+ Partials 1563 983 -580
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
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.
this is not a refactor, it's a deprecation with several API changes.
Yes, I've chanegd the title. |
@chivalryq It's still not clear, you'd better make a clarification about which features are deprecated. |
ping @wonderflow |
Description of your changes
This PR mainly have several effects:
PackagedWorkloadResources
andPackagedTraitResources
field in ComponentManifest. They are for helm-based component which has been depracated in schematic of ComponentDefinitionStandardWorkload -> ComponentOutput
andTraits -> ComponentOutputAndTraits
. The original names (StandardWorkload and Traits) can not reflect the actual usage of the fields.ComponentOutput
contains K8s resource generated from "output" block of ComponentDefinitionComponentOutputsAndTraits
contains both resources generated from "outputs" block of ComponentDefinition and resources generated from TraitDefinition🤖 Generated by Copilot at 70e261c
Summary
🚚🗑️🛠️
Refactored the appfile package and related packages to use a new data model for application components and their outputs. Renamed some structs and fields to align with the OAM spec and improve clarity. Simplified the application revision logic to use component manifests directly. Updated the tests and CLI commands to reflect the changes.
Walkthrough
StandardWorkload
toComponentOutput
andTraits
toComponentOutputsAndTraits
inComponentManifest
type to avoid confusion with OAM spec (link)prepareArtifactsData
andSetOAMContract
inpkg/appfile/appfile.go
(link, link)evalWorkloadWithContext
inpkg/appfile/appfile.go
andpkg/appfile/appfile_test.go
(link, link, link, link)PrepareBeforeApply
andHandleCheckManageWorkloadTrait
inpkg/controller/core.oam.dev/v1beta1/application/assemble/assemble.go
(link, link, link)generateManifest
inpkg/appfile/dryrun/diff.go
(link, link)PrintDryRun
inpkg/appfile/dryrun/dryrun.go
(link, link)TestGenerateAppRevision
andTestGenerateAppRevisionWithWorkflow
inpkg/controller/core.oam.dev/v1beta1/application/application_controller_test.go
(link, link)TestGenerateComponentFromCUEModule
,TestEvalWorkloadWithContext
,TestPrepareArtifactsData
, andTestGenerateComponentFromCUEModuleWithWorkflow
inpkg/appfile/appfile_test.go
(link, link, link, link, link)renderComponentsAndTraits
,getComponentResources
, andoverrideTraits
inpkg/controller/core.oam.dev/v1beta1/application/generator.go
(link, link, link, link)overrideTraits
toredirectTraitToLocalIfNeed
inpkg/controller/core.oam.dev/v1beta1/application/generator.go
to better reflect its purpose and update the reference inrenderComponentsAndTraits
(link, link)ProduceArtifacts
function and related constants and imports inpkg/controller/core.oam.dev/v1beta1/application/apply.go
andpkg/controller/core.oam.dev/v1beta1/application/revision.go
as they are no longer needed after refactoring the application revision logic to use the component manifests directly (link, link, link, link, link)ComputeComponentRevisionHash
function and related import inpkg/controller/core.oam.dev/v1beta1/application/revision.go
as it is no longer needed after refactoring the application revision logic to use the component revision name and hash labels (link, link)ProduceArtifacts
function in various tests inpkg/controller/core.oam.dev/v1beta1/application/revision_test.go
as the function is no longer needed and removed (link, link, link, link, link, link)debugComponents
function inreferences/cli/debug.go
to use the new field names ofComponentOutput
andComponentOutputsAndTraits
when creating the maps of components and traits from the component manifests (link)Fixes #
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Special notes for your reviewer