-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-14519. Setup ozone-ui module for common UI code #9684
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
base: HDDS-11541
Are you sure you want to change the base?
Conversation
|
Thanks @devabhishekpal for working on this.
It should also be included in the binary release tarball for users and acceptance tests. Also I think we can avoid |
|
Do you prefer we rename this to just 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 |
Since this projects contains shared react components better to give names like ozone-ui |
|
@adoroszlai could you take another look? RAT checks were enabled. 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. |
adoroszlai
left a comment
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.
Thanks @devabhishekpal for continuing work on this.
|
Converted to draft because |
|
@adoroszlai could I get another review please? |
|
adoroszlai
left a comment
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.
Thanks @devabhishekpal for updating the patch.
Seems like I spoke too early |
adoroszlai
left a comment
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.
Thanks @devabhishekpal for updating the patch. Selective checks needs two minor tweaks, otherwise LGTM.
| "\\.tsx?$" | ||
| "\\.jsx?$" | ||
| ) | ||
| filter_changed_files |
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.
| 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:
ozone/dev-support/ci/selective_ci_checks.sh
Lines 166 to 172 in b14ea65
| 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
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.
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
What changes were proposed in this pull request?
HDDS-14519. Setup hadoop-ui module for common UI code
Please describe your PR in detail:
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