Skip to content

Bulk import functionality for telemetry devices #1550

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

Merged
merged 15 commits into from
Jun 3, 2025
Merged

Conversation

AMEIJER1
Copy link
Collaborator

@AMEIJER1 AMEIJER1 commented May 1, 2025

Description of Changes

  • Added the ability to import a csv of telemetry devices

@AMEIJER1 AMEIJER1 added the Ready For Review PR is ready for review label May 1, 2025
@AMEIJER1 AMEIJER1 requested a review from mauberti-bc May 1, 2025 22:57
Copy link

github-actions bot commented May 1, 2025

@AMEIJER1
Copy link
Collaborator Author

AMEIJER1 commented May 1, 2025

Currently duplicate records are just notified about, and the user has to come in and remove those duplicates. do we want the system to filter them out?

I also think I copied over the .test files from telemetry import when I created all the device import files and then I never modified them. So i will either have to make the tests work properly or I need to delete these totally 100% duplicate files.

@AMEIJER1 AMEIJER1 added the Do Not Merge PR should not be merged label May 1, 2025
@mauberti-bc
Copy link
Collaborator

Looks good! I'll test it more extensively on Monday but the code looks correct - nice work! The test files should basically be identical to the other csv import tests, they'll just call different functions and use different mock data. I can get the tests working if they're currently failing.

We should give users as few surprises as possible, so silently removing duplicates might be bad. Showing an error is probably better

@mauberti-bc mauberti-bc removed the Do Not Merge PR should not be merged label Jun 3, 2025
Copy link

codecov bot commented Jun 3, 2025

Codecov Report

Attention: Patch coverage is 51.18110% with 62 lines in your changes missing coverage. Please review.

Project coverage is 33.15%. Comparing base (2cdbc81) to head (0d520eb).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...elemetry/manage/devices/table/DevicesContainer.tsx 0.00% 39 Missing ⚠️
app/src/hooks/api/useTelemetryDeviceApi.ts 0.00% 16 Missing ⚠️
...s/import-services/devices/import-device-service.ts 91.89% 1 Missing and 2 partials ⚠️
app/src/utils/csv-templates.ts 0.00% 3 Missing ⚠️
...ct/{projectId}/survey/{surveyId}/devices/import.ts 96.87% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1550      +/-   ##
==========================================
+ Coverage   33.10%   33.15%   +0.04%     
==========================================
  Files        1031     1032       +1     
  Lines       64952    65053     +101     
  Branches     2358     2362       +4     
==========================================
+ Hits        21503    21568      +65     
- Misses      42911    42945      +34     
- Partials      538      540       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

mauberti-bc
mauberti-bc previously approved these changes Jun 3, 2025
Copy link
Collaborator

@mauberti-bc mauberti-bc left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link

sonarqubecloud bot commented Jun 3, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
12.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@mauberti-bc mauberti-bc merged commit ebd5b4e into dev Jun 3, 2025
23 of 24 checks passed
@mauberti-bc mauberti-bc deleted the device-import branch June 3, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants