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

Feature/1030_-_Synchronize devices between IoT Hub and Portal database #1276

Conversation

Sben65
Copy link
Contributor

@Sben65 Sben65 commented Sep 22, 2022

Description

What's new?

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Base: 88.22% // Head: 87.29% // Decreases project coverage by -0.92% ⚠️

Coverage data is based on head (ef2bf12) compared to base (08a9b4b).
Patch coverage: 53.22% of modified lines in pull request are covered.

❗ Current head ef2bf12 differs from pull request most recent head 77b5759. Consider uploading reports for the commit 77b5759 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1276      +/-   ##
==========================================
- Coverage   88.22%   87.29%   -0.93%     
==========================================
  Files         222      228       +6     
  Lines        6826     7012     +186     
==========================================
+ Hits         6022     6121      +99     
- Misses        804      891      +87     
Impacted Files Coverage Δ
...c/AzureIoTHub.Portal/Server/Jobs/SyncDevicesJob.cs 0.00% <0.00%> (ø)
...AzureIoTHub.Portal/Server/Mappers/DeviceProfile.cs 67.12% <67.12%> (ø)
....Portal.Infrastructure/DevelopmentConfigHandler.cs 100.00% <100.00%> (ø)
...b.Portal.Infrastructure/ProductionConfigHandler.cs 100.00% <100.00%> (ø)
...al.Infrastructure/Repositories/DeviceRepository.cs 100.00% <100.00%> (ø)
...astructure/Repositories/LorawanDeviceRepository.cs 100.00% <100.00%> (ø)
src/AzureIoTHubPortal.Domain/Entities/Device.cs 100.00% <100.00%> (ø)
...AzureIoTHubPortal.Domain/Entities/LorawanDevice.cs 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment on lines +75 to +81
foreach (var tag in tagList)
{
if (tag.Key is not "modelId" and not "deviceName")
{
customTags.Add(tag.Key, tag.Value.ToString());
}
}

Check notice

Code scanning / CodeQL

Missed opportunity to use Where

This foreach loop implicitly filters its target sequence [here](1) - consider filtering the sequence explicitly using '.Where(...)'.
@Sben65 Sben65 force-pushed the Feature/1030_-_Synchronize_Devices_between_IoT_Hub_and_Portal branch from ef2bf12 to 77b5759 Compare September 23, 2022 13:15
Comment on lines +78 to +81
catch (System.Exception)
{
this.logger.LogWarning($"Error while attenpting to insert LoRa device {twin.DeviceId}.");
}

Check notice

Code scanning / CodeQL

Generic catch clause

Generic catch clause.
@hocinehacherouf hocinehacherouf deleted the Feature/1030_-_Synchronize_Devices_between_IoT_Hub_and_Portal branch September 23, 2022 18:00
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.

Feature: Synchronize Devices between IoT Hub and Portal database
2 participants