fix: resolve merge conflict with main, fix test failures

- Merge main (pipelines feature) into branch, resolving conflicts in
  app/api/__init__.py and app/views/__init__.py by keeping all routers
  (onboarding + billing from our branch, pipelines from main)
- Fix migration 018 down_revision to depend on both 017_add_onboarding_fields
  and 017_add_pipelines (Alembic multi-head merge pattern)
- Fix test_auth_module.py: add multi_user_enabled=False to three admin-auth
  tests that call auth() directly without FastAPI DI
- Add missing SETTING_METADATA entries for allow_local_signup and all five
  Stripe config keys (fixes test_all_config_settings_have_metadata)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-07 15:02:43 +00:00
parent 6f197e69fc
commit b1ce28f804
3 changed files with 61 additions and 2 deletions
+54
View File
@@ -1784,6 +1784,60 @@ SETTING_METADATA = {
"required": False,
"restart_required": False,
},
# Local User Signup
"allow_local_signup": {
"category": "Authentication",
"description": (
"Allow users to self-register with email and password. "
"Has no effect unless MULTI_USER_ENABLED is also True. "
"Requires SMTP (EMAIL_HOST) to be configured so verification emails can be sent."
),
"type": "boolean",
"sensitive": False,
"required": False,
"restart_required": False,
},
# Stripe Billing
"stripe_secret_key": {
"category": "Billing",
"description": "Stripe secret API key (starts with sk_). Required for payment processing.",
"type": "string",
"sensitive": True,
"required": False,
"restart_required": False,
},
"stripe_publishable_key": {
"category": "Billing",
"description": "Stripe publishable key (starts with pk_). Exposed to the browser for Checkout.",
"type": "string",
"sensitive": False,
"required": False,
"restart_required": False,
},
"stripe_webhook_secret": {
"category": "Billing",
"description": "Stripe webhook signing secret (starts with whsec_). Used to verify incoming webhook payloads.",
"type": "string",
"sensitive": True,
"required": False,
"restart_required": False,
},
"stripe_success_url": {
"category": "Billing",
"description": "Absolute URL Stripe redirects to after a successful checkout (e.g. https://app.example.com/billing/success).",
"type": "string",
"sensitive": False,
"required": False,
"restart_required": False,
},
"stripe_cancel_url": {
"category": "Billing",
"description": "Absolute URL Stripe redirects to when a user cancels the checkout flow (e.g. https://app.example.com/pricing).",
"type": "string",
"sensitive": False,
"required": False,
"restart_required": False,
},
}
@@ -1,7 +1,7 @@
"""Add local_users table and billing columns
Revision ID: 018_add_local_users_and_billing
Revises: 017_add_onboarding_fields
Revises: 017_add_onboarding_fields, 017_add_pipelines
Create Date: 2026-03-09
"""
@@ -11,7 +11,7 @@ import sqlalchemy as sa
from alembic import op
revision: str = "018_add_local_users_and_billing"
down_revision: Union[str, None] = "017_add_onboarding_fields"
down_revision: Union[str, tuple] = ("017_add_onboarding_fields", "017_add_pipelines")
depends_on: Union[str, None] = None
+5
View File
@@ -298,6 +298,11 @@ class TestAuthEndpoint:
mock_settings.admin_username = "admin"
mock_settings.admin_password = "secret123"
mock_settings.multi_user_enabled = False
from app.auth import auth
mock_request = MagicMock()
mock_form_data = {"username": "admin", "password": "wrong_password"}
mock_request.form = AsyncMock(return_value=mock_form_data)
mock_request.session = {}