Skip to content

Log local package installation history #366

@isc-tleavitt

Description

@isc-tleavitt

I just advised an ipm user on how to track a local history of installations of their package through <Invoke> elements, but really this is something the package manager could/should just do itself.

History should be logged for "load", "install" (including as a dependency), and "uninstall".

History records should include:

  • Package name
  • Version
  • Source registry information (for install only)
    • Name (uniquely identifies registry)
    • Moniker (type of registry in friendlier terms than a classname)
    • Details (would capture e.g. the URL or filesystem path)
  • Timestamp
  • Namespace (set to $Namespace via InitialExpression)
  • Username (set to $Username via InitialExpression)
  • Success (%Status)
  • Committed (e.g., 0 in non-developer mode if installation fails; 1 otherwise)
  • IPM command string (e.g., if I zpm "load https://github.com/intersystems/git-source-control -b hcc" would be good to be able to see that)

Note that we still want to log failed installations - this is a minor wrinkle from a transaction handling perspective; if install rolls back we still need the history.

The command zpm "history" should display package installation history. We also need a documented API for retrieving it (even just saying "you can run SQL queries against this table" would be fine); we should also add a cross-namespace class query wrapper around that API to get all history at the instance level.

Should also investigate feasibility of user audit event types in the IRIS Audit database with corresponding data.

The user persona here is a user of IPM looking for history on their own instance - not a publisher of packages looking for analytics on usage.

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions