Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PDK 1.4.1
    • Component/s: None
    • Release Notes:
      New Feature
    • Release Notes Summary:
      This is a new feature that provides the 'pdk update' command. This feature is meant for PDK compatible modules to keep their modules up to date with the module template that was used to generate or convert their module.
    • QA Risk Assessment:
      Needs Assessment

      Description

      For the most part, this can be a copy of the convert CLI, with "convert" changed to "update" in the output.

      Mock up of help:

      $ pdk update --help
      NAME
          update - Update a module that has been created by or converted for use by the PDK.
       
      USAGE
          pdk update [options]
       
      OPTIONS
             --force                     Update the module automatically, with no
                                         prompts.
             --noop                      Do not update the module, just output
                                         what would be done.
       
      OPTIONS FOR PDK
          -d --debug                     Enable debug output.
          -f --format=<value>            Specify desired output format. Valid
                                         formats are 'junit', 'text'. You may also
                                         specify a file to which the formatted
                                         output is sent, for example:
                                         '--format=junit:report.xml'. This option
                                         may be specified multiple times if each
                                         option specifies a distinct target file.
          -h --help                      Show help for this command.
             --version                   Show version of pdk.
      

      Very similar to the convert help but with the --template-url and --skip-intervew options removed. pdk update should only update the module to a newer version of the template used to create or convert it. Changing templates should be done with pdk convert.

      A basic mock up of what it might look like to use:

      $ cd my-module
      $ pdk update
      pdk (INFO): Updating my-module using the default template, from 1.3.1 to 1.4.0.
      ------------Files to be added-----------
      .gitlab-ci.yml
       
      ----------Files to be modified----------
      .rubocop.yml
      Gemfile
      .travis.yml
      Rakefile
       
      ----------------------------------------
       
      You can find a report of the differences in update_report.txt.
      Do you want to continue and make these changes to your module? (Y/n)
      

      Again, very similar to the convert output with only a few changes:

      • Displaying the template information (path/URL, old version, new version). I've opted to niceify the output in the above example where we're using the default template and moving between tagged versions. The alternative output where the module is using a custom template would be something like "Updating my-module using the template at https://github.com/my/custom-template, from master@123abcde to master@4567defa"
      • Writing the report of detailed changes to update_report.txt instead of convert_report.txt
      • Not displaying the warning about this being a destructive action. This is an opinion based change as moving between template versions should never be destructive.

      cc Rick Monro

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                tim.sharpe Tim Sharpe
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: