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

🐛 Update EventuallyTimeout in work_workload_test.go #380

Conversation

xuezhaojun
Copy link
Member

@xuezhaojun xuezhaojun commented Mar 19, 2024

Summary

In some e2e run, we got the fail msg:

I0318 15:04:17.916169   14492 common.go:823] manifestWork e2e-managedcluster-58mwkx/work-f4gvm : v1.ManifestWork{TypeMeta:v1.TypeMeta{Kind:"ManifestWork", APIVersion:"work.open-cluster-management.io/v1"}, ObjectMeta:v1.ObjectMeta{Name:"work-f4gvm", GenerateName:"", Namespace:"e2e-managedcluster-58mwkx", SelfLink:"", UID:"8d0f59e2-c7e7-4d14-b98a-f6b8b6e449ce", ResourceVersion:"22980", Generation:1, CreationTimestamp:time.Date(2024, time.March, 18, 15, 3, 17, 0, time.Local), DeletionTimestamp:<nil>, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"created-for-testing":"true"}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string{"cluster.open-cluster-management.io/manifest-work-cleanup"}, ManagedFields:[]v1.ManagedFieldsEntry{v1.ManagedFieldsEntry{Manager:"e2e.test", Operation:"Update", APIVersion:"work.open-cluster-management.io/v1", Time:time.Date(2024, time.March, 18, 15, 3, 17, 0, time.Local), FieldsType:"FieldsV1", FieldsV1:(*v1.FieldsV1)(0xc000dc40c0), Subresource:""}, v1.ManagedFieldsEntry{Manager:"work", Operation:"Update", APIVersion:"work.open-cluster-management.io/v1", Time:time.Date(2024, time.March, 18, 15, 3, 17, 0, time.Local), FieldsType:"FieldsV1", FieldsV1:(*v1.FieldsV1)(0xc000dc40f0), Subresource:""}, v1.ManagedFieldsEntry{Manager:"work", Operation:"Update", APIVersion:"work.open-cluster-management.io/v1", Time:time.Date(2024, time.March, 18, 15, 4, 17, 0, time.Local), FieldsType:"FieldsV1", FieldsV1:(*v1.FieldsV1)(0xc000dc4120), Subresource:"status"}}}, Spec:v1.ManifestWorkSpec{Workload:v1.ManifestsTemplate{Manifests:[]v1.Manifest{v1.Manifest{RawExtension:runtime.RawExtension{Raw:[]uint8{0x7b, 0x22, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x76, 0x31, 0x22, 0x2c, 0x22, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x3a, 0x22, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2c, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x7b, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x62, 0x75, 0x73, 0x79, 0x62, 0x6f, 0x78, 0x22, 0x2c, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3a, 0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0x7d, 0x2c, 0x22, 0x73, 0x70, 0x65, 0x63, 0x22, 0x3a, 0x7b, 0x22, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x73, 0x22, 0x3a, 0x31, 0x2c, 0x22, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x3a, 0x7b, 0x22, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x61, 0x70, 0x70, 0x22, 0x3a, 0x22, 0x62, 0x75, 0x73, 0x79, 0x62, 0x6f, 0x78, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x22, 0x3a, 0x7b, 0x7d, 0x2c, 0x22, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x3a, 0x7b, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3a, 0x7b, 0x22, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x3a, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x3a, 0x7b, 0x22, 0x61, 0x70, 0x70, 0x22, 0x3a, 0x22, 0x62, 0x75, 0x73, 0x79, 0x62, 0x6f, 0x78, 0x22, 0x7d, 0x7d, 0x2c, 0x22, 0x73, 0x70, 0x65, 0x63, 0x22, 0x3a, 0x7b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, 0x3a, 0x5b, 0x22, 0x73, 0x68, 0x22, 0x2c, 0x22, 0x2d, 0x63, 0x22, 0x2c, 0x22, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x20, 0x33, 0x36, 0x30, 0x30, 0x22, 0x5d, 0x2c, 0x22, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x3a, 0x22, 0x71, 0x75, 0x61, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x73, 0x6d, 0x61, 0x63, 0x64, 0x6f, 0x2f, 0x62, 0x75, 0x73, 0x79, 0x62, 0x6f, 0x78, 0x22, 0x2c, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x22, 0x62, 0x75, 0x73, 0x79, 0x62, 0x6f, 0x78, 0x22, 0x2c, 0x22, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x50, 0x6f, 0x72, 0x74, 0x22, 0x3a, 0x38, 0x30, 0x7d, 0x5d, 0x2c, 0x22, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x3a, 0x7b, 0x7d, 0x7d, 0x5d, 0x7d, 0x7d, 0x7d, 0x2c, 0x22, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x3a, 0x7b, 0x7d, 0x7d}, Object:runtime.Object(nil)}}}}, DeleteOption:(*v1.DeleteOption)(nil), ManifestConfigs:[]v1.ManifestConfigOption{v1.ManifestConfigOption{ResourceIdentifier:v1.ResourceIdentifier{Group:"apps", Resource:"deployments", Name:"busybox", Namespace:"default"}, FeedbackRules:[]v1.FeedbackRule{v1.FeedbackRule{Type:"WellKnownStatus", JsonPaths:[]v1.JsonPath(nil)}, v1.FeedbackRule{Type:"JSONPaths", JsonPaths:[]v1.JsonPath{v1.JsonPath{Name:"AvailableCondition", Version:"", Path:".status.conditions[?(@.type==\"Available\")].status"}}}}, UpdateStrategy:(*v1.UpdateStrategy)(nil)}}, Executor:(*v1.ManifestWorkExecutor)(nil)}, Status:v1.ManifestWorkStatus{Conditions:[]v1.Condition{v1.Condition{Type:"Applied", Status:"True", ObservedGeneration:1, LastTransitionTime:time.Date(2024, time.March, 18, 15, 3, 17, 0, time.Local), Reason:"AppliedManifestWorkComplete", Message:"Apply manifest work complete"}, v1.Condition{Type:"Available", Status:"True", ObservedGeneration:1, LastTransitionTime:time.Date(2024, time.March, 18, 15, 3, 17, 0, time.Local), Reason:"ResourcesAvailable", Message:"All resources are available"}}, ResourceStatus:v1.ManifestResourceStatus{Manifests:[]v1.ManifestCondition{v1.ManifestCondition{ResourceMeta:v1.ManifestResourceMeta{Ordinal:0, Group:"apps", Version:"v1", Kind:"Deployment", Resource:"deployments", Name:"busybox", Namespace:"default"}, StatusFeedbacks:v1.StatusFeedbackResult{Values:[]v1.FeedbackValue{v1.FeedbackValue{Name:"ReadyReplicas", Value:v1.FieldValue{Type:"Integer", Integer:(*int64)(0xc000b74d40), String:(*string)(nil), Boolean:(*bool)(nil), JsonRaw:(*string)(nil)}}, v1.FeedbackValue{Name:"Replicas", Value:v1.FieldValue{Type:"Integer", Integer:(*int64)(0xc000b74d60), String:(*string)(nil), Boolean:(*bool)(nil), JsonRaw:(*string)(nil)}}, v1.FeedbackValue{Name:"AvailableReplicas", Value:v1.FieldValue{Type:"Integer", Integer:(*int64)(0xc000b74e18), String:(*string)(nil), Boolean:(*bool)(nil), JsonRaw:(*string)(nil)}}, v1.FeedbackValue{Name:"AvailableCondition", Value:v1.FieldValue{Type:"String", Integer:(*int64)(nil), String:(*string)(0xc00096ee70), Boolean:(*bool)(nil), JsonRaw:(*string)(nil)}}}}, Conditions:[]v1.Condition{v1.Condition{Type:"Applied", Status:"True", ObservedGeneration:0, LastTransitionTime:time.Date(2024, time.March, 18, 15, 3, 17, 0, time.Local), Reason:"AppliedManifestComplete", Message:"Apply manifest complete"}, v1.Condition{Type:"Available", Status:"True", ObservedGeneration:0, LastTransitionTime:time.Date(2024, time.March, 18, 15, 3, 17, 0, time.Local), Reason:"ResourceAvailable", Message:"Resource is available"}, v1.Condition{Type:"StatusFeedbackSynced", Status:"True", ObservedGeneration:0, LastTransitionTime:time.Date(2024, time.March, 18, 15, 3, 17, 0, time.Local), Reason:"StatusFeedbackSynced", Message:""}}}}}}} 
  [FAILED] in [It] - /go/src/github.com/stolostron/ocm/vendor/github.com/onsi/gomega/internal/async_assertion.go:151 @ 03/18/24 15:04:17.916
  STEP: delete manifestwork e2e-managedcluster-58mwkx/work-f4gvm @ 03/18/24 15:04:17.916
• [FAILED] [65.274 seconds]
Work agent ManifestWork status feedback [It] should return wellkown status of deployment [work-agent, sanity-check]
/go/src/github.com/stolostron/ocm/test/e2e/work_workload_test.go:535
  [FAILED] Timed out after 60.001s.
  Unexpected error:
      <*errors.errorString | 0xc000c16390>: 
      status feedback values are not correct, we got [{Replicas {Integer 0xc000a78660 <nil> <nil> <nil>}} {AvailableCondition {String <nil> 0xc000c16270 <nil> <nil>}}]
      {
          s: "status feedback values are not correct, we got [{Replicas {Integer 0xc000a78660 <nil> <nil> <nil>}} {AvailableCondition {String <nil> 0xc000c16270 <nil> <nil>}}]",
      }
  occurred
  In [It] at: /go/src/github.com/stolostron/ocm/vendor/github.com/onsi/gomega/internal/async_assertion.go:151 @ 03/18/24 15:04:17.916

From the debug msg, we can see all expected feedback values exists, that means the case fail because it doesn't wait for enough time.

The key debug msg, you can see all four expected values:

StatusFeedbacks:v1.StatusFeedbackResult{Values:[]v1.FeedbackValue{
v1.FeedbackValue{Name:"ReadyReplicas", Value:v1.FieldValue{Type:"Integer", Integer:(*int64)(0xc000b74d40), String:(*string)(nil), Boolean:(*bool)(nil), JsonRaw:(*string)(nil)}}, 
v1.FeedbackValue{Name:"Replicas", Value:v1.FieldValue{Type:"Integer", Integer:(*int64)(0xc000b74d60), String:(*string)(nil), Boolean:(*bool)(nil), JsonRaw:(*string)(nil)}}, 
v1.FeedbackValue{Name:"AvailableReplicas", Value:v1.FieldValue{Type:"Integer", Integer:(*int64)(0xc000b74e18), String:(*string)(nil), Boolean:(*bool)(nil), JsonRaw:(*string)(nil)}}, 
v1.FeedbackValue{Name:"AvailableCondition", Value:v1.FieldValue{Type:"String", Integer:(*int64)(nil), String:(*string)(0xc00096ee70), Boolean:(*bool)(nil), JsonRaw:(*string)(nil)}}}}

Signed-off-by: GitHub <noreply@github.com>
@openshift-ci openshift-ci bot requested review from ldpliu and skeeey March 19, 2024 03:12
@xuezhaojun
Copy link
Member Author

/assign @zhujian7

@xuezhaojun
Copy link
Member Author

/assign @qiujian16
Looking for approval.

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.40%. Comparing base (2cd6a6f) to head (3649952).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #380   +/-   ##
=======================================
  Coverage   61.40%   61.40%           
=======================================
  Files         132      132           
  Lines       14061    14061           
=======================================
  Hits         8634     8634           
  Misses       4672     4672           
  Partials      755      755           
Flag Coverage Δ
unit 61.40% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Mar 19, 2024
Copy link
Contributor

openshift-ci bot commented Mar 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, xuezhaojun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 693787d into open-cluster-management-io:main Mar 19, 2024
14 checks passed
@xuezhaojun xuezhaojun deleted the fix-e2e-fail-on-manifestwork-feedback branch March 19, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants