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

Add confirmation checks and check for deployed SREs before teardown operations #2266

Merged
merged 31 commits into from
Oct 30, 2024

Conversation

craddm
Copy link
Contributor

@craddm craddm commented Oct 28, 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).

🚦 Depends on

⤴️ Summary

Prevents SHM teardown if an SRE linked to the current SHM is deployed, and adds a confirmation step before teardown
image

Adds a confirmation step before SRE teardown
image

🌂 Related issues

Closes #2252

🔬 Tests

Tested locally

@craddm craddm changed the title [WIP] Prevent teardown of SHM if any SREs are deployed within it [WIP] Add confirmation checks and check for deployed SREs before teardown operations Oct 28, 2024
@craddm craddm changed the title [WIP] Add confirmation checks and check for deployed SREs before teardown operations Add confirmation checks and check for deployed SREs before teardown operations Oct 28, 2024
Copy link

github-actions bot commented Oct 29, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/commands
  shm.py 156-157
  sre.py
  data_safe_haven/infrastructure/programs
  imperative_shm.py
Project Total  

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

@craddm craddm marked this pull request as ready for review October 29, 2024 10:08
@craddm craddm requested a review from a team as a code owner October 29, 2024 10:08
data_safe_haven/commands/shm.py Outdated Show resolved Hide resolved
data_safe_haven/commands/shm.py Outdated Show resolved Hide resolved
data_safe_haven/commands/sre.py Outdated Show resolved Hide resolved
data_safe_haven/commands/sre.py Outdated Show resolved Hide resolved
data_safe_haven/infrastructure/programs/imperative_shm.py Outdated Show resolved Hide resolved
tests/commands/test_shm.py Outdated Show resolved Hide resolved
tests/commands/test_sre.py Outdated Show resolved Hide resolved
Copy link
Member

@JimMadge JimMadge left a comment

Choose a reason for hiding this comment

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

I think we need to be careful to not knowingly introduce a bug here. Other than that it looks great.

data_safe_haven/infrastructure/programs/imperative_shm.py Outdated Show resolved Hide resolved
Copy link
Member

@JimMadge JimMadge left a comment

Choose a reason for hiding this comment

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

Great 👍

Copy link
Member

@JimMadge JimMadge left a comment

Choose a reason for hiding this comment

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

Even better! 🚀 😆

@craddm craddm merged commit 51de416 into alan-turing-institute:develop Oct 30, 2024
11 checks passed
@craddm craddm deleted the shm-check branch November 6, 2024 10:52
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.

Enhance the teardown documentation for clarity
2 participants