Compare commits

...

1 Commits

Author SHA1 Message Date
pablodanswer
8b8cc922ea k 2025-02-15 13:36:33 -08:00
3 changed files with 8 additions and 2 deletions

View File

@@ -885,7 +885,9 @@ class OAuth2AuthorizeResponse(BaseModel):
def generate_state_token(
data: Dict[str, str], secret: SecretType, lifetime_seconds: int = 3600
data: Dict[str, str],
secret: SecretType,
lifetime_seconds: int = AUTH_COOKIE_EXPIRE_TIME_SECONDS,
) -> str:
data["aud"] = STATE_TOKEN_AUDIENCE

View File

@@ -16,6 +16,7 @@ from sqlalchemy import select
from sqlalchemy import text
from sqlalchemy.orm import Session
from ee.onyx.server.tenants.product_gating import get_gated_tenants
from onyx.background.celery.apps.app_base import task_logger
from onyx.background.celery.celery_redis import celery_get_queue_length
from onyx.background.celery.celery_redis import celery_get_unacked_task_ids
@@ -758,10 +759,12 @@ def cloud_check_alembic() -> bool | None:
out_of_date_tenants: dict[str, str] = {}
top_revision: str = ""
tenant_ids: list[str] | list[None] = []
gated_tenants: list[str] = []
try:
# map tenant_id to revision (or ALEMBIC_NULL_REVISION if the query fails)
tenant_ids = get_all_tenant_ids()
gated_tenants = get_gated_tenants()
for tenant_id in tenant_ids:
current_time = time.monotonic()
if current_time - last_lock_time >= (CELERY_GENERIC_BEAT_LOCK_TIMEOUT / 4):
@@ -835,6 +838,7 @@ def cloud_check_alembic() -> bool | None:
f"num_out_of_date_tenants={len(out_of_date_tenants)} "
f"num_tenants={len(tenant_ids)} "
f"revision={top_revision}"
f"gated_tenants={gated_tenants}"
)
num_to_log = min(5, len(out_of_date_tenants))

View File

@@ -20,7 +20,7 @@ def check_tag_validity(tag_key: str, tag_value: str) -> bool:
Additionally, extremely long tags are not really usable / useful."""
if len(tag_key) + len(tag_value) > 255:
logger.error(
logger.warning(
f"Tag with key '{tag_key}' and value '{tag_value}' is too long, cannot be used"
)
return False