-
Notifications
You must be signed in to change notification settings - Fork 391
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
🐛 change state to pending state in case no corresponding APIResourceImp… #2931
Conversation
…ort object is found
cc: @lionelvillard |
Hi @rahulii. Thanks for your PR. I'm waiting for a kcp-dev member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
/retest |
@lionelvillard I fixed the unit test.. but are these e2e test failing due to the changes made? |
I think they might be yes. Could it be that the, according to your changes, the stated expected in the following test should be now be Maybe we need to add some cases in these tests, to differentiate between these 2 states that previously were only one ? |
/retest |
@davidfestal @lionelvillard PTAL! |
pkg/reconciler/workload/synctargetexports/synctargetcompatible_reconcile_test.go
Show resolved
Hide resolved
@@ -116,7 +116,7 @@ func TestSyncTargetExport(t *testing.T) { | |||
} | |||
|
|||
if syncTarget.Status.SyncedResources[0].Resource != "cowboys" || | |||
syncTarget.Status.SyncedResources[0].State != workloadv1alpha1.ResourceSchemaIncompatibleState { | |||
syncTarget.Status.SyncedResources[0].State != workloadv1alpha1.ResourceSchemaPendingState { |
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.
Since we're not testing the incompatible state anymore, maybe an additional resource could be added that would be incompatible.
This could be done by:
- creating an additional APIExport with 1 APIResourceSchema in a workspace
- adding this APIExport in the list of APIExports of the SyncerFixture
- adding the same CRD in the physical cluster (by
WithDownstreamPreparation
when creating the SyncerFixture), but with a small field of the CRD schema changed (for example changing string to int) - checking that this resource on the Synctarget is in the Incompatible state
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.
@davidfestal is this needs to be part of same PR?
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/close |
@mjudeikis: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
…ort object is found
Summary
This PR changes the state of syncedResources to Pending (earllier it was Incompatible) in case no corresponding APIResourceImport object is found!
Related issue(s)
Fixes kcp-dev/contrib-tmc#28