-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/group audit updates #326
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For now, set blank=True so that we can have a data migration to populate the email field from the group name. (Most groups on Terra have @firecloud.org as the suffix.)
Since the data migration sets the email for each group, the ManagedGroup model can now remove blank and add a unique constraint to the email field. Note: tests are broken
Also fix a minor bug in the migration itself - it was not lowering the group name.
For now, add some responses for ManagedGroups. This is intended to replace the get_api_json_response methods in tests (eventually).
Set the email when creating the object to the default @firecloud.org email. Use the new api_factory classes in tests and remove the get_api_json_response method. This still does not handle the case when a group email is different than the name.
Instead of using get_email() when auditing managed group group membership, use the group.email field. Add tests to check this.
When creating a managed group on AnVIL, set the email to the default before saving the object.
Use the email field instead of the (now deprecated) get_email method.
This breaks a LOT of tests and functionality, which will now need to be updated to use the email field instead of this method.
Use the email field instead.
Add a test is intended to capture the case where a group in the app is marked as "is_managed_by_app" but the app is not a member of the group on AnVIL (either as as a member or an admin). With the previous changes, this would have returned a correct audit, but it was actually incorrect.
Codecov Report
@@ Coverage Diff @@
## main #326 +/- ##
========================================
Coverage 99.79% 99.79%
========================================
Files 107 112 +5
Lines 20315 20460 +145
========================================
+ Hits 20274 20419 +145
Misses 41 41
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ManagedGroup.anvil_audit
method to handle groups that exist in AnVIL but that the app is not part of.Closes #324