GH-1810 metadata form enforcement email reminder#1838
Open
LLY0203 wants to merge 7 commits intodata-dot-all:mainfrom
Open
GH-1810 metadata form enforcement email reminder#1838LLY0203 wants to merge 7 commits intodata-dot-all:mainfrom
LLY0203 wants to merge 7 commits intodata-dot-all:mainfrom
Conversation
| MetadataFormEntityTypes.Share.value: MetadataFormEnforcementScope.Dataset, | ||
| } | ||
|
|
||
| ENTITY_LINK_MAP = { |
Contributor
There was a problem hiding this comment.
Is there any particular reason you need this exact new mapping? Why can't we reuse the existing one?
| # Send notification by email | ||
| try: | ||
| # skip if the owner is an individual user | ||
| if entity['attached'] is None and "@" not in owner: |
Contributor
There was a problem hiding this comment.
Isn't this condition very specific? What 'individual user' means? May be we can put it in shared functions, so we could refer to it in other places as well?
| """ | ||
|
|
||
| try: | ||
| if recipient_groups_list is None: |
Contributor
There was a problem hiding this comment.
I suggest
recipient_groups_list = recipient_groups_list or []
recipient_email_ids = recipient_email_ids or []
| ) | ||
|
|
||
| subject = ( | ||
| f'ACTION REQUIRED: Data.all | Metadata form "{mf_name}" required for {entity["type"]} {entity["uri"]}' |
Contributor
There was a problem hiding this comment.
May be we can add entity name here.
Smth like 'dataset TestName (uri)'
| identityProvider = ServiceProviderFactory.get_service_provider_instance() | ||
|
|
||
| # find all metadata forms | ||
| all_mfs = MetadataFormRepository.query_user_metadata_forms(session, is_da_admin=True, groups=None, env_uris=None, org_uris=None, filter=None).all() |
Contributor
There was a problem hiding this comment.
This task is executed in Ecs and not so time-sensitive. But for issue #1807 this will be timesensitive issue.
- I would place this function in
mf_enforcement_servicesince it performs business logic and can be reused - Maybe we should think about creating a view in DB, where all unattached entities will be stored. It can speed up such operations
SofiaSazonova
suggested changes
Jul 14, 2025
Contributor
SofiaSazonova
left a comment
There was a problem hiding this comment.
Left some comments about structure
This file contains hidden or 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
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.
Feature or Bugfix
Detail
Relates
Security
Please answer the questions below briefly where applicable, or write
N/A. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
evalor similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.