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

Stop unnecessary resource recreation #2034

Conversation

jemrobinson
Copy link
Member

@jemrobinson jemrobinson commented Jul 22, 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

n/a

⤴️ Summary

  • Exclude self.auth_token from the diff when deciding whether a new EntraApplication is needed.
  • Exclude start_date_time when deciding whether a new MaintenanceConfiguration is needed

🌂 Related issues

Closes #2028

🔬 Tests

Testing in progress.

Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  data_safe_haven/infrastructure/components/dynamic
  entra_application.py 121
Project Total  

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

@jemrobinson jemrobinson changed the title WIP: Stop unnecessary Entra Application recreation Stop unnecessary Entra Application recreation Jul 23, 2024
@jemrobinson jemrobinson marked this pull request as ready for review July 23, 2024 06:47
@jemrobinson jemrobinson requested a review from a team as a code owner July 23, 2024 06:47
@jemrobinson jemrobinson mentioned this pull request Jul 23, 2024
3 tasks
@jemrobinson jemrobinson force-pushed the 2028-fix-entra-application-updates branch from f5a4e56 to b7d6039 Compare July 23, 2024 06:54
@jemrobinson jemrobinson changed the title Stop unnecessary Entra Application recreation Stop unnecessary resource recreation Jul 23, 2024
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.

LGTM.

I think it is fine to exclude the __provider and take the consequences of that as known limitations.

Might want to open an issue to document that?

@jemrobinson
Copy link
Member Author

I think the limitations are pretty minor. If we change the class signature (e.g. by adding a new method or attribute) then this won't trigger a redeploy of the Entra Application. However, if we've got a working Application, it's unlikely that we want a change to the Provider class to trigger a redeploy anyway. This is documented in the comment which I think is actually more useful than an issue in this case.

@jemrobinson jemrobinson merged commit 59538a9 into alan-turing-institute:develop Jul 23, 2024
11 checks passed
@jemrobinson jemrobinson deleted the 2028-fix-entra-application-updates branch January 30, 2025 11:46
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.

Entra applications being replaced on each deploy
2 participants