ministryofjustice / modernisation-platform

A place for the core work of the Modernisation Platform • This repository is defined and managed in Terraform
https://user-guide.modernisation-platform.service.justice.gov.uk
MIT License
681 stars 289 forks source link

Adding more user information to the member json files #7752

Closed SimonPPledger closed 3 weeks ago

SimonPPledger commented 2 months ago

User Story

As a product manager I want to have all the information we need as easily available as possible to the team.

As a result of the Member information spike https://github.com/ministryofjustice/modernisation-platform/issues/6317 it would be ideal if we could start tagging more info in organisations so that we can query pertinent member information from one place. Ticket #7570 is adding the application slack channel to member json files, this ticket is to look at what else, if anything, would be useful - eg any service urls, incident response hours, priority of the application (ie in the top x applications or not)

Value / Purpose

This should make working on incidents easier as it could potentially allow us to prioritise but also to find all the key info we need

Useful Contacts

No response

Additional Information

No response

Definition of Done

markgov commented 2 months ago

This is for items that can be consumed programatically and talks with Simon to get further information

markgov commented 1 month ago

created brainstorm session and it has been decided that this needs a separate meeting which i have setup for monday moving issue to block until after this meeting has concluded

markgov commented 1 month ago

need to add the following to the sprinkler json file critical-national-infastructure

markgov commented 1 month ago

New Issue created for missing OPA tests https://github.com/ministryofjustice/modernisation-platform/issues/8185

markgov commented 1 month ago

added new section to json file and created an opa policy test for the new section opa test currently failing investigating why

markgov commented 1 month ago

Need to amend all the environment json files to show the new section based on the following spreadsheet https://docs.google.com/spreadsheets/d/1IxzkAyX_yW-2jDg3NieH5onT6N274IoNNnitAbKYFnc/edit?gid=1878908955#gid=1878908955

markgov commented 1 month ago

installed conftest locally using brew ran the following command and got

~/git/modernisation-platform/policies │ on feat/JSON-file-amendments *4 ▓▒░ conftest verify -p ./environments                                                 ░▒▓ 1 х │ at 16:44:54
FAIL - environments/environment-definitions_test.rego -  - data.policies.environments.test_critical_national_infastructure_empty

14 tests, 13 passed, 0 warnings, 1 failure, 0 exceptions, 0 skipped

it is to do with the following line of code i added

test_critical_national_infastructure_empty if {
    deny["`example.json` is missing input for `critical-national-infastructure` "] with input as { "filename": "example.json", "critical-national-infastructure": [] }
}

which is no real difference to

test_empty_environments if {
  deny["`example.json` has no environments"] with input as { "filename": "example.json", "environments": [] }
}

not sure what's going on at the moment

richgreen-moj commented 1 month ago

@markgov - I fixed this for you having spent similar frustration looking at this before. See this commit

2 issues:

  1. You had the "environments": [] in your test scenario but were testing for the absence of it so it needed to go.
  2. The wording in the test has to be exactly identical to the wording in the policy or it doesn't register that they are linked.

I also fixed the typo 😸 (can talk through next week if unclear). Tests passing now!

markgov commented 1 month ago

Have updated the PR so that the opa test now work and also added in the filed to all environment json files this pr is the following https://github.com/ministryofjustice/modernisation-platform/pull/8191

markgov commented 1 month ago

started working on the go program that pulls all this information out of the json files

markgov commented 3 weeks ago

Main Pr moved after moving the field to under the tags section and created PR to update the runbook documentation for new accounts https://github.com/ministryofjustice/modernisation-platform/pull/8297

markgov commented 3 weeks ago

now deployed to all accounts except AP accounts and documentation pr has also been merged

sukeshreddyg commented 3 weeks ago

Have reviewed. Moving to done.