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

Derive profile name from display name in ProfileService.CreateProfile #4335

Merged
merged 7 commits into from
Sep 13, 2024

Commits on Sep 1, 2024

  1. Derive profile name from display name in ProfileService.CreateProfile

    Currently, clients of the API are required to derive the profile name from the display name using various transformations.
    This results in duplicated logic across the ecosystem, increasing complexity and potential inconsistencies.
    
    This commit scopes the logic to derive the profile name from the display name to the ProfileService.CreateProfile endpoint.
    By centralizing this logic, we reduce redundancy and simplify client code.
    Clients of the API are no longer need to implement logic to deriive the profile name when creating a new profile.
    
    Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>
    gajananan committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    7b54130 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2024

  1. Derive profile name from display name in ProfileService.CreateProfile

    Define regexes to be a global but non exported variable.
    Refactor unit test to test `DeriveProfileNameFromDisplayName` instead of `cleanDisplayName` which is not exported anymore.
    
    Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>
    gajananan committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    7d9e174 View commit details
    Browse the repository at this point in the history
  2. Derive profile name from display name in ProfileService.CreateProfile

    Handle cases where the derived profile name already exists in the same project.
    
    Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>
    gajananan committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    0fb4539 View commit details
    Browse the repository at this point in the history
  3. Derive profile name from display name in ProfileService.CreateProfile

    Remove empty line
    
    Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>
    gajananan committed Sep 7, 2024
    Configuration menu
    Copy the full SHA
    fd597b9 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Derive profile name from display name in ProfileService.CreateProfile

    Added additional test to increase coverage
    
    Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>
    gajananan committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    2aaba5f View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Derive profile name from display name in ProfileService.CreateProfile

    Fixed duplicated test names
    Fixed DeriveProfileNameFromDisplayName to handle the edge cases where the name will exceed 63 characters once we append the counter.
    Added unit-tests for edge cases
    
    Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>
    gajananan committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    a06ba8a View commit details
    Browse the repository at this point in the history
  2. Derive profile name from display name in ProfileService.CreateProfile

    Remoed hardcoded value for profileNameMaxLength
    
    Signed-off-by: Kugamoorthy Gajananan <gajananan@gmail.com>
    gajananan committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    c519556 View commit details
    Browse the repository at this point in the history