Skip to content

Conversation

@artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Oct 22, 2024

Closes #1485

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
134 133 0 1 0

Bundle Size: ✅

Current: 79.04 MB | Main: 79.03 MB
Diff: +0.00 MB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@artemmufazalov artemmufazalov changed the title fix: fields required in all storage and nodes requests fix: fields required in all groups and nodes requests Oct 22, 2024
}, new Set<RequiredField>());

return Array.from(requiredFieldsSet);
return Array.from(requiredFieldsSet).sort();
Copy link
Member Author

Choose a reason for hiding this comment

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

Sort to ensure no additional requests when order changes.

Example:
Columns [DiskSpace, Read], data fields [State, Read]
Columns [Read, State], data fields [Read, State]

Although it's the same data, it will be requested twice, because of different state keys ("fieldsRequired:State,Read" vs "fieldsRequired:Read,State"

const groupQuery = storageApi.useGetStorageGroupsInfoQuery(
valueIsDefined(groupId) ? {groupId, shouldUseGroupsHandler, with: 'all'} : skipToken,
valueIsDefined(groupId)
? {groupId, shouldUseGroupsHandler, with: 'all', fieldsRequired: 'all'}
Copy link
Member Author

Choose a reason for hiding this comment

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

Only 1 group is requested here and we need all its data

groupId,
pDiskId,
shouldUseGroupsHandler: groupsHandlerAvailable,
fieldsRequired: 'all',
Copy link
Member Author

@artemmufazalov artemmufazalov Oct 22, 2024

Choose a reason for hiding this comment

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

It's possible to request data based on columns for not paginated storage. However, there is a problem: when you update columns, needed data fields are updated and data reloaded. For paginated table it isn't the issue, because it loads only 50 entities, but for not paginated tables requests take to long to load, so we need to avoid data reloads if possible.

I expect, that soon enough we will fix all issues with PaginatedTable and could get rid of DataTable in Storage

@artemmufazalov artemmufazalov added this pull request to the merge queue Oct 23, 2024
Merged via the queue into main with commit a9f79a3 Oct 23, 2024
7 checks passed
@artemmufazalov artemmufazalov deleted the 1485-request-only-needed-fields branch October 23, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request only needed fields in all storage and nodes requests (fields_required param)

3 participants