projectcapsule / capsule

Multi-tenancy and policy-based framework for Kubernetes.
https://capsule.clastix.io
Apache License 2.0
1.55k stars 153 forks source link

bug(e2e): Tenant Replications #1168

Open oliverbaehler opened 3 weeks ago

oliverbaehler commented 3 weeks ago

Bug description

The e2e tests for the tenant replications often fail:

Summarizing 1 Failure:
  [FAIL] Creating a GlobalTenantResource object [It] should replicate resources to all Tenants
  /home/runner/work/capsule/capsule/e2e/globaltenantresource_test.go:276

They should be fixed, so we can rely on the status of our pipeline

prometherion commented 3 weeks ago

I witnessed this failure several times, despite the feature working as expected.

This could be a nice issue for newcomers, happy to share more information on how to debug the failure and provide a fix, definitely something's race-ish.

dev-saw99 commented 1 week ago

Hi @prometherion ,

I'd like to work on this issue. Could you please provide more details on how to reproduce the failure and any tips for debugging?

Looking forward to contributing!

prometherion commented 15 hours ago

Sorry for this late answer, @dev-saw99!

Unfortunately, I've no idea why this is happening 😢

What I could suggest is trying back and for the incriminated test: after setting up the local environment, you can easily do this with the following command: ./bin/ginkgo run -v --tags=e2e --focus 'should replicate resources to all Tenants' ./e2e

Upon a failure, Capsule logs and current state must be investigated since I guess something raceish is happening 🤔