Refactor: capabilities and workload in appfile parsing #6250
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Qiaozp [email protected]
Description of your changes
Main changes are:
🤖 Generated by Copilot at d4d2734
Summary
🚚🛠️📝
Refactor the appfile package and related controllers to use the
Component
andParsedComponents
types instead of theWorkload
andWorkloads
types, and remove unused or deprecated code related to helm charts, CRDs, and labels. This improves the consistency, readability, and maintainability of the code and aligns with the application model.Walkthrough
types
andCapability
packages (link, link, link)oamv1beta1
package in theserver
package (link, link)dry-run
anddiff
commands in theplugin
test, fromComponent
toParsedComponents
(link, link, link, link, link, link, link)mods
package, fromBuilt-in Component Type
toBuilt-in ParsedComponents Type
(link)Workload
type toComponent
and theWorkloads
field toParsedComponents
in theappfile
package, and remove unused fields and parameters (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)newAppFile
,parseComponents
,parseWorkflowSteps
,fetchAndSetWorkflowStepDefinition
,makeComponent
,convertTemplate2Component
,ParseComponentFromRevision
,ParseComponentFromRevisionAndClient
, andparseWorkflowStepsForLegacyRevision
functions in theappfile
package (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)appfile
package to use theComponent
andParsedComponents
types (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)ValidateCUESchematicAppfile
andnewValidationProcessContext
functions in theappfile
package to use theComponent
type (link, link, link)application
controller to use theParsedPolicies
andComponent
types (link, link)apply
andgenerator
functions in theapplication
controller to use theComponent
type and change the parameter and return types accordingly (link, link, link, link, link, link, link, link, link, link, link, link, link, link)revision
functions in theapplication
controller to use theParsedComponents
andParsedPolicies
types (link, link, link)oam
package (link, link, link, link, link)WorkloadRenderer
type alias in theoam
package to use theComponent
type (link)fakeWorkloadRenderer
function in theterraform
test to use theComponent
type (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