-
Notifications
You must be signed in to change notification settings - Fork 386
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
🐛 Deflake TestWorkspaceController #2687
Conversation
[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 |
Looking into issue with the sharded setup |
Rather than using a destructive test that deletes the root shard, create a workspace with a location selector that initially matches nothing, then add a shard that will match. Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
3a8f3ee
to
b872cb2
Compare
@@ -141,7 +144,7 @@ func TestWorkspaceController(t *testing.T) { | |||
if workspace.Spec.Cluster == "" { | |||
return false, fmt.Sprintf("spec.cluster is empty\n%s", toYAML(t, workspace)) | |||
} | |||
if expected := previouslyValidShard.Spec.BaseURL + "/clusters/" + workspace.Spec.Cluster; workspace.Spec.URL != expected { | |||
if expected := rootShard.Spec.ExternalURL + "/clusters/" + workspace.Spec.Cluster; workspace.Spec.URL != expected { |
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.
Not quite sure why/how this was passing before. We always set the workspace's URL to $shardExternalURL/clusters/$clusterName
#2689 |
I think this change might be causing the various failures in the sharded setup. Will debug tomorrow |
/retest |
@ncdc: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
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. |
@sttts going to close this. Feel free to carry it forward if/as needed. |
Summary
Rather than using a destructive test that deletes the root shard, create a workspace with a location selector that initially matches nothing, then add a shard that will match.
NOTE: this deflakes but there is still a timing issue where the system can schedule a Workspace onto a shard that was just deleted (stale shard cache). That is being tracked separately in #2686
Related issue(s)
Fixes #2603