Add data access request support#27879
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
| Map<String, Object> payload = new HashMap<>(); | ||
| payload.put("accessType", accessType.value()); | ||
| payload.put("requestedAccess", permission.value()); | ||
| payload.put("reason", reason); | ||
| if (duration != null) { | ||
| payload.put("duration", duration.toString()); | ||
| } | ||
| if (columns != null && !columns.isEmpty()) { | ||
| payload.put("columns", columns); | ||
| } | ||
|
|
||
| CreateTask request = | ||
| new CreateTask() | ||
| .withCategory(TaskCategory.DataAccess) | ||
| .withType(TaskEntityType.DataAccessRequest) |
There was a problem hiding this comment.
💡 Quality: Tasks.java uses mutable HashMap for payload — prefer unmodifiable
Per project standards ('Return unmodifiable collections'), the requestDataAccess method builds a mutable HashMap and passes it directly to the builder. After construction, the map should be made unmodifiable to prevent accidental mutation downstream.
Suggested fix:
Wrap the payload before passing it:
`.withPayload(Collections.unmodifiableMap(payload));`
Or build with `Map.of(...)` / `Map.ofEntries(...)` using conditional logic for optional keys.
Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
✅ TypeScript Types Auto-UpdatedThe generated TypeScript types have been automatically updated based on JSON schema changes in this PR. |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|
🔴 Playwright Results — 3 failure(s), 10 flaky✅ 3209 passed · ❌ 3 failed · 🟡 10 flaky · ⏭️ 69 skipped
Genuine Failures (failed on all attempts)❌
|
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
…/OpenMetadata into harshach/data-access-tasks
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
…/OpenMetadata into harshach/data-access-tasks
Code Review 👍 Approved with suggestions 3 resolved / 4 findingsImplements Data Access Request task support, updating the corresponding schemas and TypeScript types while resolving build-breaking widget import issues and unused variables. Consider updating Tasks.java to use an unmodifiable map for the request payload to align with project standards. 💡 Quality: Tasks.java uses mutable HashMap for payload — prefer unmodifiable📄 openmetadata-sdk/src/main/java/org/openmetadata/sdk/fluent/Tasks.java:210-224 Per project standards ('Return unmodifiable collections'), the Suggested fix✅ 3 resolved✅ Bug: Widget imports deleted files — build will break
✅ Quality: Unused variables in EntityRightPanel after destructuring
✅ Quality: Hardcoded boxShadow value instead of design token
🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
The Java checkstyle failed. Please run You can install the pre-commit hooks with |
|



Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
DataAssetsHeaderto useisDarApprovalActivefor managing request state validation.isDarApprovalActiveutility inTasksUtilsto handle duration and expiration logic for DAR approvals.This will update automatically on new commits.