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

Improve handling of SRE names #1699

Merged
merged 6 commits into from
Jan 25, 2024
Merged

Improve handling of SRE names #1699

merged 6 commits into from
Jan 25, 2024

Conversation

JimMadge
Copy link
Member

@JimMadge JimMadge commented Jan 9, 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).
  • You have formatted your code using appropriate automated tools (for example ./tests/AutoFormat_Powershell.ps1 -TargetPath <path to file or directory> for Powershell).

⤴️ Summary

Improve how SRE names are handled,

  • Use a single function for sanitising the name from user input across the code
  • Remove unused methods/lines for adding/removing SREs (this is done in the config)

🌂 Related issues

Closes #1687

🔬 Tests

@JimMadge JimMadge changed the title [WIP] Improve handling of SRE names Improve handling of SRE names Jan 11, 2024
@JimMadge JimMadge requested a review from craddm January 11, 2024 11:47
@JimMadge JimMadge marked this pull request as ready for review January 11, 2024 11:47
Base automatically changed from selected to config January 15, 2024 15:36
Base automatically changed from config to pydantic January 15, 2024 15:37
Base automatically changed from pydantic to python-migration January 19, 2024 09:00
@JimMadge JimMadge requested a review from jemrobinson January 25, 2024 14:25
@JimMadge
Copy link
Member Author

@craddm @jemrobinson could we get reviews on this? It impacts #1716

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.

Mostly looks fine, but we should think about how to remove deleted SREs from the config file if there's no remove_sre function.

data_safe_haven/config/config.py Show resolved Hide resolved
@JimMadge JimMadge requested a review from jemrobinson January 25, 2024 15:29
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.

LGTM

@JimMadge JimMadge merged commit 3951e40 into python-migration Jan 25, 2024
9 checks passed
@JimMadge JimMadge deleted the sre_name branch January 25, 2024 15:31
@JimMadge JimMadge mentioned this pull request Feb 9, 2024
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.

2 participants