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

🐛 change state to pending state in case no corresponding APIResourceImp… #2931

Closed
wants to merge 3 commits into from

Conversation

rahulii
Copy link

@rahulii rahulii commented Mar 29, 2023

…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

@rahulii
Copy link
Author

rahulii commented Mar 29, 2023

cc: @lionelvillard

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 29, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 29, 2023

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 29, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign davidfestal for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lionelvillard
Copy link
Contributor

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 29, 2023
@rahulii
Copy link
Author

rahulii commented Mar 30, 2023

/retest

@rahulii
Copy link
Author

rahulii commented Mar 30, 2023

@lionelvillard I fixed the unit test.. but are these e2e test failing due to the changes made?

@davidfestal
Copy link
Member

davidfestal commented Mar 30, 2023

@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 Pending instead of Incompatible : https://github.com/kcp-dev/kcp/blob/main/test/e2e/reconciler/locationworkspace/synctarget_test.go#L119 ?

Maybe we need to add some cases in these tests, to differentiate between these 2 states that previously were only one ?

@rahulii
Copy link
Author

rahulii commented Mar 31, 2023

/retest

@rahulii
Copy link
Author

rahulii commented Apr 4, 2023

@davidfestal @lionelvillard PTAL!

@@ -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 {
Copy link
Member

@davidfestal davidfestal Apr 4, 2023

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

Copy link
Author

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?

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 4, 2023
@openshift-merge-robot
Copy link
Contributor

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.

@kcp-ci-bot
Copy link
Contributor

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.

@kcp-ci-bot kcp-ci-bot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 23, 2023
@ncdc ncdc removed their request for review January 29, 2024 17:40
@mjudeikis
Copy link
Contributor

/close
TMC related

@kcp-ci-bot kcp-ci-bot closed this Mar 25, 2024
@kcp-ci-bot
Copy link
Contributor

@mjudeikis: Closed this PR.

In response to this:

/close
TMC related

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: syncedResources state should be Pending when APIResourceImport is missing
6 participants