-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore(ui): reduce intial loading with assets via adding compression #25576
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
Conversation
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
...metadata-service/src/main/java/org/openmetadata/service/socket/OpenMetadataAssetServlet.java
Fixed
Show fixed
Hide fixed
...metadata-service/src/main/java/org/openmetadata/service/socket/OpenMetadataAssetServlet.java
Fixed
Show fixed
Hide fixed
|
Gitar fix CI |
- Fix import ordering by moving static imports to the end - Add path traversal validation to prevent security vulnerability - Normalize paths and validate against resource directory to prevent directory traversal attacks - Handle null returns from getPathToCheck for invalid paths Co-authored-by: chirag-madlani <[email protected]>
✅ CI issues fixed! Changes made:
What was fixed:
The integration test failure ( |
🔍 CI failure analysis for 4baebd3: CI failures: Python 3.10 & 3.11 S3 tests (AWS SDK issue - recurring), Playwright (17 flaky tests). All unrelated to PR.IssueMultiple CI test failures - Python (both 3.10 & 3.11) and Playwright tests Failure 1: Python 3.10 - S3 Storage TestRoot Cause: AWS SDK Version Mismatch Error: Test: Note: Recurring environmental issue across commits Failure 2: Python 3.11 - S3 Storage Test (NEW)Root Cause: Same AWS SDK Issue Error: Test: Note: Same "7 Errors" pattern - AWS SDK/CloudWatch metrics issue affecting both Python 3.10 and 3.11 Failures 3 & 4: Playwright (2 shards)Shard 6/6: 1 failed, 6 flaky (passed on retry), 526 passed Total: 17 flaky tests (all passed on retry) Combined SummaryTotal:
Assessment: All failures are infrastructure/test environment issues unrelated to PR's HTTP asset compression changes (Brotli/Gzip). Code Review ✅ Approved 3 resolved / 3 findingsWell-implemented compression feature with proper security controls, Accept-Encoding handling, and comprehensive test coverage. No significant issues found. ✅ 3 resolved✅ Quality: Silent exception swallowing hides errors
✅ Edge Case: Accept-Encoding parsing doesn't handle q-values properly
✅ Security: Path traversal check may be bypassed with resource: URLs
Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
|



This pull request enhances the static asset serving capabilities of the OpenMetadata backend by adding support for Brotli and Gzip pre-compressed assets, prioritizing Brotli when available. It also introduces comprehensive tests to ensure correct behavior and updates the build pipeline to generate and handle Brotli-compressed files.
Asset Serving Improvements:
OpenMetadataAssetServletnow checks for.br(Brotli) and.gz(Gzip) versions of requested assets and serves them if the client supports the corresponding encoding, prioritizing Brotli over Gzip. If neither is available or accepted, it falls back to the normal asset. (openmetadata-service/src/main/java/org/openmetadata/service/socket/OpenMetadataAssetServlet.java) [1] [2] [3] [4] [5]Testing Enhancements:
openmetadata-service/src/test/java/org/openmetadata/service/socket/OpenMetadataAssetServletTest.java)openmetadata-service/src/test/resources/assets/normal.js,openmetadata-service/src/test/resources/assets/gzip_only.js,openmetadata-service/src/test/resources/assets/gzip_only.js.gz,openmetadata-service/src/test/resources/assets/test.js,openmetadata-service/src/test/resources/assets/test.js.gz,openmetadata-service/src/test/resources/assets/test.js.br) [1] [2] [3] [4] [5] [6]Build Pipeline Updates:
.brfiles as non-filtered resources, ensuring they are not altered during packaging. (openmetadata-ui/pom.xml)openmetadata-ui/src/main/resources/ui/vite.config.ts)With compression load times:
Without compression load times:
Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>