Skip to content

Conversation

@devabhishekpal
Copy link
Contributor

@devabhishekpal devabhishekpal commented Jan 28, 2026

What changes were proposed in this pull request?

HDDS-14519. Setup hadoop-ui module for common UI code

Please describe your PR in detail:

  • This PR sets up the hadoop-ui module for the common UI code
  • It aims to provide a common place for shared UI components to be used and all the UI code to reside
  • The project is setup using Vite + TS + React and contains the required documentation to help future users setup

UI

We are separating out the SCM, OM, Recon UIs into it's own modules to contain specific code to these modules. We plan on adding DN UI into this as well in the future

The shared folder will contain common components and utility that can be shared across all the UIs like navbar, cards etc.

pnpm installs common dependencies and then based on the package.json hoists the dependencies into the sub-packages as required. This should reduce the build duration and the size.

CI

We have separated out the checkstyle from the basic check and handle it in a separate section.
Checkstyle check has been parallelized into Java and UI checks where the Java check runs maven checkstyle whereas the UI check run eslint.

This allows us to check linting for both the frontend and backend.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-14519

How was this patch tested?

Patch was tested by running install commands and test files to write dummy code in order to determine linters and rules are working properly

@adoroszlai
Copy link
Contributor

Thanks @devabhishekpal for working on this.

hadoop-ui is not covered by any CI checks, since this new directory is unknown to the existing scripts. We should run RAT (which will fail due to missing license headers) and any new UI-specific checks.

It should also be included in the binary release tarball for users and acceptance tests.

Also I think we can avoid hadoop- prefix, which was kept in other modules for historical reasons.

@devabhishekpal
Copy link
Contributor Author

Do you prefer we rename this to just ui?

Also will update the RAT checks, thanks for pointing it out.

We aren't including this in the binary yet, merging this to the feature branch first in order to make everything work properly as it is quite a large effort to migrate everything

@priyeshkaratha
Copy link
Contributor

priyeshkaratha commented Feb 3, 2026

Do you prefer we rename this to just ui?

Since this projects contains shared react components better to give names like ozone-ui

@devabhishekpal
Copy link
Contributor Author

@adoroszlai could you take another look?

RAT checks were enabled.
Here is where the checks had failed in the UI code and were fixed later.

Enabled lint for both UI and Java using eslint and mvn. Here is where UI checkstyle has failed along with the issues.

Updated the PR description for more information on the changes.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @devabhishekpal for continuing work on this.

@adoroszlai adoroszlai marked this pull request as draft February 11, 2026 10:26
@adoroszlai
Copy link
Contributor

Converted to draft because checkstyle (ui) is failing, to avoid running other checks uneccessarily.

@devabhishekpal
Copy link
Contributor Author

@adoroszlai could I get another review please?
The CI is passing now and I have addressed the comments.
eslint step runs only if JS related files are present, else it follows the normal CI

@adoroszlai
Copy link
Contributor

CI is passing now

bats and lint are failing:
https://github.com/devabhishekpal/ozone/actions/runs/21914864520

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @devabhishekpal for updating the patch.

@devabhishekpal
Copy link
Contributor Author

CI is passing now

bats and lint are failing: https://github.com/devabhishekpal/ozone/actions/runs/21914864520

Seems like I spoke too early
I fixed the issues you pointed out. Also the latest CI has passed.
Could you take another look at this please?
Thanks

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @devabhishekpal for updating the patch. Selective checks needs two minor tweaks, otherwise LGTM.

"\\.tsx?$"
"\\.jsx?$"
)
filter_changed_files
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
filter_changed_files
filter_changed_files true

true is required so that calculate_test_types_to_run does not trigger all real tests (acceptance, integration, kubernetes).

Also, we need to add ozone-ui here, otherwise it will be completely ignored:

SOURCES_TRIGGERING_TESTS=(
"^.github"
"^dev-support"
"^hadoop-hdds"
"^hadoop-ozone"
"^pom.xml"
)

You can verify locally by adding a test case temporarily (because the commit is from this PR and will be squashed, no longer valid on master):

--- dev-support/ci/selective_ci_checks.bats
+++ dev-support/ci/selective_ci_checks.bats
@@ -33,6 +33,18 @@
 load bats-support/load.bash
 load bats-assert/load.bash
 
+@test "UI code" {
+  run dev-support/ci/selective_ci_checks.sh b14ea65e381ca6e5b8d473359f34387e990867f9
+
+  assert_output -p 'basic-checks=["rat"]'
+  assert_output -p needs-build=false
+  assert_output -p needs-compile=false
+  assert_output -p needs-compose-tests=false
+  assert_output -p needs-integration-tests=false
+  assert_output -p needs-kubernetes-tests=false
+  assert_output -p needs-ui-lint=true
+}
+
 @test "checkstyle and bats" {
   run dev-support/ci/selective_ci_checks.sh 11b098430
 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup this works now.
Changes have been addressed in the latest commit

❯ bats dev-support/ci/selective_ci_checks.bats
selective_ci_checks.bats
 ✓ UI code
 ✓ checkstyle and bats
 ✓ compose only
 ✓ dashboard only
 ✓ compose and robot
 ✓ runner image update
 ✓ check script
 ✓ java test + pmd change
 ✓ integration and unit: java change
 ✓ integration and unit: script change
 ✓ script change including javadoc.sh
 ✓ script change including junit.sh
 ✓ unit only
 ✓ unit helper
 ✓ integration only
 ✓ native only
 ✓ native test in other module
 ✓ kubernetes only
 ✓ docs only
 ✓ main/java change
 ✓ ..../java change
 ✓ java and compose change
 ✓ java and docs change
 ✓ pom change
 ✓ CI lib change
 ✓ CI workflow change
 ✓ draft CI workflow change
 ✓ CI workflow change (check.yml)
 ✓ CI workflow change (ci.yaml)
 ✓ root README
 ✓ ignored code
 ✓ PR-title workflow
 ✓ compose README
 ✓ other README
 ✓ LICENSE
 ✓ IntelliJ config
 ✓ dependency helper
 ✓ properties file in resources

@adoroszlai adoroszlai marked this pull request as ready for review February 12, 2026 07:42
@adoroszlai adoroszlai changed the title HDDS-14519. Setup hadoop-ui module for common UI code HDDS-14519. Setup ozone-ui module for common UI code Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants