Skip to content

script to generate csv for bulk tests#2694

Open
ben851 wants to merge 3 commits intomainfrom
append-phone-number-script
Open

script to generate csv for bulk tests#2694
ben851 wants to merge 3 commits intomainfrom
append-phone-number-script

Conversation

@ben851
Copy link
Copy Markdown
Contributor

@ben851 ben851 commented Nov 17, 2025

Summary | Résumé

This is just a quick script that will generate bulk load test CSVs.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

N/A

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

@ben851 ben851 requested a review from a team November 17, 2025 18:40
@ben851 ben851 requested a review from jimleroyer as a code owner November 17, 2025 18:40
Copilot AI review requested due to automatic review settings November 17, 2025 18:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a bash script for generating CSV files containing phone numbers for bulk load testing. The script creates files with auto-incrementing timestamped filenames and populates them with a configurable number of phone number entries.

Key Changes:

  • Added a new bash script that generates CSV files with phone numbers for performance testing
  • Implements filename collision avoidance using timestamps and counters
  • Includes progress reporting for long-running operations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


# Default base filename if none provided
BASE_FILENAME="${1:-phone_numbers}"
PHONE_NUMBER="+16135550123"
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

[nitpick] The hardcoded phone number should be extracted as a configurable parameter or documented as a test-specific number. This would make the script more flexible for different testing scenarios.

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +65
elif [ "$progress_interval" -lt 1000 ]; then
progress_interval=1000
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

When COUNT is less than 10, the progress_interval calculation results in 0, causing a division by zero error at line 68 when checking i % progress_interval == 0. Add a check to ensure progress_interval is at least 1, or skip progress reporting for very small counts.

Suggested change
elif [ "$progress_interval" -lt 1000 ]; then
progress_interval=1000
elif [ "$progress_interval" -lt 1 ]; then
progress_interval=1

Copilot uses AI. Check for mistakes.
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.

2 participants