Skip to content
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

Support for dynamic pagination #3386

Merged
merged 12 commits into from
May 9, 2023

Conversation

MVarshini
Copy link
Contributor

PBENCH-732

Support /datasets/list pagination to improve scalability and robustness

@MVarshini MVarshini added the Dashboard Of and relating to the Dashboard GUI label Apr 17, 2023
@MVarshini MVarshini added this to the v0.72 milestone Apr 17, 2023
@MVarshini MVarshini self-assigned this Apr 17, 2023
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only a partial review (I'll try to resume tomorrow), but I wanted to post what I have so far. A couple of these are nits or small things, but some of them are significant.

dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dbutenhof
dbutenhof previously approved these changes Apr 19, 2023
Copy link
Member

@dbutenhof dbutenhof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase to pick up the package.json change that'll fix the build...

dashboard/src/actions/datasetListActions.js Show resolved Hide resolved
@dbutenhof
Copy link
Member

Needs a rebase to pick up the package.json change that'll fix the build...

Or not ... they've already pushed a fixed 21.1.0-1 even though the PR hasn't been merged, and the old dependency seems to be working again. 🍤

Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a lot of comments. Just work your way through them. Many of them are repeated call outs of the same issues in different code.

My biggest concern is your overhaul of the date picker component (which you don't mention in the description for this PR). I'm not sure what prompted it, and I'm concerned that it's not something that we want.

dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/modules/components/TableComponent/index.jsx Outdated Show resolved Hide resolved
dashboard/src/reducers/datasetListReducer.js Outdated Show resolved Hide resolved
dashboard/src/reducers/datasetListReducer.js Show resolved Hide resolved
@MVarshini
Copy link
Contributor Author

I have a lot of comments. Just work your way through them. Many of them are repeated call outs of the same issues in different code.

My biggest concern is your overhaul of the date picker component (which you don't mention in the description for this PR). I'm not sure what prompted it, and I'm concerned that it's not something that we want.

The Date Range filter is not working in the staging server and not able to find the root cause as it works well in the local. So, tried to revamp it.

Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update resolved a number of my comments -- thanks! However, a number of notable remain:

And, the rework of the DatePicker with respect to localtime vs. UTC, which I hope we can discuss in real-time tomorrow.

(And, there are a few open questions and smaller items.)

And, there are the two items, below. 🙂

dashboard/src/actions/types.js Outdated Show resolved Hide resolved
dashboard/src/reducers/datasetListReducer.js Outdated Show resolved Hide resolved
dbutenhof
dbutenhof previously approved these changes May 2, 2023
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're almost there!

  • I think we still need to address the problem of a size mismatch between the results array and the total number of results (e.g., if a result is deleted or added between when a user loads one page and tries to load another). Currently, the code allocates a new array of the appropriate size if the current array is zero-length; I think it should be allocating a new array any time the current array's length is different from the total number of results. This is because, if any results are added or removed, then the indices of the existing results might change, so their positions in the current array are likely to be incorrect, which will lead to problems displaying them (individual results will be lost, omitted, or displayed more than once). So, if we can detect a change in the results list, we should just dump our copy and reload it.
  • There's an off-by-one error in the data fetching which may result in refetching a page which we already have.
  • And there's some confusion (perhaps all on my part, for which I apologize) which it would be good to alleviate around the SET_PAGE_OFFSET Redux action: it should be renamed and the expression for its initial value should be changed.
  • There's an issue with the setting of the "next results index" when we're on the last page. I think it should probably be set to "last plus one". (I don't think it should be left pointing to its previous value.)

Beyond those, there are a couple of lingering nits (1, 2), but I'm not inclined to block the merge over them.

dashboard/src/reducers/datasetListReducer.js Outdated Show resolved Hide resolved
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, we're almost there.

Beyond those, I've some smaller things, like it seems like we're constructing new Date objects more than we need to.

dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
dashboard/src/assets/constants/browsingPageConstants.js Outdated Show resolved Hide resolved
dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
webbnh
webbnh previously approved these changes May 8, 2023
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think we got all the big stuff addressed. 🎉

However, you missed a couple of details in your last update, and I have one additional suggestion. I'll let you decide whether we should hold the merge for any of them.

dashboard/src/actions/datasetListActions.js Outdated Show resolved Hide resolved
Copy link
Member

@webbnh webbnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it! 🎉

@dbutenhof dbutenhof merged commit 54c53f2 into distributed-system-analysis:main May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Of and relating to the Dashboard GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants