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

feat: add mesh retrival function #26

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

millsotron-ibm
Copy link
Contributor

@millsotron-ibm millsotron-ibm commented Sep 16, 2024

Description

Add scheduled ReceiveMeshMailbox Function to get payload from mesh mailbox and send to the azurite blob sample-container.

Added associated shared functions to support the ReceiveMeshMailbox function.

Added unit tests for the ReceiveMeshMailbox function.

Updated CICD pipelines to include dependencies for mesh mailbox client in build and test.

Context

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-4076

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@alex-clayton-1
Copy link
Contributor

Can you rename the PR title to follow the naming convention, please

@millsotron-ibm millsotron-ibm changed the title Feat/dtoss 4076/mesh retrival function feat: add mesh retrival function Sep 18, 2024
SamTyrrellNHS
SamTyrrellNHS previously approved these changes Sep 23, 2024
src/BSSelectIntegrationService/RetrieveMeshFile/Program.cs Outdated Show resolved Hide resolved
src/ServiceInsights.sln Outdated Show resolved Hide resolved
src/Shared/Common/BlobstorageHelper.cs Outdated Show resolved Hide resolved
src/Shared/Common/Interfaces/IBlobstorageHelper.cs Outdated Show resolved Hide resolved
src/Shared/Common/Interfaces/IMeshtoBlobTransferHandler.cs Outdated Show resolved Hide resolved
src/Shared/Common/MeshToBlobTransferHandler.cs Outdated Show resolved Hide resolved
src/Shared/Common/BlobstorageHelper.cs Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename this file to IBlobStorageHelper.cs, please

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rename the folders to tests/MeshIntegrationServiceTests/RetrieveMeshFileTests/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to rename the retrieveMeshFileTest folder to RetrieveMeshFileTests

@millsotron-ibm millsotron-ibm force-pushed the feat/DTOSS-4076/MeshRetrivalFunction branch from b068dfd to 94d51b1 Compare September 25, 2024 13:38
}
/// <summary>
/// This function polls the MESH Mailbox every 5 minutes, if there is a file posted to the mailbox.
/// If there is a file in there will move the file to the Service Insights Blob Storage where it will be picked up by the ReceiveCaasFile Function.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReceiveCaasFile is from Cohort Manager

using Microsoft.Extensions.Logging;
using NHS.MESH.Client.Models;

namespace NHS.Screening.RetrieveMeshFile;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Namespace should be NHS.ServiceInsights.MeshIntegrationService

"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"MeshApiBaseUrl" : "http://localhost:8700/messageexchange",
"BSSMailBox": "X26ABC1",
"bssfolder_STORAGE":"UseDevelopmentStorage=true",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the AzureWebJobsStorage environment variable instead of creating an additional variable with the same value?

"MeshApiBaseUrl" : "http://localhost:8700/messageexchange",
"BSSMailBox": "X26ABC1",
"bssfolder_STORAGE":"UseDevelopmentStorage=true",
"bsscontainer_NAME": "sample-container",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency can you use PascalCase here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to rename the retrieveMeshFileTest folder to RetrieveMeshFileTests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename file to RetrieveMeshFileTests, please

using NHS.ServiceInsights.Model;
using NHS.ServiceInsights.Tests.BSSelectIntegrationTests;

namespace NHS.Screening.RetrieveMeshFile;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Namespace should be NHS.ServiceInsights.MeshIntegrationServiceTests


namespace NHS.Screening.RetrieveMeshFile;
[TestClass]
public class RetrieveMeshFileTest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename class to RetrieveMeshFileTests, please

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.

4 participants