Skip to content

Sbp 481 extension#108

Open
vtnphan wants to merge 3 commits into
devfrom
sbp-481-extension
Open

Sbp 481 extension#108
vtnphan wants to merge 3 commits into
devfrom
sbp-481-extension

Conversation

@vtnphan

@vtnphan vtnphan commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

SBP-481 Encode email in cluster options before sending to NCI GADI

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added or updated documentation where necessary
  • I have run linting and unit tests locally
  • The code follows the project's style guidelines

@vtnphan
vtnphan marked this pull request as ready for review July 22, 2026 04:46
@vtnphan
vtnphan requested a review from marius-mather July 22, 2026 04:47

@marius-mather marius-mather left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, let's just reduce the repetition and move the encoding logic in to a shared spot

@@ -7,20 +7,25 @@
import importlib

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would be good to have some simple unit tests of encoding email addresses, to show the expected input and output

Comment thread app/services/bindflow_config.py Outdated

account = (
f"{user_details.user_email}:{encode_ip(user_details.ip_address)}"
f"{encode_value(user_details.user_email)}:{encode_value(user_details.ip_address)}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This logic is being repeated multiple times, it should be moved into a shared function. You could create a get_encoded_account_details() method on UserDetails

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