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

SLT-1164: Make sure gdprDump generates unique usernames in user_field_data #737

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

k4lv15
Copy link

@k4lv15 k4lv15 commented Mar 12, 2025

Motivation

  • Current gdprDump config for user_field_data.name field doesn't check the uniques of the generated value, thus it can lead to entries with duplicate "names". That is against Drupal user_field_data DB table/index rules (see below) and would lead to errors in reference DB import, thus missing data.
image

This issue can present itself on large sites with thousands of users (i.e., 35k) as there is a hight change of gdprDump generating entries with duplicate usernames as I believe those are not completely randomized but rather generated from a given set of "names", "surnames", "titles" etc.

Changes proposed:

  • Make sure unique usernames are generated by gdprDump by explicitly setting unique: true property

@k4lv15 k4lv15 requested a review from Copilot March 12, 2025 10:28

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 aims to address the issue with duplicate usernames generated by gdprDump that can cause database conflicts in Drupal's user_field_data table.

  • Adds a new configuration to enforce unique username generation.
  • Updates the values.yaml file by adding the "unique: true" option under the user_field_data.name field.
Comments suppressed due to low confidence (1)

charts/drupal/values.yaml:510

  • Consider adding tests to verify that the gdprDump now consistently generates unique usernames when the 'unique' flag is enabled, ensuring compliance with Drupal's DB schema.
unique: true
@k4lv15 k4lv15 requested review from Rade333 and Jancis March 12, 2025 10:32
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.

1 participant