Skip to content

KAAP-656: Allowing users of type <name>@<domain>.<tld> to patch byohost objects #37

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vaibhavd21
Copy link

@vaibhavd21 vaibhavd21 commented May 12, 2025

Fixes https://platform9.atlassian.net/browse/KAAP-656

Summary by Bito

This PR enhances byohost webhook logic to properly handle email-like usernames by implementing a precompiled regex pattern for validation. The changes improve user identification during the admission process, allowing email-format usernames to be properly processed. This update addresses the issue reported in the related ticket.

Unit tests added: False

Estimated effort to review (1-5, lower is better): 1

Copy link

bito-code-review bot commented May 12, 2025

Code Review Agent Run #5ec63f

Actionable Suggestions - 0
Additional Suggestions - 1
  • apis/infrastructure/v1beta1/byohost_webhook.go - 1
    • Redundant email validation with conflicting logic flow · Line 62-65
Review Details
  • Files reviewed - 1 · Commit Range: cafc828..cafc828
    • apis/infrastructure/v1beta1/byohost_webhook.go
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

Copy link

Changelist by Bito

This pull request implements the following key changes.

Key Change Files Impacted
Feature Improvement - Enhancements to Email Username Handling

byohost_webhook.go - Introduced a precompiled regex for email-like usernames and added a new check in the admission webhook to allow users with email-formatted names.

Copy link

@cruizen cruizen left a comment

Choose a reason for hiding this comment

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

LGTM.

Nitpick: Can we add data-driven unit tests to show example patterns that match and a few that don't?

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