Skip to content

Commit

Permalink
Merge pull request #1262 from puppetlabs/CONT-1134-pdk_release_prep_3_0
Browse files Browse the repository at this point in the history
(CONT-1134) PDK 3.0.0 Release Prep
  • Loading branch information
Ramesh7 committed Jul 4, 2023
2 parents 98e2f4b + 63e1a87 commit f7fd89e
Show file tree
Hide file tree
Showing 8 changed files with 137 additions and 487 deletions.
2 changes: 2 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Metrics/AbcSize:
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
Exclude:
- lib/pdk/cli/console.rb
Max: 105

# Offense count: 16
Expand Down
2 changes: 1 addition & 1 deletion docs/pdk.ditamap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<prodinfo>
<prodname>pdk</prodname>
<vrmlist>
<vrm version="2.x"/>
<vrm version="latest"/>
</vrmlist>
</prodinfo>
</topicmeta>
Expand Down
2 changes: 1 addition & 1 deletion docs/pdk_building_module_packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The `pdk build` command performs a series of checks on your module and builds a
`tar.gz` package so that you can upload your module to the Forge. To learn more
about publishing your module to the Forge, see the documentation about
[publishing your
module](https://puppet.com/docs/puppet/4.9/modules_publishing.html#removing-symlinks-from-your-module)
module](https://www.puppet.com/docs/puppet/latest/modules_publishing.html#modules_publishing_prep-publishing-remove-symlinks)

When you run the `pdk build` command, PDK checks your module metadata, looks for
any symlinks, and excludes from the package any files listed in the `.gitignore`
Expand Down
20 changes: 1 addition & 19 deletions docs/pdk_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ By default, PDK installs to the following locations:
- On Windows systems: `C:\Program Files\Puppet Labs\DevelopmentKit`


PDK uses Puppet 6 and 7.
PDK uses the latest versions of Puppet 7 and 8 available at the time of release.
Modules created with PDK work with all Puppet and Ruby version combinations currently under maintenance.
See [open source Puppet](https://puppet.com/docs/puppet/latest/about_agent.html) and
[Puppet Enterprise](https://www.puppet.com/docs/pe/2023.0/getting_support_for_pe.html#getting_support_for_pe) lifecycle pages for details.
Expand Down Expand Up @@ -255,15 +255,6 @@ instructions.
2. Open a new PowerShell window to re-source your profile and make PDK
available to your PATH.


**Result:**

On PowerShell 4.0 or later, PDK loads automatically and `pdk` commands are
available to the prompt.

> **Tip:** If you encounter execution policy restriction errors when you try to
run `pdk` commands, see [troubleshooting](pdk_troubleshooting.md) for help.

#### What to do next:

To upgrade PDK to the most recent release, run `choco upgrade pdk`
Expand All @@ -280,15 +271,6 @@ Download and install the PDK package for Windows systems.
3. Open a new PowerShell window to re-source your profile and make PDK
available to your PATH.


**Result:**

On PowerShell 4.0 or later, PDK loads automatically and `pdk` commands are
available to the prompt.

> **Tip:** If you encounter execution policy restriction errors when you try to
run `pdk` commands, see [troubleshooting](pdk_troubleshooting.md) for help.

## Setting up PDK behind a proxy

If you are using PDK behind a proxy, you must set environment variables to
Expand Down
145 changes: 2 additions & 143 deletions docs/pdk_known_issues.md
Original file line number Diff line number Diff line change
@@ -1,146 +1,5 @@
# PDK known issues

## PDK 2.7.0

### `uninitialized constant` error

When selecting Puppet versions PDK, you may encounter an `uninitialized constant` error if the target version is below 6.29 for Puppet 6 or 7.22 for Puppet 7.

This is caused by an incompatible version of concurrent-ruby that is downloaded when PDK processes the selected Puppet version.

To mitigate this issue, we recommend selecting only the latest puppet versions when using `--puppet-version`.

For example:

#### Puppet 6

```
pdk validate --puppet-version 6.29
```

#### Puppet 7

```
pdk validate --puppet-version 7.22
```
The above issue should no longer be present when using `--pe-version`

### Install of pdk-2.7.0.0-1.el9.x86_64 conflicts with file from package

When installing an el9 based package the user may see the following errors:

```
file /usr/lib/.build-id/95/26c65fed0e95fbb6b988476cc811ca19d5c9c9 from install of pdk-2.7.0.0-1.el9.x86_64 conflicts with file from package libgcc-11.3.1-2.1.el9.x86_64
file /usr/lib/.build-id/ab/d5d7149726b0410af7af2e9a59491942605ddd from install of pdk-2.7.0.0-1.el9.x86_64 conflicts with file from package libstdc++-11.3.1-2.1.el9.x86_64
```

This is caused by conflicting build-ids in the package.

To avoid this issue, please target PDK 2.7.1.

## PDK 2.6.1

### Running autocorrect on puppet-lint top_scope_facts

Currently there is an issue with a third party plugin that the pdk currently pulls in called puppet-lint-top_scope_facts-check. When using the autocorrect functionality, it introduces issues in the codebase.

In order to avoid running into this particular issue we recommend adding the following to your `.sync.yaml` file and then run a `pdk update`:

```
Rakefile:
extra_disabled_lint_checks:
- top_scope_facts
```

### `uninitialized constant` error

When selecting Puppet versions PDK, you may encounter an `uninitialized constant` error if the target version is below 6.29 for Puppet 6 or 7.22 for Puppet 7.

This is caused by an incompatible version of concurrent-ruby that is downloaded when PDK processes the selected Puppet version.

To mitigate this issue, we recommend selecting only the latest puppet versions when using `--puppet-version`.

For example:

#### Puppet 6

```
pdk validate --puppet-version 6.29
```

#### Puppet 7

```
pdk validate --puppet-version 7.22
```
In scenarios where `--pe-version` is used, it is recommended that `--puppet-version` is used instead, with the correct target as described above.

## PDK 1.15.0 is incompatible with Bundler 2.1.0 and later

PDK 1.15.0 is incompatible with Bundler 2.1.0 and later. Use Bundler 2.0.2
instead.

## PDK analytics opt-out dialog causing issues with CI systems

In PDK 1.11.0, when running in a Continuous Integration (CI) environment (such
as Travis CI), PDK may get stuck waiting for a response as to whether or not you
want to opt-out of anonymous analytics data collection.

PDK is intended to bypass this prompt in "non-interactive" environments such as
a CI environment. However, certain common CI environments are not being
correctly detected as "non-interactive". As an immediate workaround, avoid the
issue by configuring your CI jobs to run PDK with the `PDK_FRONTEND` environment
variable set to the value "noninteractive". For example, if running a
validation:

```
$ PDK_FRONTEND=noninteractive pdk validate
```

You might also be able to configure the environment variable for the entire job.
See
[https://docs.travis-ci.com/user/environment-variables/](https://docs.travis-ci.com/user/environment-variables/)
for information about configuring this in Travis CI, or check your CI system's
documentation for similar options.
[PDK-1414](https://tickets.puppetlabs.com/browse/PDK-1414),
[PDK-1415](https://tickets.puppetlabs.com/browse/PDK-1415)

## Using PDK with PowerShell ISE locks the console

If you run the `pdk new module` command inside a PowerShell ISE window, it
returns an error and locks the console. Do not use PDK with PowerShell ISE.
PDK-1168

## PDK not in ZShell PATH on Mac OS X

With ZShell on Mac OS X, PDK is not automatically added to the PATH. To fix
this, add the PATH by adding the line `eval $(/usr/libexec/path_helper -s)` to
the ZShell resource file (`~/.zshrc`).

## Output of `pdk test unit --list` lacks information

Output from `pdk test unit --list` lacks detailed information and tests appear
duplicated. To get the full text descriptions, execute the tests in JUnit format
by running `pdk test unit --format=junit`
[PDK-374](https://tickets.puppetlabs.com/browse/PDK-374)

## Module validation and testing might fail if dependencies include gems with native extensions

You might not be able to use PDK with a module if that module's Gemfile requires
Ruby gems with native extensions, particularly when running on Windows.

When you run `pdk validate` or `pdk test unit` on a module, PDK tries to install
any missing module dependencies before it runs validations or tests. On some
platforms, PDK can install gems with native extensions, if you already have the
required compilation tools and libraries installed. On Windows, however, the
Ruby installations managed by PDK are not configured to support native extension
compilation, even if the necessary tools are present.

If you encounter this issue on a platform other than Windows, you might be able
to resolve it by researching and installing the required dependencies for the
gem that is failing to install.

If you encounter this issue on a Windows platform, you must remove or comment
out the Gemfile dependencies that include native extensions or that have
dependencies that include native extensions.
## PDK 3.0.0

For more information about upgrading your PDK installation, see [Upgrading PDK](pdk_upgrading.md).
22 changes: 0 additions & 22 deletions docs/pdk_troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,6 @@

If you are encountering trouble with PDK, check for these common issues. 

## Windows: Execution policy restrictions

In some Windows installations, the default execution policy restrictions
prohibit `pdk` commands.

To fix this issue, set your script execution policy to at least `RemoteSigned`
by running `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned`

Alternatively, you can change the `Scope` parameter of the `ExecutionPolicy` to
the current session by running `Set-ExecutionPolicy -ExecutionPolicy
RemoteSigned -Scope CurrentUser`

For more information about PowerShell execution policies or how to change them,
see Microsoft documentation about
[Execution_Policies](http://go.microsoft.com/fwlink/?LinkID=135170) and how to
set [execution
policy](https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.security/set-executionpolicy).

> **Note:** Windows versions older than Windows 10 might not recognize the `pdk`
command. If you are running an older version of Windows, you might need to
update your PowerShell prior to using PDK.

## PDK not in ZShell PATH on Mac OS X

With ZShell on Mac OS X, PDK is not automatically added to the PATH. To fix
Expand Down
Loading

0 comments on commit f7fd89e

Please sign in to comment.