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

[ui-storagebrowser] converts snakecase keys to camel in useLoadData hook #4011

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ramprasadagarwal
Copy link
Collaborator

What changes were proposed in this pull request?

  • (Please fill in changes proposed in this fix)

How was this patch tested?

  • (Please explain how this patch was tested. Ex: unit tests, manual tests)
  • (If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)

Please review Hue Contributing Guide before opening a pull request.

@ramprasadagarwal ramprasadagarwal self-assigned this Feb 23, 2025
@ramprasadagarwal ramprasadagarwal marked this pull request as ready for review February 24, 2025 23:48
/>
{logsData && (logsData.logs.length === 0 || logsData.logs[0] === '') && (
{data && (data.logs.length === 0 || data.logs[0] === '') && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I know that this was not part of the changes, but can't it be that the firs line is an empty line (i.e. data.logs[0] === '') and there are still lines content after that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great catch, it does make lot of sense.
I am checking the old implementation and also with Ananya, Will share the findings soon.

Copy link
Collaborator

@bjornalm bjornalm left a comment

Choose a reason for hiding this comment

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

Nice work, just a question about the interface created

@@ -35,7 +35,7 @@ import ConfigureIcon from '@cloudera/cuix-core/icons/react/ConfigureIcon';
import { i18nReact } from '../../../../utils/i18nReact';
import huePubSub from '../../../../utils/huePubSub';
import './StorageBrowserActions.scss';
import { FileStats, FileSystem, StorageDirectoryTableData } from '../../types';
import { FileStats, HDFSFileSystemConfig, StorageDirectoryTableData } from '../../types';
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about S3, Azure, Ozone etc fileSystemConfig? Will each have its own config type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For now, we have config only for HDFS file system.
And, the keys of the config were very specific to HDFS like isHdfsSuperuser. So, I gave the interface the HDFS specific name for now, Will extend or refactor as the config structure grows in future.

In my understanding, config will be different for each file system (this is a assumption with my current knowledge).

@ramprasadagarwal ramprasadagarwal marked this pull request as draft February 27, 2025 14: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.

2 participants