-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ui: Fix refresh and re-route behaviour #7846
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
Conversation
ui/src/views/AutogenView.vue
Outdated
this.items = json[responseName][objectName] | ||
if (!this.items || this.items.length === 0) { | ||
this.items = [] | ||
} | ||
this.itemCount = apiItemCount | ||
if (this.itemCount !== this.items.length) { | ||
console.log('WARN: API items length does not match the API return count, something is wrong') |
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.
this is one part that needs testing, I observed it a few times
@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
UI build: ✔️ |
Codecov Report
@@ Coverage Diff @@
## 4.18 #7846 +/- ##
=========================================
Coverage 13.06% 13.06%
Complexity 9088 9088
=========================================
Files 2720 2720
Lines 257391 257391
Branches 40130 40130
=========================================
Hits 33621 33621
Misses 219548 219548
Partials 4222 4222 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@rohityadavcloud , I'll test but I have my doubt because of the following; If you reroute it will not help to cancel any outstanding APIs. These are still being executed and I am unsure of the value of the concept of "cancel". Can you explain that? |
@DaanHoogland in case of the UI, routing/re-routing, refer to the browser/history URL change; when we move from one list view or resource view to any other, the AutogenView is the same component that render such views; since it's the same component it doesn't unmount/recreated, and any previous APIs (list APIs generally) fired by the fetchData() may return and call the handler (see the api() in fetchData()) which can mess the new list/resource view and cause it to update its Due to this side effect, something like this can be produced https://www.loom.com/share/97225b22110944b689687409729f2938?sid=435ff224-bb2c-4d14-8ab1-867d91352cfe |
@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
f9c0b92
to
a71a28f
Compare
UI build: ✔️ |
cc @shwstppr @Pearl1594 I'll need some help to fix the failing UI unit tests - any tips or assistance you can offer? |
cc @nvazquez - if you can advise/assist on the failing unit tests, thanks. |
685ccef
to
c9e52d6
Compare
Signed-off-by: Rohit Yadav <[email protected]>
@blueorangutan package |
@rohityadavcloud a [SF] Jenkins job has been kicked to build packages. It will be bundled with@blueorangutan ui SystemVM template(s). I'll keep you posted as I make progress. |
@rohityadavcloud a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
UI build: ✔️ |
@blueorangutan package |
@DaanHoogland a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6888 |
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6890 |
I think this is no issue in this code. can we merge @weizhouapache @rohityadavcloud ? |
@DaanHoogland that could a notification regression or somehow things got opened in a new tab / refreshed, I've noticed that too (but not related to changes in autogenview) |
@DaanHoogland I've asked @andrijapanicsb to confirm testing, perhaps @GutoVeronezi was testing as well - appreciate all the QA, feedback we can get on this. Thanks. |
@DaanHoogland |
Wait for it... give me 1h |
Reproduction with high load on the mgmt server and 400+ VMs in DB Issues does NOT happen after upgrading to packages from this PR: |
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.
LGTM
ok, merging. @GutoVeronezi if you find anything please open a new issue on that? thanks |
This introduces change in AutogenView to do the following:
Fixes #7840
How was this tested?
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?