Rules library
Describe your changes:
Fixes
I worked on ... because ...
Type of change:
- [ ] Bug fix
- [ ] Improvement
- [ ] New feature
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation
Checklist:
- [x] I have read the CONTRIBUTING document.
- [ ] My PR title is
Fixes <issue-number>: <short explanation> - [ ] I have commented on my code, particularly in hard-to-understand areas.
- [ ] For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
Summary by Gitar
- Database schema enhancement:
- Added
enabledboolean field totest_definitiontable with generated columns and indexing for both MySQL and PostgreSQL
- Added
- Backend API extension:
TestDefinitionResourcenow supports filtering byenabledstatus with?enabled=true/falsequery parameter defaulting to enabled definitions
- Test case validation:
- New validation in
TestCaseRepositoryprevents creating test cases with disabled definitions while allowing updates to existing cases
- New validation in
- Frontend UI implementation:
- New
RulesLibraryPageat/rules-librarywith admin-protected route for managing test definitions TestDefinitionListcomponent displays definitions in a table with toggle switches, edit, and delete actionsTestDefinitionFormdrawer component handles create/edit operations with dynamic parameter fields
- New
- Comprehensive testing:
- Backend tests in
TestDefinitionResourceTestandTestCaseResourceTestcover enable/disable functionality and validation - Frontend unit tests for all new components plus E2E Playwright test for complete user flows
- Backend tests in
- System data updates:
- All 29 existing test definition JSON files updated to include
"enabled": true
- All 29 existing test definition JSON files updated to include
This will update automatically on new commits.
TypeScript types have been updated based on the JSON schema changes in the PR
The Java checkstyle failed.
Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.
You can install the pre-commit hooks with make install_test precommit_install.
TypeScript types have been updated based on the JSON schema changes in the PR
TypeScript types have been updated based on the JSON schema changes in the PR
Jest test Coverage
UI tests summary
| Lines | Statements | Branches | Functions |
|---|---|---|---|
| 64.04% (50670/79122) | 41.48% (24511/59096) | 45.07% (7770/17240) |
Quality Gate passed for 'open-metadata-ui'
Issues
5 New issues
0 Accepted issues
Measures
2 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Quality Gate passed for 'open-metadata-ingestion'
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
🔍 CI failure analysis for bdc7de6: Maven MySQL CI failure (AppsResourceTest.post_trigger_app_200) is unrelated to PR changes - it's a timing/flakiness issue in app execution. Playwright selector issues remain the primary PR-related fix needed.
Maven MySQL CI Failure Analysis
Issue
The maven-mysql-ci job failed with 1 test out of 7687:
- Test:
AppsResourceTest.post_trigger_app_200 - Error: Max retries exceeded polling for eventual assert (32.80s timeout)
- Location: AppsResourceTest.java:369 → assertAppRanAfterTriggerWithStatus:452
Root Cause
Infrastructure/Timing Issue - Unrelated to PR Changes
The test expects an application to run and reach a certain status after being triggered, but the app didn't complete within the timeout period. This is a flaky test failure caused by:
- Resource pressure: Build took 3h 45m (significantly longer than typical)
- Thread pool timing: Multiple
RejectedExecutionExceptionerrors during test teardown indicate thread pool shutdown race conditions - Asynchronous execution: App execution didn't complete within expected timeframe
Details
Why this is unrelated to the PR:
The PR changes are completely isolated to the Rules Library feature:
- Database schema: Added
enabledfield totest_definitiontable - Backend: TestDefinitionRepository validation for the enabled field
- Backend: CollectionDAO filtering support for enabled field
- UI: Rules Library components
No changes were made to:
- Apps/Applications functionality
- AppsResourceTest or related code
- Application execution or scheduling logic
Evidence of infrastructure issues:
ERROR o.o.s.s.a.UserActivityTracker - Error during final batch update
java.util.concurrent.RejectedExecutionException: Task rejected from
java.util.concurrent.ScheduledThreadPoolExecutor@20c9ee0
[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
Other CI Issues Summary
✅ Fixed: Jest Tests
- 7310/7310 tests passing (100%)
- Label mismatch issues in TestDefinitionForm and TestDefinitionList resolved
❌ Primary PR-Related Issue: Playwright Selectors
- File:
playwright/e2e/Features/RulesLibrary.spec.ts - Issue:
page.getByRole('switch')matches 16+ elements - Affected shards: 2/6, 3/6, 4/6
- Fix: Should add test IDs to Switch components:
<Switch data-testid="enabled-switch" ... /> // In test: page.getByTestId('enabled-switch')
❌ Unrelated Infrastructure Issues
- Python DBT Cloud test failures (likely from main branch merge)
- SonarCloud scanner failures
- Maven timing/environment issues
Recommended Actions
- Re-run maven-mysql-ci: The AppsResourceTest failure should be retried to confirm it's transient
- Fix Playwright selectors: Add data-testid attributes to resolve the primary PR-related issue
- Monitor infrastructure: The 3h 45m build time and thread pool errors suggest CI environment issues
Rules 🎸 1 action taken
Gitar Rules
- 🎸 Flaky Test Retry: Retried maven-mysql-ci (run 20171094787) - AppsResourceTest failure shows flakiness patterns
2 rule(s) not applicable. Show all rules by commenting gitar display:verbose.
[!TIP] Comment
Gitar fix CIor enable auto apply.
Auto-apply is off - Gitar will not commit updates to this branch. Enable by commenting gitar auto-apply:on.
Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs)