Implementation of Azure notification publisher for about to expire legal tags
All Submissions:
- [YES] I have added an explanation of what changes in this merge do and why we should include it?
- [YES] I have updated the documentation accordingly.
- [YES] I have added tests to cover my changes.
- [YES] All new and existing tests passed.
- [YES] My code follows the code style of this project.
- [YES] I ran lint checks locally prior to submission.
What is the current behavior?
Extend cron to catch about to expire legal tags already implemented detection of about to expire legal tags, however, notification publisher for Azure had not yet been implemented
What is the new behavior?
This is the Azure implementation of notification publisher described in ADR: OSDU Legal Tags - send notification before tag expire.
- Added implementation for AboutToExpireLegalTagPublisherImpl.publish()
- Moved common code from LegalTagPublisherImpl.java to new AbstractPublisher base class
- Updated unit tests
- Set
featureFlag.aboutToExpireLegalTag.enabled=true
for Azure
Does this introduce a breaking change?
- NO
Any relevant logs, error output, etc?
Sample run from Glab environment:
2024-12-12T21:14:49.430Z INFO 1 --- [legal] [p-nio-80-exec-1] TxnLogger : legal.app Start Web-API GET /jobs/updateLegalTagStatus Headers: {data-partition-id:opendes} {correlation-id=5f07dc91-e110-4ba1-a64b-689ab617291b, data-partition-id=opendes}
2024-12-12T21:15:31.090Z INFO 1 --- [legal] [smos-parallel-1] c.a.c.i.RxDocumentClientImpl : Getting database account endpoint from https://osdu-mvp-dp1glab-ky7v-db.documents.azure.com:443/
2024-12-12T21:16:07.874Z INFO 1 --- [legal] [p-nio-80-exec-1] o.o.osdu.azure.logging.Slf4JLogger : legal.app Found legal tag about to expire: opendes-wes-test-about-to-expire3 at 2024-12-13 {correlation-id=5f07dc91-e110-4ba1-a64b-689ab617291b, data-partition-id=opendes}
2024-12-12T21:16:10.020Z INFO 1 --- [legal] [p-nio-80-exec-1] o.o.osdu.azure.logging.Slf4JLogger : legal.audit {auditLog={resources=[org.opengroup.osdu.legal.jobs.models.LegalTagJobResult@364432ae], action=JOB_RUN, actionId=LG104, message=Legal tag status job run success, user=4114a503-7d3e-4ea3-b15d-fc8aa0056e8c, status=SUCCESS}} {correlation-id=5f07dc91-e110-4ba1-a64b-689ab617291b, data-partition-id=opendes}
2024-12-12T21:16:10.021Z INFO 1 --- [legal] [p-nio-80-exec-1] TxnLogger : legal.app End Web-API GET /jobs/updateLegalTagStatus Headers: {correlation-id:5f07dc91-e110-4ba1-a64b-689ab617291b} status=204 time=80591 ms
Resulting message on service bus:
Other information
n/a
Edited by Wesley Evans