Skip to content

Conversation

@AshokThangavel
Copy link
Contributor

Description

This introduces the ability for users to configure a custom base directory for IPM module installations. Previously, modules were restricted to a path relative to the IRIS installation (typically within <installedDir>/ipm/).

With this change, users can use the config set command to isolate source code and artifacts from the IRIS system folders, facilitating better DevOps practices and persistent storage management in containerized environments.

fixes: #1029

Changes

  • Configurable Root: Added ModuleRoot as a valid setting in %IPM.Repo.UniversalSettings.
  • Path Resolution: Updated the module installation logic to prioritize the user-configured ModuleRoot over the default ##class(%SYSTEM.Util).DataDirectory() _ "ipm/".
  • Validation: Implemented OS-level checks to ensure the provided path exists and has necessary permissions before allowing the configuration change.

Testing Results

Step Action Status Detail
1 Install (Default) Passed Installed objectscript-math to default /usr/irissys/ipm/.
2 Validation Test Passed Correctly blocked /usr/ with ERROR #5001: No write permission.
3 Config Update Passed Successfully updated ModuleRoot to custom path: /tmp/.
4 Redirection Passed Verified re-installation of module successfully moved to /tmp/.

- Implemented ModuleRoot setting in %IPM.Repo.UniversalSettings
- Added rwx permission validation for custom directory paths
- Updated module installation logic to prioritize configured ModuleRoot
- Included unit tests to verify path redirection and permission checks
return ..GetValue(..#ModuleRoot)
}

ClassMethod CheckDirPermission(directory As %String = "") As %Status
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: just throw errors instead if returning status

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! I've updated the CheckDirPermission method to throw exception instead of returning the status.

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.

Support for User-Configurable Module Installation Root

2 participants