New features, enhancements, and resolved issues for the PDK 1.x release series.

PDK 1.9

New features and enhancements

Validation for YAML file syntax

The pdk validate command now includes syntax validation of YAML files in the module. PDK-735

Updated packages for Fedora

This release adds PDK packages for Fedora 28 and 29. Packages for Fedora 26 and 27, which have reached end of life, are no longer available. PDK-1050

The .pdkignore template has been updated so that development related files are not included when building module packages for publishing to the Forge. Development-related files that are now ignored during building include Rakefile, Gemfile, tests under the /spec/ directory, and CI configuration. PDK-957

New package for Mac OS X Mojave

This release adds a PDK package for Mac OS X 10.14 (Mojave). PDK-1250

Resolved issues

Validation no longer fails when run from a subdirectory

This release fixes a bug where PDK was not evaluating file targets based on the current working directory. This caused pdk validate <TARGET> to fail when run from a module's subdirectory. PDK-1204

Recognizes valid local template directory in answer file

This release fixes an issue where if the local template directory was not a Git repository, PDK falsely reported that a valid local template directory set in the answer file was invalid. PDK-914

Rake task conflict fixed in puppetlabs_spec_helper

The puppetlabs_spec_helper Rake task check:test_files no longer interferes with any tasks that might run after it in the same Rake command, such as rake test:test_files rubocop. PDK-997

Internal software update for PDK for Windows

The ANSICON software in PDK for Windows has been updated to the latest available version. This fixes some PDK execution errors encountered on Windows 10. PDK-1139

Improved support for older Git versions

This release changes the way PDK executes Git to support older versions of Git.PDK now changes directory into the Git repository before running git commands, rather than using git -C. PDK-1001

Fixes a bug where modules with bundled gems that include symlinks failed validation. PDK-1199

PDK honors puppet-lint configurations in the template

Because PDK executes puppet-lint directly instead of calling the Rake command, PDK did not honor the puppet-lint configurations specified in the Rakefile. In this release, PDK now honors the Rakefile configuration options for puppet-lint set up in the default template config and .sync.yml. PDK-1202

PDK 1.9.1

Improvements to PDK module template

The release includes several improvements to the PDK template, contributed by Puppet community members. See the merged pull requests for details about each change.
  • Increased control of puppet-lint configuration, such as disabling certain checks. PR 181

  • Improved description of moduleroot_init in the pdk-template README. PR 188

  • Added the ability to permit aliases in default fact files. PR 189

GitLab CI configuration updated

This release updates the GitLab CI configuration to test and validate against Puppet 5 and 6, which are the current versions of Puppet. PDK-1277

PDK no longer attempts to validate targets that are not files

When validating YAML, PDK now filters out any targets that are not files. This prevents PDK from trying to validate targets that it should not be validating, such as a testing folder called default.yml. PDK-1276

PDK returned an error if some Ruby symbols were in YAML files

PDK validation now supports the use of Ruby symbols, such as a colon preceding a value (:ssh), in YAML files. PDK-1273

Slashes in module names are automatically corrected

When converting modules to PDK, if the module's name in the metadata.json file is formatted with a slash instead of a hyphen, PDK corrects the name automatically. For example, if the module name is puppetlabs/apache in the metadata, PDK changes it to puppetlabs-apache. PDK-1272

False syntax validation errors fixed

This release fixes an issue where PDK produced false syntax errors when validating modules that contain example manifests in the examples directory. This issue occurred only if the module was located in Puppet's configured modulepath. PDK-1266

PDK 1.8

New features and enhancements

Newly created modules require Puppet 4.10.0 or greater by default

With recently added support for data-in-modules, the PDK module template has been updated with a Puppet requirement lower bound of ">= 4.10.0". This affects newly generated modules. [PDK-1208]

New module template adds support for data in modules

When you generate a new module, PDK renders a default hiera.yaml file. This supports the addition of Hiera data in modules. This is true only for newly created modules; converting or updating existing modules does not add this file. [PDK-1237]

Support for testing against Ruby 2.5.1

Appveyor and Travis are updated to test against Ruby 2.5.1. [PDK-1237]

Resolved issues

Reported time of pdk test unit execution is consistent

Previously, running the pdk test unit command returned an execution time calculated as only the time running tests, while running the command with the --parallel option returned the total time of loading files and running tests. This command now consistently reports a total time of execution. [PDK-400]

Updated curl with security fixes

This release updates the packaged curl to 7.62.0 to include security fixes. [PDK-1212]

Files have LF line endings

When PDK generates files, they now always have LF line endings instead of CRLF line endings. [PDK-547]

pdk validate command honors Rubocop excludes

Prior to this fix, running pdk validate without any targets caused the subsequent Rubocop call to ignore the rubycop.yml excludes. This has been fixed and the Ruby validator will now honor the excludes in the rubocop.yml. [PDK-654]

pdk build no longer adds Puppet 6.0 gem dependency

Previously, the pdk build command incorrectly modified the module's Gemfile.lock file, adding a Puppet 6.0 gem dependency. The build command no longer modifies the Gemfile.lock file. [PDK-1190]

Validation no longer checks the module package

By default, the pdk validate command now excludes the <modulename>/pkg directory, which contains the module package. [PDK-1183]

Testing skips empty default_facts.yml file

Previously, if a module's spec/default_facts.yml file was empty, pdk test unit failed all tests. PDK now silently skips empty spec/default_facts.yml and spec/default_facts_module.yml files. If the file is not empty, but does not contain valid YAML data, a warning is shown in the pdk test unit output. [PDK-1191]

pdk update no longer generates false file removal warnings

If your .sync.yml file specified a given file to be deleted, the pdk update command generated a file removal warning even in cases where the file was not present. This has been fixed. [PDK-972]

pdk convert updates null values and empty arrays in metadata

Prior to this release, modules converted to PDK compatibility failed validation if their original metadata contained requirements or dependencies keys with null values or empty arrays, because PDK did not replace those values with valid ones. Now when a module is converted, PDK replaces null values with the default metadata value. Additionally, if the requirements array is present but empty, PDK updates it with the default metadata value. [PDK-1093]

Testing against the Puppet code source works correctly 

Previously, the --puppet-dev option for the pdk test unit and pdk validate commands didn't correctly use the Puppet source. [PDK-1200]

Testing and validation ignores files in vendor directories

Prior to this fix, PDK scanned vendor directories and failed validation on any .pp files these directories contained. The pdk validate and pdk unit test commands now ignore files in the vendor directory. [PDK-1192]

Validation returned an error if a module contained Puppet task plans

If modules contained plans, pdk validate returned an error. PDK now excludes the plans directory during validation. [PDK-1194]

Bundler environment is created on module creation 

When you create a new module, PDK now sets up a Ruby Bundler environment and creates a Gemfile.lock file. Previously, this environment was not created until the first time you ran a PDK command in the module. [PDK-1172]

Resource creation uses the configured module template

When generating resources, such as classes or defined type, PDK was not using the configured template URL from the metadata.json file. Now, PDK uses the same template for resources that was used in the module's creation. [PDK-1104]

PDK now works correctly in Bundler setups

When running PDK from a gem install, PDK no longer overrides any existing user specified Bundler gem install path. This allows PDK in Bundler setups to work correctly. [PDK-1187]

PDK manages the .gitattributes file

Previously, PDK managed the .gitattributes file only at initialization. This file has been moved to the module root and is actively managed by PDK. [PDK-1211]

Error handling improved for PDK version metadata with null values

If the module's metadata contained a null value for the pdk-version key, PDK quit unexpectedly with a Ruby exception. This release fixes this issue so that PDK instead exits with an error if it encounters this issue. [PDK-1180]

PDK 1.7

New features and enhancements

Validate and unit test against latest Puppet development code

This release adds the --puppet-dev flag to the pdk validate and pdk test unit commands. This flag allows users to validate and test against the latest Puppet source code from GitHub. You must have internet access to https://github.com to use this option. You cannot specify --puppet-dev together with the --puppet-version= or --pe-version= options. [PDK-1096]

Module creation default options are consistently generated

Running pdk new module <module> --skip-interview now generates the same metadata as if you ran pdk new module <module> and accepted all the default answers to the interview questions. [PDK-583]

Support for testing against Puppet 6

This release adds support for validating and running unit tests against Puppet 6 with Ruby 2.5. [PDK-1056, PDK-1141]

PDK 1.7.1

Improved reference documentation and help output for validating modules in PowerShell

Reference documentation and command line help output now states that when you run multiple specific validations in PowerShell, you must enclose the list of validators in single quotes. Without the quotes, PowerShell cannot interpret the command correctly and returns an error. For example: pdk validate 'puppet,metadata'. See for details. [PDK-1173]

Updated curl with security fixes

This release updates the packaged curl to 7.61.1 to include security fixes. [PDK-1182]

PDK 1.6

New features and enhancements

GitLab CI default configuration improved

The release improves testing and validation parity between GitLab CI and Travis CI. The default GitLab CI configuration now runs spec tests against Puppet 4 with Ruby 2.1.9 and Puppet 5 with Ruby 2.4.4. It also supports lint, syntax, and Rubocop checks for Ruby version 2.4.4. You can add to or override these versions by editing your module's .gitlab-ci.yml.

PDK no longer deletes test fixtures by default 

You can now specify whether PDK should clean up test fixtures, such as symlinks and external module dependencies, after running pdk test unit. Prior to this release, PDK cleaned up test fixtures after every run of pdk test unit. This often caused longer test runs, because fixtures weren't stored, but had to be downloaded every time you invoked the pdk test unit command.

PDK no longer deletes test fixtures after running unit tests. To have PDK remove the text fixtures, run the pdk test unit command with the clean fixtures flag: pdk test unit --clean-fixtures or pdk test unit -c. [PDK-636]

Remove values from the default module template configuration

This release allows users to remove values or hashes from the default module template configuration. This means you can override some values of the PDK default template without maintaining your own custom template. To remove a value, specify the configuration file and setting in your .sync.yml file, and prefix the value you want to remove with the "knockout prefix," ---

For example, to remove the bundler_args value --without system_tests from your Travis CI configuration, specify the Travis CI configuration file, prefixing the value with the knockout prefix, --- :
.travis.yml:
  bundle_args: -----without system_tests
When you run pdk update or pdk convert, PDK generates the specified configuration file without the knocked out value. To learn more about customizing your module template with the .sync.yml file, see the pdk-template project. [PDK-949]

Resolved issues

PDK exits with a warning if run on an incompatible module

If you run PDK commands, such as pdk validate or pdk test unit, on a module that has not been converted for use with PDK, PDK now exits after informing you that the module needs to be converted. Previously, PDK informed you that the module was incompatible and then attempted to run the requested command anyway, with varying success. [PDK-802]

Parallel fixture downloads no longer cause errors

An issue in puppetlabs_spec_helper caused errors with parallel downloads of fixtures from multiple Git repositories. [PDK-1031]

Rubocop could not be disabled

This release fixes an issue preventing module developers from configuring .sync.yml to disable Rubocop checks. [PDK-998]

PDK failed if you tried to validate too many files 

If you were validating a large number of files, PDK failed with a Ruby error. Now PDK runs the validation in batches so that this doesn't fail. [PDK-985]

Running unit tests on Windows attempted to create an invalid directory

When you run pdk test unit on Windows, PDK attempts to initialize a test environment in a /dev/null directory, which causes an error Windows. Now rspec-puppet overrides the /dev/null values, changing them to NUL when running on Windows. [PDK-983]

Installing gem dependencies on Windows resulted in an error

When PDK attempted to bundle install gem dependencies, an issue in the openssl gem could cause an SSLError on Windows. To learn more about the background of this error, see https://bugs.ruby-lang.org/issues/11033 . This issue is largely resolved for PDK packages, although you might still encounter it if you use bundler commands with PDK and Ruby 2.1.9 on Windows. [PDK-802]

Module validation and testing on Windows failed if using Beaker 

This release fixes an issue validating and testing modules using Beaker on Windows. PDK now packages the Beaker dependencies that require native compilation. You can use PDK with modules that include Beaker in their Gemfile without having to alter the module's Gemfile.

The root cause of this issue is that PDK packages cannot always install gems that include native extensions, which must be compiled before they can be used by a Ruby application. This release fixes the Beaker issue, but not the root cause. Gems that require native compilation, but are not part of Beaker's dependency tree, still require compilation. [PDK-950]

Run unit tests from any module directory

The pdk test unit command can now be run from any directory in the module. Previously, this command raised an unhandled exception if you tried to run it from any directory other than the module root. [PDK-926]

PDK 1.6.1

Improved help output for pdk test unit --verbose

The help output for the --verbose flag behavior for pdk test unit is improved. The clarified help output now states that the --verbose option for unit testing displays additional information only if used with the --list option, such as pdk test unit --list --verbose. [PDK-1048]

pdk validate now displays errors from bundled tools

The pdk validate command now displays the output from underlying tools if it encounters an unexpected error. [PDK-1053]

pdk build returned an error if it couldn't find Rake

Building the module package in a directory where ./bin/rake did not yet exist returned an execution error. The pdk build command now creates the Rake binstub needed to clean up the module prior to packaging. [PDK-1061]

pdk validate attempted to validate unit test fixtures

Fixtures downloaded when running pdk test unit, which are stored in <MODULE>/spec/fixtures, are now excluded from pdk validate runs. [PDK-925]

Users could not add files in custom module template subdirectories

This release resolves a bug in the new module template renderer that prevented users from adding files in nested subdirectories to custom module templates. [PDK-906]

pdk validate command error handling improved

Improved handling of unexpected errors when parsing the output of puppet parser validate as part of pdk validate. [PDK-1046]

PDK returned a confusing error if the module template URL changed

An improved error message is now displayed if you are updating a module and template does not exist at the URL that PDK expects. [PDK-1041]

PDK reports rspec-puppet coverage to the user

PDK now displays the results of an rspec-puppet test coverage report, if the user has enabled coverage reporting in their rspec-puppet configuration. Previously, PDK printed this information to only STDOUT. [PDK-1051]

PDK failed if paths were too long in Windows

PDK sometimes encountered an error that a command was too long on Windows. To reduce the length of the commands that PDK executes, file paths are now sent to the validator as relative paths. [PDK-1045]

Unit tests could not correctly be run in parallel

This release fixes an issue where the pdk test unit --parallel command was not correctly running unit tests in parallel. [PDK-1067]

Parallel tests on Windows and Ruby 2.1 sometimes failed

When running parallel tests on Windows in Ruby 2.1, a rspec-puppet interaction with puppetlabs_spec_helper would sometimes fail while checking the fixture directory junction. The issue has been fixed in rspec-puppet. [PDK-1054]

Corrected PATH environment

This release fixes an issue where PDK subprocesses did not have the correct PATH environment. This issue would manifest as a "command not found" error when trying to use bundle exec to run a command from a bundled Ruby gem such as rspec. [PDK-1073]

PDK 1.5

New features and enhancements

Validate and test against specific Puppet versions

You can now test and validate your modules against specific Puppet or PE versions. This release adds the --pe-version and --puppet-version options to the PDK validate and unit test functions. These options validate or run unit tests against the Puppet version specified or included in the specified PE version. See the documentation for validating and testing modules for details. [PDK-414]

PDK adds a framework option for unit tests

You can now choose which mocking framework PDK uses for running your unit tests. In a sync.yml file in your module, set the mock_with setting to either :mocha or :rspec. We suggest using the RSpec framework. However, to maintain compatibility for existing modules, the PDK template defaults to the Mocha framework. See the puppetlabs_spec_helper README for details about this setting. [PDK-916]

PDK support available for Puppet Enterprise customers

PE customers can now get customer support for PDK version 1.5.0 and newer. To get help, contact support through the customer support portal.

Ruby 2.5 compatibility added

PDK is now compatible with Ruby version 2.5.

Resolved issues

Legacy code supporting Puppet 4.7 and older dropped

This release removes artifacts and dependencies from the PDK template that supported Puppet versions less than 4.7. [PDK-389]

Some .sync.yml settings were ignored by PDK commands

This release fixes a bug where the pdk convert and pdk update commands did not respect the unmanaged or delete keys in the .sync.yml file. These commands now correctly ignore or delete files specified with these keys. [PDK-832 , PDK-831]

PDK 1.4

The first release of PDK 1.4 was 1.4.1.

New features and enhancements

Module creation interview is simplified

This release removes questions related to Forge use from the pdk new module and pdk convert commands. By default, the interview now asks only the questions required to run validation and unit tests, making the interview process faster if you don't plan to upload your module to the Forge.

If you do plan to publish your module on the Forge, you can use the --full-interview option to include all questions. [PDK-550]

Update your PDK modules to reflect module template changes

The pdk update command updates PDK compatible modules with any changes to the module template. See the topic about updating the module template for details and usage. [PDK-771]

PDK builds module packages

This release adds the pdk build command, which builds the module project into a package that can be uploaded to the Forge. See the building module packages topic for details and usage informaiton. [PDK-748]

Resolved issues

Security updates for packaged curl and Nokogiri

This release updates the packaged curl library to 7.59.0 and the packaged Nokogiri version to 1.8.2 for security fixes.

PDK validation no longer tries to read puppet.conf files

When running Puppet manifest syntax validation, the pdk validate command no longer reads or throws errors on puppet.conf files in the default locations (such as /etc/puppet/puppet.conf) on the user's host. [PDK-575]

PDK 1.3

New features and enhancements

Rakefile is now configurable in sync.yml

The PDK template has been modified so that you can add extra requires or imports to the Rakefile when converting existing modules. To learn how to customize your module template, see the customizing your module topic. [PDK-756]

Test unit command provides detailed information

The pdk test unit --list command lists the module test files that contain examples. Add --verbose or -v to display more information about the examples in each file. [PDK-674]

PDK reports what template was used for module creation 

The pdk new module command now accepts a full module name, which includes the Forge user name and the module name, such as forgeuser-modulename. Standard PDK usage is to pass the short module name only with the new module command (pdk new module modulename), but this change offers flexibility. [PDK-594]

PDK asks for a module name on new module creation

If you run the pdk new module command but don't pass a name for the new module, PDK asks for the module name in the metadata questionnaire. [PDK-671, PDK-628]

Convert existing modules to a PDK compatible format

This release adds the pdk convert command, which you can use to make your existing module compatible with PDK . After you convert a module, you can use all PDK functions with that module, such as creating classes, validating, and unit testing. See the instructions for converting modules for detailed information.

Resolved issues

Curl security update

This release updates the curl version included in PDK to 7.57.0. This update is a security fix. [PDK-714]

OpenSSL security update

This release updates the openssl version included in PDK to 1.0.2m. This update is a security fix. [PDK-667]

Passing a test list to the pdk test unit command failed to run any tests

Fixes an issue where no tests would run if you passed the --tests option to pdk test unit, because the command did not pass the arguments to the unit test handler. [PDK-429]

PDK 1.3.1

Cached template URL in PDK 1.3.0 upgrades prevented module creation

If you upgraded PDK to version 1.3.0 from a previous installation, an outdated template URL cached in your answers file could prevent creating or converting modules. [PDK-736]

PDK 1.3.2

PDK exited with a fatal error if the cached template URL was invalid

If the template-url value in the PDK answers file was no longer valid, PDK exited with a fatal error. Now when you create or convert a module, PDK checks that the template-url repository exists. If it does not, PDK warns you, falls back to the default template, and removes the invalid URL from the answers file. To update the URL in the PDK answers file, specify the new URL with the --template-url flag. [PDK-739]

PDK 1.2

New features and enhancements

CLI help is improved

This release adds context to ambiguous help output from pdk help.

Module creation adds examples and files subdirectories

The pdk new module command now creates ./examples and ./files subdirectories in the new module. These directories can contain code examples and extra files, respectively.

PDK validates task metadata

When you run pdk validate metadata, PDK validates both module and task metadata files.

PDK can create tasks in modules

Tasks allow you to perform ad hoc actions for on-demand infrastructure change. When you create a module, PDK creates an empty ./tasks folder. When you create a task, PDK creates template files for the task (<TASK>.sh) and the task metadata (<TASK>.json). See the writing tasks topic for more information about tasks and the create a task topic for how to create a task with PDK.

Resolved issues

Git version in PDK did not install some dependencies on Windows  

The version of Git included in the PDK packages did not work correctly with Bundler on Windows, so gem dependencies specified in a module's Gemfile with a Git source were not correctly installed. This release fixes this issue.

Running PDK commands on Windows 7 failed

Using PDK on Windows 7 resulted in access errors and Ruby failure. This release fixes the issue

Validation stopped if errors were encountered

The pdk validate command now runs all possible validators, even if one of them reports an error.

Validation failed to validate using Windows paths

This release fixes an issue where puppet-lint was not properly escaping bundle commands in Windows. We've added a note to the help text in PDK, and the root cause will be fixed in a puppet-lint release to be included in PDK.

PDK 1.1

New features and enhancements

Improved error output

  • The pdk test unit provides improved error messages when unit tests fail.

  • Errors from spec_prep and spec_clean failures are improved to provide only relevant error information.

  • If you try to create a class that already exists, PDK gives an error instead of a fatal error.

Operating system question added to new module interview

The module creation interview now asks which operating systems your module supports. You can select supported operating systems from an interactive dialog menu.

PDK can generate defined types

PDK can now generate defined types in a module. Usage is similar to the class generation: pdk new defined_type <NAME>. For usage details, see creating modules.

Resolved issues

Installing PDK in a non-default location caused an error

Installing PDK in a non-default location caused an error condition because the template URL was saved into the answer file. With this release, the template URL is no longer saved into the answer file.

Modules generated with PDK depended on puppetlabs-stdlib module by default

This release removes an unnecessary dependency on the puppetlabs-stdlib module in a newly generated module's metadata.json.

PDK package installation created unnecessary directories

PDK package installation created an unnecessary directory: /etc/puppetlabs on Linux, /private/etc/puppetlabs on Mac OS X, and C:\Documents and Settings\$user\Application Data\PuppetLabs on Windows. These directories are no longer created on installation.

Generated .gitattributes file caused Ruby validation failure

An error in the generated gitattributes file caused Ruby style checking with Rubocop to fail. Now PDK configures .gitattributes to correctly match end-of-line behavior with the recommended Git attribute configuration, always requiring LF line ends.

PDK module template contained a TravisCI configuration error

An error in the module template's TravisCI configuration (.travis.yml) caused TravisCI to not run any CI jobs. This was because the environment variable CHECK, which specifies what each TravisCI build job should do, was undefined. TravisCI now properly runs the unit tests and validators.

PDK was not added to PATH in some shells

PDK was not automatically added to the PATH in some shells, including Debian. This issue is now resolved. However, if you are using ZShell on Mac OS X , you must add the PATH manually by adding the line eval $(/usr/libexec/path_helper -s) to the ZShell resource file (~/.zshrc).

PDK conflicted with the Puppet 5 gem

If Puppet 5 and PDK were both specified in a Bundler Gemfile, Puppet code within PDK conflicted with the Puppet 5 gem, causing an unhandled exception. This exception no longer occurs.

PDK did not work correctly with PowerShell 2

This release improves the PowerShell integration so that PDK works on PowerShell 2, the standard version on Windows 7.

PDK 1.0

New features

PDK initial release

This is the first major release of Puppet Development Kit (PDK).

  • Generates modules with a complete module skeleton, metadata, and README template.

  • Generates classes.

  • Generates unit test templates for classes.

  • Validates metadata.json file.

  • Validates Puppet code style and syntax.

  • Validates Ruby style and syntax.

  • Runs RSpec unit tests on modules and classes.

Back to top
The page rank or the 1 our of 5 rating a user has given the page.
The email address of the user submitting feedback.
The URL of the page being ranked/rated.