Details

    • Type: New Feature
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.3.0
    • Component/s: None
    • Labels:
      None
    • QA Risk Assessment:
      Needs Assessment

      Description

      As a module author, I want to be able to run a simple command to make my existing module compatible with the PDK.

      As a module author, I want to be able to run a simple command to detect and apply any updates to my module from the module template used to generate it

      As David Schmitt wrote in PDK-378, we need to have a way for module authors to both make their module compatible with the PDK and to keep their module up to date with the module template.

      To make an existing compatible with PDK:

      pdk module convert [--yes|-y] [--template-url=<template URL>]
      

      To update the template of a PDK compatible module:

      pdk module update [--yes|-y] [--template-url=<template URL>]
      

      1. Determine the appropriate module template to use. If there is no PDK template information in metadata.json (i.e. bringing an existing module into PDK management), use the same logic as `pdk new module` to select the module template (CLI specified -> answer file -> default). If there is PDK template information in metadata.json, use that.
      2. Reuse the existing template dir and template file logic that is used in `pdk new module` to render the new files into the module, but with a `.pdknew` (or similar) extension rather than overwriting
      3. Checksum the contents of the `.pdknew` and existing files to eliminate files that have not changed
      4. Display a diff of the changed files to the user (eventually, we could delegate this to the user's VCS of choice, but until we have VCS integration something like https://github.com/halostatue/diff-lcs should work cross-platform)
      5. Unless the user provide the `--yes` flag, ask for confirmation before proceeding
      6. If the user agrees to proceed, rename the `.pdknew` files to remove the extension to apply the updates. If the user does not want to proceed, remove the `.pdknew` files.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  tim.sharpe Tim Sharpe
                  UX Contact:
                  Rick Monro
                • Votes:
                  7 Vote for this issue
                  Watchers:
                  15 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support