chef / chef/chef-cli

Feature request: ability to use non-"local" policy_group when exporting policies

Open
#94 4 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Help Wanted Triage: Feature Request
Dominant language
Ruby
Stars
18
Forks
23
Avg merge
5d 17h
Merged PRs (30d)
1

Description

When running integration tests via TestKitchen, it would be useful to test behavior dependent on the value of policy_group. However, chef export hardcodes the value of policy_group to local:

      # Policy groups provide namespaces for policies so that a Chef Server can
      # have multiple active iterations of a policy at once, but we don't need
      # this when serving a single exported policy via Chef Zero, so hardcode
      # it to a "well known" value:
      POLICY_GROUP = 'local'.freeze

This is a proposal for a feature that would allow setting the value of policy_group via a per-suite setting in .kitchen.yml. On the ChefDK side, this would require making POLICY_GROUP a configurable option to chef export.

Contributor guide

Open the contributing guide

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.

Research direction

Start with the chef export implementation in lib/chef-dk/policyfile_services/export_repo.rb, especially the POLICY_GROUP constant, and review the linked Test Kitchen issue for the integration-test context. Trace how a per-suite setting in .kitchen.yml could reach chef export; done means policy_group is configurable rather than always local and the requested Test Kitchen behavior can be tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.