Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

don't block app from running if no definition found #267

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

wonderflow
Copy link
Member

fix #82

@@ -453,7 +457,10 @@ func (w Workload) Status() v1alpha2.WorkloadStatus {
Traits: make([]v1alpha2.WorkloadTrait, len(w.Traits)),
Scopes: make([]v1alpha2.WorkloadScope, len(w.Scopes)),
}
for i := range w.Traits {
for i, tr := range w.Traits {
if tr.Definition.Name == util.Dummy && tr.Definition.Spec.Reference.Name == util.Dummy {
Copy link
Member

Choose a reason for hiding this comment

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

It seems that this only applies to traits. What about workloads?

Copy link
Member Author

Choose a reason for hiding this comment

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

we don't check workloadDef when apply worklaod.

Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
Copy link
Member

@hongchaodeng hongchaodeng left a comment

Choose a reason for hiding this comment

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

lgtm

@hongchaodeng hongchaodeng merged commit d992f48 into crossplane:master Oct 26, 2020
@wonderflow wonderflow deleted the fixig branch October 26, 2020 04:23
@wonderflow wonderflow restored the fixig branch October 26, 2020 05:15
@wonderflow wonderflow deleted the fixig branch October 26, 2020 05:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't block if traitDefinition or workloadDefinition not exist
2 participants