Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect against configuration changes #1881

Merged
merged 13 commits into from May 15, 2024
Merged

Protect against configuration changes #1881

merged 13 commits into from May 15, 2024

Conversation

JimMadge
Copy link
Member

@JimMadge JimMadge commented May 10, 2024

✅ Checklist

  • You have given your pull request a meaningful title (e.g. Enable foobar integration rather than 515 foobar).
  • You are targeting the appropriate branch. If you're not certain which one this is, it should be develop.
  • Your branch is up-to-date with the target branch (it probably was when you started, but it may have changed since then).
  • You have marked this pull request as a draft and added '[WIP]' to the title if needed (if you're not yet ready to merge).

⤴️ Summary

Add protection for configuration changes,

  • Add method to print diff in YAML for YamlSerialisableModel
  • Add method to print diff for local/remote for AzureSerialisableModel
  • Improve upload commands to prompt user before making changes to config
    • displays diff to user, asks for y/n
  • Tests for methods and commands

🌂 Related issues

Closes #1714

🔬 Tests

Copy link

github-actions bot commented May 10, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/commands
  config.py
  data_safe_haven/serialisers
  azure_serialisable_model.py
  yaml_serialisable_model.py
  data_safe_haven/utility
  logger.py
  tests/commands
  test_config.py
  tests/serialisers
  test_azure_serialisable_model.py
  test_yaml_serialisable_model.py
Project Total  

This report was generated by python-coverage-comment-action

@JimMadge JimMadge marked this pull request as ready for review May 13, 2024 14:01
@JimMadge JimMadge requested a review from a team as a code owner May 13, 2024 14:01
Copy link
Member

@jemrobinson jemrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. A couple of questions.

tests/commands/test_config.py Outdated Show resolved Hide resolved
data_safe_haven/commands/config.py Show resolved Hide resolved
data_safe_haven/commands/config.py Show resolved Hide resolved
Copy link
Contributor

@craddm craddm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JimMadge JimMadge merged commit 9a4fdcc into develop May 15, 2024
11 checks passed
@JimMadge JimMadge deleted the upload_check branch May 15, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pulumi: Context with multiple administrators
3 participants