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
fix the eventingReady status change right after the backend switch #12312
fix the eventingReady status change right after the backend switch #12312
Conversation
Skipping CI for Draft Pull Request. |
…ting the publisherReady flag
✔️ 🥰 Documentation preview ready! 🥰 🔨 Explore the source changes: 14337c1 🔍 Inspect the deploy log: https://app.netlify.com/sites/kyma-project-docs-preview/deploys/61840c0393f808000825ccc2 😎 Browse the preview: https://deploy-preview-12312--kyma-project-docs-preview.netlify.app |
…correct-status-update-sequence
/test all |
@@ -1282,6 +1283,8 @@ func createSubscriptionObjectsAndWaitForReadiness(ctx context.Context, givenSubs | |||
// countBEBRequests returns how many requests for a given subscription are sent for each HTTP method | |||
func countBEBRequests(subscriptionName string) (countGet int, countPost int, countDelete int) { | |||
countGet, countPost, countDelete = 0, 0, 0 | |||
var mutex = &sync.Mutex{} |
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.
thats not how a mutex works. The idea is that all potential accessors of the mutexed resource, need to acquire the lock of the mutex. as only one can get this at a time the access to the resource is not access simultaneously
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.
I added a global RWMutex
components/eventing-controller/reconciler/subscription/beb/reconciler_test.go
Outdated
Show resolved
Hide resolved
…correct-status-update-sequence
components/eventing-controller/controllers/backend/reconciler_test.go
Outdated
Show resolved
Hide resolved
components/eventing-controller/controllers/backend/reconciler_test.go
Outdated
Show resolved
Hide resolved
@VladislavPaskar: The following tests 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. |
…yma-project#12312) * fix the eventingReady status change right after the backend switch * add pod's generation in the unit tests; check for pod status when setting the publisherReady flag * fix imports and codestyle * lock the beb.requests during the iteration * use RWmutex instead of the normal one * revert the sleep * reduce amount of nested loops, some code adjustments * fix imports * remove mutex, add early return * fix condition, improve for loops * update mocked pod's status * remove comment * bump the image to solve the security issue
…yma-project#12312) * fix the eventingReady status change right after the backend switch * add pod's generation in the unit tests; check for pod status when setting the publisherReady flag * fix imports and codestyle * lock the beb.requests during the iteration * use RWmutex instead of the normal one * revert the sleep * reduce amount of nested loops, some code adjustments * fix imports * remove mutex, add early return * fix condition, improve for loops * update mocked pod's status * remove comment * bump the image to solve the security issue
…yma-project#12312) * fix the eventingReady status change right after the backend switch * add pod's generation in the unit tests; check for pod status when setting the publisherReady flag * fix imports and codestyle * lock the beb.requests during the iteration * use RWmutex instead of the normal one * revert the sleep * reduce amount of nested loops, some code adjustments * fix imports * remove mutex, add early return * fix condition, improve for loops * update mocked pod's status * remove comment * bump the image to solve the security issue
Description
Changes proposed in this pull request:
Related issue(s)