-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ui: fix form data double fetch/reset form data by ownership selection #11705
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
base: 4.20
Are you sure you want to change the base?
ui: fix form data double fetch/reset form data by ownership selection #11705
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11705 +/- ##
==========================================
Coverage 16.17% 16.17%
- Complexity 13286 13297 +11
==========================================
Files 5656 5656
Lines 498015 498230 +215
Branches 60406 60456 +50
==========================================
+ Hits 80538 80579 +41
- Misses 408515 408681 +166
- Partials 8962 8970 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes apache#10832 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
938bd2c
to
204990e
Compare
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
…ownership selection Related apache#11705 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
UI build: ✔️ |
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.
clgtm, just one question; is there a possibility that during loading the ownership type changes from Accounts to Projects or vice versa? If so this could lead to an untimely this.initialized = true
.
@DaanHoogland I tried to look into this scenario. While in normal cases it shouldn't happen but it could happen when first listAccounts/listProjects is taking time, the user changes the owner type in the meantime and the new listAccounts/listProjects call finishes before the first call. Parent component won't reset/fetchData in this case. Maybe |
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
UI build: ✔️ |
this.initialized = true | ||
this.fetchOwnerData() |
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.
should this be
this.initialized = true | |
this.fetchOwnerData() | |
this.fetchOwnerData() | |
this.initialized = true |
or
this.initialized = true | |
this.fetchOwnerData() | |
this.initialized = false | |
this.fetchOwnerData() |
?
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 think it is fine as it is. The method changeAccountTypeOrDomain
will be called only when the user changes the value in the select boxes
this is quite an edge case and I am not sure how likely it is, but on busier systems it becomes more likely. I don’t think change domain should add the maybe we should use two separate mutexes? |
I don't think we need mutexes. Current changes will allow emitting |
@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
UI build: ✔️ |
ok, maybe I am seeing imaginary bears on the road. Let’s fix if a problem turns up. |
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.
clgtm
Description
Fixes #10832
Do not call form fetchData/resetData while OwnershipSelection is still initializing.
To prevent race conditions in
fetch-owner
signal emitted by OwnershipSelection, a request token is tracked.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?