Skip to content

feat: regenerate protos from v0.1.123.0 and add slug/logo_url to CreateOrganizationOptions#162

Open
srinivaskarre-sk wants to merge 9 commits into
mainfrom
b_template_redirect_logo
Open

feat: regenerate protos from v0.1.123.0 and add slug/logo_url to CreateOrganizationOptions#162
srinivaskarre-sk wants to merge 9 commits into
mainfrom
b_template_redirect_logo

Conversation

@srinivaskarre-sk
Copy link
Copy Markdown
Contributor

@srinivaskarre-sk srinivaskarre-sk commented May 21, 2026

Summary

  • Regenerated all Python proto stubs from tag v0.1.123.0
  • Updated Makefile with PROTO_REF=v0.1.123.0 and SSH-format PROTO_REPO_URL
  • Python's create_organization(CreateOrganization(...)) already supports logo_url and slug via proto fields

Summary by CodeRabbit

  • New Features

    • Environment test-user management: new Get/Update test-user operations with TestUser payloads.
    • Portal and organization customizations now include organization-level branding, settings, and logo support.
    • Organization create/update now accept and return a logo URL.
  • Tests

    • Added tests verifying organization logo URL and slug persist across create and update operations.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Bumps proto ref to v0.1.123.0 and regenerates Python protobuf/gRPC bindings: adds OrganizationCustomizations and logo_url fields, introduces TestUser and Environment Get/UpdateEnvironmentTestUser RPCs, updates descriptors across modules, and adds tests for organization logo/slug persistence.

Changes

Proto v0.1.123.0 Regeneration

Layer / File(s) Summary
Proto generation configuration
Makefile
Default PROTO_REF bumped to v0.1.123.0.
OrganizationCustomizations type definition
scalekit/v1/commons/commons_pb2.py, scalekit/v1/commons/commons_pb2.pyi
Adds OrganizationCustomizations message and updates commons descriptor serialized payload and offsets.
Organization logo_url fields
scalekit/v1/organizations/organizations_pb2.pyi
Adds logo_url to CreateOrganization, Organization, and UpdateOrganization stubs with field constants and constructor args.
Auth organization_customizations field
scalekit/v1/auth/*
Regenerated auth descriptors; GetAuthCustomizationsResponse gains organization_customizations and Organization gains logo_url in stubs.
Environment test-user API and portal customizations
scalekit/v1/environments/*
Introduces TestUser message, GetEnvironmentTestUser / UpdateEnvironmentTestUser RPCs and messages, adds organization_customizations to portal customization responses, and updates gRPC stubs/experimental client helpers.
Domain descriptor updates
scalekit/v1/domains/domains_pb2.py
Regenerates domain descriptors updating verification field docs/options and serialized offsets.
Tools connector validation updates
scalekit/v1/tools/tools_pb2.py
Regenerates tools descriptors adjusting connector field validation/metadata and offsets.
Organization logo/slug tests
tests/test_organization_slug_logo.py
New tests validating create/update persistence for logo_url, slug, and metadata.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Avinash-Kamath

Poem

🐰 I hopped through bytes and schema trees,
New logos, tests, and RPCs,
Tags bumped, descriptors spun with care,
Test users, logos—now they're there,
A tiny rabbit's joyous hop.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.91% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main changes: regenerating protos from a new version tag and adding two new fields to the CreateOrganizationOptions (logo_url and slug support).
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch b_template_redirect_logo

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Makefile`:
- Line 14: The Makefile currently defaults PROTO_REPO_URL to the SSH form which
breaks CI and fresh dev setups; change the PROTO_REPO_URL default to the HTTPS
repo URL (https://github.com/scalekit-inc/scalekit.git) while keeping the
ability to override it via environment or make invocation (i.e., leave the
variable assignment as an overrideable Makefile variable like PROTO_REPO_URL ?=
... or similar), and document briefly in a comment that SSH is supported by
overriding PROTO_REPO_URL to git@github.com:... for devs with SSH access.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fcffaf10-7d3e-4320-819e-ba4cb9ea110e

📥 Commits

Reviewing files that changed from the base of the PR and between dffa1c8 and 218dcb7.

📒 Files selected for processing (15)
  • Makefile
  • scalekit/v1/auth/auth_pb2.py
  • scalekit/v1/auth/auth_pb2.pyi
  • scalekit/v1/clients/clients_pb2.py
  • scalekit/v1/commons/commons_pb2.py
  • scalekit/v1/commons/commons_pb2.pyi
  • scalekit/v1/connected_accounts/connected_accounts_pb2.py
  • scalekit/v1/domains/domains_pb2.py
  • scalekit/v1/environments/environments_pb2.py
  • scalekit/v1/environments/environments_pb2.pyi
  • scalekit/v1/environments/environments_pb2_grpc.py
  • scalekit/v1/organizations/organizations_pb2.py
  • scalekit/v1/organizations/organizations_pb2.pyi
  • scalekit/v1/roles/roles_pb2.py
  • scalekit/v1/tools/tools_pb2.py

Comment thread Makefile Outdated

PROTO_REPO_URL := https://github.com/scalekit-inc/scalekit.git
PROTO_REF ?= v0.1.121.2
PROTO_REPO_URL := git@github.com:scalekit-inc/scalekit.git
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Defaulting to SSH repo URL can break make generate in CI and fresh dev environments.

Using git@github.com:... as the default requires SSH key setup and repo access; this can fail for contributors and automation that previously worked with HTTPS. Prefer HTTPS as the default and keep SSH as an override.

Suggested change
-PROTO_REPO_URL := git@github.com:scalekit-inc/scalekit.git
+PROTO_REPO_URL ?= https://github.com/scalekit-inc/scalekit.git
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
PROTO_REPO_URL := git@github.com:scalekit-inc/scalekit.git
PROTO_REPO_URL ?= https://github.com/scalekit-inc/scalekit.git
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Makefile` at line 14, The Makefile currently defaults PROTO_REPO_URL to the
SSH form which breaks CI and fresh dev setups; change the PROTO_REPO_URL default
to the HTTPS repo URL (https://github.com/scalekit-inc/scalekit.git) while
keeping the ability to override it via environment or make invocation (i.e.,
leave the variable assignment as an overrideable Makefile variable like
PROTO_REPO_URL ?= ... or similar), and document briefly in a comment that SSH is
supported by overriding PROTO_REPO_URL to git@github.com:... for devs with SSH
access.

Tests create and update paths for the new slug and logo_url proto fields
on CreateOrganization and UpdateOrganization. logo_url tests skip gracefully
when the backend has not yet deployed support for that field.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test_organization_slug_logo.py`:
- Line 41: The tests use a hardcoded slug variable (slug = 'app.acmecorp.com')
which can collide across parallel/integration runs; update the tests in
tests/test_organization_slug_logo.py to generate a unique slug for each run
(e.g., append or replace with a UUID or timestamp) wherever slug is defined
(including the occurrences around lines 41 and 77-79) so each test creates/uses
an isolated org slug; ensure the generated slug still conforms to any validation
rules used by functions under test (e.g., create_organization or similar helper
functions) so assertions remain valid.
- Around line 11-13: TestOrganizationSlugLogo overrides tearDown without calling
BaseTest.tearDown, skipping the CI-required delay in BaseTest.tearDown and
risking flakiness; update TestOrganizationSlugLogo.tearDown to call
super().tearDown() (ensure the method name TestOrganizationSlugLogo.tearDown is
updated to invoke super().tearDown() before/after any local cleanup) so the
BaseTest.tearDown logic runs in CI.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ccbeb60b-acbc-459e-8ca8-68dfbc1ff90c

📥 Commits

Reviewing files that changed from the base of the PR and between 218dcb7 and 5a504b5.

📒 Files selected for processing (1)
  • tests/test_organization_slug_logo.py

Comment thread tests/test_organization_slug_logo.py
Comment thread tests/test_organization_slug_logo.py Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (3)
tests/test_organization_slug_logo.py (3)

90-92: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Chain BaseTest.tearDown to preserve CI delay.

The BaseTest.tearDown() includes a 1-second sleep when running in CI (GITHUB_ACTIONS == 'true'). Overriding without calling super().tearDown() skips that delay and can increase flakiness.

🔧 Proposed fix
     def tearDown(self):
         if self.org_id:
             self.scalekit_client.organization.delete_organization(organization_id=self.org_id)
+        super().tearDown()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_organization_slug_logo.py` around lines 90 - 92, The test's
tearDown overrides BaseTest.tearDown and skips its CI delay, causing flakiness;
update the tearDown in tests/test_organization_slug_logo.py to call
super().tearDown() (i.e., preserve BaseTest.tearDown behavior which includes the
1s sleep when GITHUB_ACTIONS is true) before or after performing the
organization deletion with
scalekit_client.organization.delete_organization(organization_id=self.org_id) so
the CI delay is not skipped.

39-51: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use unique slugs to avoid test collisions.

The hardcoded slug = 'app.acmecorp.com' can cause failures if tests run in parallel or if cleanup from previous runs is incomplete.

🔧 Proposed fix
-        slug = 'app.acmecorp.com'
+        slug = f"app-{Faker().uuid4()[:8]}.acmecorp.com"
         organization = CreateOrganization(
             display_name=Faker().company(),
             external_id=Faker().uuid4(),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_organization_slug_logo.py` around lines 39 - 51, The
test_create_with_slug uses a hardcoded slug which can collide across runs;
change the slug assignment to generate a unique value (e.g., append a
UUID/timestamp or use Faker.unique) before building the CreateOrganization
object so that CreateOrganization(..., slug=slug) and the subsequent assertion
against response[0].organization.slug always use a unique slug when calling
scalekit_client.organization.create_organization.

73-88: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use unique slugs to avoid test collisions.

The hardcoded slug = 'app.acmecorp.com' can cause failures if tests run in parallel or if cleanup from previous runs is incomplete.

🔧 Proposed fix
-        slug = 'app.acmecorp.com'
-        metadata = {'custom_domain': 'app.acmecorp.com'}
+        slug = f"app-{Faker().uuid4()[:8]}.acmecorp.com"
+        metadata = {'custom_domain': slug}
         update_organization = UpdateOrganization(slug=slug, metadata=metadata)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/test_organization_slug_logo.py` around lines 73 - 88, The
test_update_slug_and_metadata uses a hardcoded slug ('app.acmecorp.com') which
can collide across parallel runs; update the test_update_slug_and_metadata to
generate a unique slug per run (e.g., append a short uuid/timestamp or use the
created org_id) before building the UpdateOrganization object so
UpdateOrganization(slug=...) and metadata use that unique value; ensure
assertions still compare against the generated slug and metadata.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@tests/test_organization_slug_logo.py`:
- Around line 90-92: The test's tearDown overrides BaseTest.tearDown and skips
its CI delay, causing flakiness; update the tearDown in
tests/test_organization_slug_logo.py to call super().tearDown() (i.e., preserve
BaseTest.tearDown behavior which includes the 1s sleep when GITHUB_ACTIONS is
true) before or after performing the organization deletion with
scalekit_client.organization.delete_organization(organization_id=self.org_id) so
the CI delay is not skipped.
- Around line 39-51: The test_create_with_slug uses a hardcoded slug which can
collide across runs; change the slug assignment to generate a unique value
(e.g., append a UUID/timestamp or use Faker.unique) before building the
CreateOrganization object so that CreateOrganization(..., slug=slug) and the
subsequent assertion against response[0].organization.slug always use a unique
slug when calling scalekit_client.organization.create_organization.
- Around line 73-88: The test_update_slug_and_metadata uses a hardcoded slug
('app.acmecorp.com') which can collide across parallel runs; update the
test_update_slug_and_metadata to generate a unique slug per run (e.g., append a
short uuid/timestamp or use the created org_id) before building the
UpdateOrganization object so UpdateOrganization(slug=...) and metadata use that
unique value; ensure assertions still compare against the generated slug and
metadata.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 602c836f-6acd-4bec-8da1-10252d73fb9c

📥 Commits

Reviewing files that changed from the base of the PR and between 5a504b5 and c0701e3.

📒 Files selected for processing (1)
  • tests/test_organization_slug_logo.py

@srinivaskarre-sk srinivaskarre-sk changed the title feat: regenerate protos from v0.1.123.0 feat: regenerate protos from v0.1.123.0 and add slug/logo_url to CreateOrganizationOptions May 26, 2026
Removed feature-flag skip blocks that checked for logo_url support and
simplified error handling. Added get_organization read-back assertions in
test_update_logo_url and test_update_slug_and_metadata to verify persistence.
- Align test fixture with standardized test logo URL across SDKs
Replaces hardcoded 'auth.megasoft.com' slug with per-run UUID-based
values to prevent collisions when tests are re-run. Chains super().tearDown()
so BaseTest CI delay runs after each test for eventual-consistency safety.
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