Add support for non-deployed "dev" packages

Open
#1,253 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
50/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Domain
cli, tooling

Research direction

Start with the package and publish command handling and the referenced %IPM.Storage.Module::Module.HaveToDeploy() and %IPM.Lifecycle.Module::%Package() entry points. Trace how the proposed modifier reaches packaging, then verify that non-deployed packages skip %MakeDeployed() while normal packages retain current behavior.

Written by the indexing model from the issue text.

Description

enhancement good first issue

Link to the discussion thread

https://github.com/intersystems/ipm/discussions/1252

Describe the problem

We in HealthShare use IPM to package up modules that will be used for both development and production. Per https://github.com/intersystems/ipm/issues/624, this seems to be common among IPM users.

In addition to potentially selectively running code via or selectively applying configuration via , we would like to selectively deploy code depending on the branch from which the source code is packaged. For example, when packaging code from a particular testing and development branch, the package should not include any deployed code so that its source code can be inspected and edited for debugging purposes. However, when packaged from its main branch, the package should be production-ready (aka include deployed code). Currently, any module which is packaged via zpm "package" or zpm "publish" will deploy any resources marked with Deploy="True"

Describe the solution

Introduce a "dev" or "nondeployed" modifier to the package and publish commands that causes %IPM.Storage.Module::Module.HaveToDeploy() to return false so that ..MakeDeployed() is never run within %IPM.Lifecycle.Module::%Package().

Describe alternatives

  1. Developers could set up development + testing environments by installing modules from source code in dev mode, but this is not a recommended flow. It is much cleaner to load a tarball whose contents are based on a particular change to isolate the feature/bug fix being tested.
  2. Developers could maintain a separate module.xml for a module in different branches, with different Deploy attribute values.
Dominant language
ObjectScript
Stars
41
Forks
33
Avg merge
23h 20m
Merged PRs (30d)
29

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intersystems/ipm

All issues in intersystems/ipm

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.