chef / chef/chef-server

More information required in policyfile revisions response

Open
#2,646 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: automate integration
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

Describe the problem

using chef automate if we call the get policy files API's then we are getting revisions but revision_id always containing { }, but we required all possible information instead of a blank hash.

we need the below parameter instead of a blank hash

  • no of policy groups
  • name of policy groups
  • timestamp

Replication Case

for example, if call the get policy files API then we are getting a response like

request: https://api.chef-server.dev/organizations/pedant_testorg_api_18979/policies

{
    "some_policy_name":{
        "uri":"https://api.chef-server.dev/organizations/pedant_testorg_api_18979/policies/some_policy_name",
        "revisions":{
            "909c26701e291510eacdc6c06d626b9fa5350d25":{ }  <-------------- blank hash
        }
    }
}

Stacktrace

Possible Solution

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 by reproducing the get policy files API response at the documented policies endpoint and locate the policy-file revisions API entry point in the Chef Server code. Trace how revision_id values are assembled; done means the revisions response includes policy-group names, policy-group counts, and timestamps instead of empty hashes, with coverage for the response shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.