Skip to content

MLE-23043: 5.8.1 patch for MarkLogic 12#8027

Open
rjdew-progress wants to merge 1 commit into
feature/5.8-developfrom
MLE-23043
Open

MLE-23043: 5.8.1 patch for MarkLogic 12#8027
rjdew-progress wants to merge 1 commit into
feature/5.8-developfrom
MLE-23043

Conversation

@rjdew-progress

Copy link
Copy Markdown
Collaborator

Description

Patch 5.8.1 mlRunIngest transform for MarkLogic 12.

Checklist:

- Note: do not change the below

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR applies a patch to the MarkLogic Data Hub mlRunIngest transform for MarkLogic 12 compatibility. The patch includes several improvements to the ingest process including permission handling, code structure, and error handling.

  • Adds proper permission handling with default permissions and parsing
  • Restructures content object creation with improved formatting
  • Simplifies conditional logic in the error handling section


let jobId = params["job-id"];
let options = params.options ? JSON.parse(params.options) : {};
options.permissions = options.permissions || "data-hub-common,read,data-hub-common,update";

Copilot AI Jul 28, 2025

Copy link

Choose a reason for hiding this comment

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

The hardcoded permission string should be extracted to a constant or configuration to improve maintainability and make it easier to change permissions across the codebase.

Suggested change
options.permissions = options.permissions || "data-hub-common,read,data-hub-common,update";
options.permissions = options.permissions || DEFAULT_PERMISSIONS;

Copilot uses AI. Check for mistakes.
uri: context.uri,
value: content,
context: {
permissions: hubUtils.parsePermissions(options.permissions)

Copilot AI Jul 28, 2025

Copy link

Choose a reason for hiding this comment

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

Consider adding input validation to ensure that hubUtils.parsePermissions() can handle the permissions string format properly, as malformed permission strings could cause runtime errors.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants