MCPcopy Create free account

hub / github.com/PostHog/duckgres / functions

Functions5,901 in github.com/PostHog/duckgres

FunctionTestK8sPoolClaimSpecificWorkerRetiresUnhealthyWorker
(t *testing.T)
controlplane/k8s_pool_test.go:1588
FunctionTestK8sPoolClaimSpecificWorkerReturnsEpochMismatchError
(t *testing.T)
controlplane/k8s_pool_test.go:1566
FunctionTestK8sPoolClaimSpecificWorkerTakesOverRuntimeWorker
(t *testing.T)
controlplane/k8s_pool_test.go:1508
FunctionTestK8sPoolCleanDeadWorkersDropsStaleRuntimeLeaseWithoutDeletingPod
(t *testing.T)
controlplane/k8s_pool_test.go:2629
FunctionTestK8sPoolCleanDeadWorkersLeavesCurrentRuntimeLeaseForHealthLoop
(t *testing.T)
controlplane/k8s_pool_test.go:2719
FunctionTestK8sPoolCleanDeadWorkersLeavesSameLeaseAlreadyLostForHealthLoop
(t *testing.T)
controlplane/k8s_pool_test.go:2817
FunctionTestK8sPoolCleanDeadWorkersLeavesSameOwnerNewerRuntimeEpoch
(t *testing.T)
controlplane/k8s_pool_test.go:2674
FunctionTestK8sPoolCleanDeadWorkersRetiresDrainingWorkerAfterPodExit
(t *testing.T)
controlplane/k8s_pool_test.go:2768
FunctionTestK8sPoolFindIdleWorkerSkipsReservedSharedWorker
(t *testing.T)
controlplane/k8s_pool_test.go:1342
FunctionTestK8sPoolHealthCheckLoopCompletesSameLeaseAlreadyLost
(t *testing.T)
controlplane/k8s_pool_test.go:1897
FunctionTestK8sPoolHealthCheckLoopCurrentLeaseDeletesPodAndNotifiesCrash
(t *testing.T)
controlplane/k8s_pool_test.go:1958
FunctionTestK8sPoolHealthCheckLoopDropsStaleLeaseWithoutDeletingPod
(t *testing.T)
controlplane/k8s_pool_test.go:1750
FunctionTestK8sPoolHealthCheckLoopKeepsDrainingWorkerOnHealthFailure
(t *testing.T)
controlplane/k8s_pool_test.go:2166
FunctionTestK8sPoolHealthCheckLoopMarksActiveDrainingWorkerDurableDraining
(t *testing.T)
controlplane/k8s_pool_test.go:2327
FunctionTestK8sPoolHealthCheckLoopMarksDrainingWorkerUnschedulable
(t *testing.T)
controlplane/k8s_pool_test.go:2089
FunctionTestK8sPoolHealthCheckLoopRepairsInconsistentLocalDrainingDurableHotWorkerAfterPodExit
(t *testing.T)
controlplane/k8s_pool_test.go:2446
FunctionTestK8sPoolHealthCheckLoopRepairsLocalDrainingDurableHotWorkerOnHealth
(t *testing.T)
controlplane/k8s_pool_test.go:2392
FunctionTestK8sPoolHealthCheckLoopRepairsLocalDrainingDurableHotWorkerOnHealthFailure
(t *testing.T)
controlplane/k8s_pool_test.go:2247
FunctionTestK8sPoolHealthCheckLoopRetiresDrainingWorkerAfterPodExit
(t *testing.T)
controlplane/k8s_pool_test.go:2514
FunctionTestK8sPoolHealthCheckLoopRetriesSameOwnerNewerRuntimeEpoch
(t *testing.T)
controlplane/k8s_pool_test.go:1826
FunctionTestK8sPoolHealthCheckLoopSnapshotsLeaseUnderPoolLock
(t *testing.T)
controlplane/k8s_pool_race_test.go:12
FunctionTestK8sPoolIdleReaperSkipsReservedSharedWorker
(t *testing.T)
controlplane/k8s_pool_test.go:2857
FunctionTestK8sPoolMarkWorkerLostIfCurrentLeaseAllowsUnstampedLocalWorker
(t *testing.T)
controlplane/k8s_pool_test.go:2582
FunctionTestK8sPoolParkIdleHotWorkerNoDecrement
parkIdleHotWorker must NOT decrement the session count (unlike the session-release callback TransitionToHotIdleIfNoSessions): it is a sweep over alrea
controlplane/k8s_pool_test.go:1074
FunctionTestK8sPoolReleaseIdleHotWorkersParksIdleSkipsBusy
ReleaseIdleHotWorkers parks Hot/0-session workers into hot_idle (so the hot-idle TTL reaper can reclaim them) and leaves busy Hot workers untouched. T
controlplane/k8s_pool_test.go:1026
FunctionTestK8sPoolRemoveWorkerAfterLostLeaseRejectsNewerLocalEpoch
(t *testing.T)
controlplane/k8s_pool_test.go:2610
FunctionTestK8sPoolReserveClaimedWorkerRejectsDuplicateActivatingClaim
(t *testing.T)
controlplane/k8s_pool_test.go:1365
FunctionTestK8sPoolReserveClaimedWorkerRejectsStaleInMemoryEpoch
(t *testing.T)
controlplane/k8s_pool_test.go:1398
FunctionTestK8sPoolReserveClaimedWorkerUnlocksPoolOnTransitionError
(t *testing.T)
controlplane/k8s_pool_test.go:1238
FunctionTestK8sPoolReserveSharedWorkerFreesSlotOnSpawnFailure
Regression for the spawning-slot leak: when the pod spawn fails, the durable spawning-slot row must be CAS'd terminal on the request thread (freeing t
controlplane/k8s_pool_test.go:1464
FunctionTestK8sPoolReserveSharedWorkerReturnsOrgCapFromHotIdleClaim
(t *testing.T)
controlplane/k8s_pool_test.go:1431
FunctionTestK8sPoolRetireWorkerPersistsRetiredWorkerRecord
(t *testing.T)
controlplane/k8s_pool_test.go:1710
FunctionTestK8sPoolRetireWorkerUsesTrackedPodName
(t *testing.T)
controlplane/k8s_pool_test.go:3202
FunctionTestK8sPoolTransitionToHotIdlePersistFailureStaysHot
Regression for fix #3: a transient persist failure at the hot->hot_idle park must leave the worker Hot (still reusable), NOT advance in-memory to hot_
controlplane/k8s_pool_test.go:999
FunctionTestK8sPoolWorkerRecordForIdleStampsOwnerCPInstanceID
TestK8sPoolWorkerRecordForIdleStampsOwnerCPInstanceID guards against the idle worker churn loop. workerRecordFor used to clear OwnerCPInstanceID whene
controlplane/k8s_pool_test.go:1678
FunctionTestK8sPool_CleanDeadWorkers
(t *testing.T)
controlplane/k8s_pool_test.go:1278
FunctionTestK8sPool_EnsureWorkerRPCSecret_CreatesNew
(t *testing.T)
controlplane/k8s_pool_test.go:634
FunctionTestK8sPool_EnsureWorkerRPCSecret_DefaultsToPerWorkerPrefix
(t *testing.T)
controlplane/k8s_pool_test.go:659
FunctionTestK8sPool_EnsureWorkerRPCSecret_ExistingIsPreserved
(t *testing.T)
controlplane/k8s_pool_test.go:680
FunctionTestK8sPool_EnsureWorkerRPCSecret_UsesDistinctCredentialsPerWorker
(t *testing.T)
controlplane/k8s_pool_test.go:711
FunctionTestK8sPool_FindIdleWorker
(t *testing.T)
controlplane/k8s_pool_test.go:1298
FunctionTestK8sPool_IdleReaper
(t *testing.T)
controlplane/k8s_pool_test.go:3310
FunctionTestK8sPool_InformerDeleteClosesPodReadyWaiter
(t *testing.T)
controlplane/k8s_pool_test.go:770
FunctionTestK8sPool_LeastLoadedWorker
(t *testing.T)
controlplane/k8s_pool_test.go:1311
FunctionTestK8sPool_LiveWorkerCount
(t *testing.T)
controlplane/k8s_pool_test.go:1325
FunctionTestK8sPool_OnPodTerminated
(t *testing.T)
controlplane/k8s_pool_test.go:3245
FunctionTestK8sPool_ReadWorkerRPCSecurity
(t *testing.T)
controlplane/k8s_pool_test.go:743
FunctionTestK8sPool_ReleaseWorker
(t *testing.T)
controlplane/k8s_pool_test.go:926
FunctionTestK8sPool_RetireWorker
(t *testing.T)
controlplane/k8s_pool_test.go:943
FunctionTestK8sPool_RetireWorkerDeletesWorkerRPCSecret
(t *testing.T)
controlplane/k8s_pool_test.go:3070
FunctionTestK8sPool_RetireWorkerIfNoSessions_LastSession
(t *testing.T)
controlplane/k8s_pool_test.go:977
FunctionTestK8sPool_RetireWorkerIfNoSessions_WithSessions
(t *testing.T)
controlplane/k8s_pool_test.go:960
FunctionTestK8sPool_ShutdownAll
(t *testing.T)
controlplane/k8s_pool_test.go:3148
FunctionTestK8sPool_SpawnWorkerCleansUpPodAndSecretWhenRPCSecurityReadFails
(t *testing.T)
controlplane/k8s_pool_test.go:814
FunctionTestK8sPool_SpawnWorkerCleansUpWhenRPCSecurityReadCancelsContext
(t *testing.T)
controlplane/k8s_pool_test.go:860
FunctionTestK8sPool_SpawnWorkerCreatesCorrectPod
(t *testing.T)
controlplane/k8s_pool_test.go:2892
FunctionTestK8sPool_WorkerLookup
(t *testing.T)
controlplane/k8s_pool_test.go:909
FunctionTestKafkaQueryLogSinkPublishesEnvelope
(t *testing.T)
server/querylog_kafka_test.go:78
FunctionTestKafkaQueryLogSinkStopBoundsBlockedPublish
(t *testing.T)
server/querylog_kafka_test.go:164
FunctionTestKafkaQueryLogSinkStopContextBoundsTotalDrain
(t *testing.T)
server/querylog_kafka_test.go:214
FunctionTestKillSwitchRequiresAdmin
TestKillSwitchRequiresAdmin: all three actions are POSTs, so RoleGate (applied at the group level in production) rejects a viewer with 403.
controlplane/admin/kill_switch_test.go:189
FunctionTestKillUserSessionsFansOut
TestKillUserSessionsFansOut: the kill endpoint kills locally AND sums peer counts, reporting cluster-wide totals.
controlplane/admin/kill_switch_test.go:36
FunctionTestKillUserSessionsScopeLocal
TestKillUserSessionsScopeLocal: a peer (scope=local) call kills only locally and must NOT fan out again (recursion guard).
controlplane/admin/kill_switch_test.go:64
FunctionTestKindConfigStoreSeedSQL
(t *testing.T)
tests/configstore/seed_sql_test.go:54
FunctionTestLatencyProxy
(t *testing.T)
tests/integration/latency_proxy_test.go:10
FunctionTestLeaderOnlyLoopStartsAndStopsBackgroundRun
(t *testing.T)
controlplane/leader_loop_test.go:9
FunctionTestLeastLoadedWorkerLocked
(t *testing.T)
controlplane/worker_mgr_process_test.go:693
FunctionTestLifecyclePairFiresOnExecuteQueryDirect
TestLifecyclePairFiresOnExecuteQueryDirect covers the simple-query DML entrypoint (BEGIN, INSERT, UPDATE, DELETE, etc.). Pre-PR #519 this path only lo
server/conn_querylog_lifecycle_test.go:114
FunctionTestLifecyclePairFiresOnExecuteQueryDirectOnError
TestLifecyclePairFiresOnExecuteQueryDirectOnError verifies the deferred logQueryFinished fires even when the executor returns an error — pre-PR #519 t
server/conn_querylog_lifecycle_test.go:138
FunctionTestLifecyclePairFiresOnExecuteSelectQuery
TestLifecyclePairFiresOnExecuteSelectQuery covers the simple-query SELECT path. This path already had logQueryStarted pre-#519, but error returns (Sca
server/conn_querylog_lifecycle_test.go:162
FunctionTestLifecyclePairFiresOnHandleExecuteExec
TestLifecyclePairFiresOnHandleExecuteExec covers the extended-query Exec path (handleExecute → executor.Exec). This is the prod-traffic path that drov
server/conn_querylog_lifecycle_test.go:182
FunctionTestLifecyclePairFiresOnHandleExecuteQuery
TestLifecyclePairFiresOnHandleExecuteQuery covers the extended-query Query path (handleExecute → executor.Query for SELECTs). Same rationale as the Ex
server/conn_querylog_lifecycle_test.go:303
FunctionTestListExpiredHotIdleWorkersPerWorkerTTL
Per-worker TTL: ListExpiredHotIdleWorkers retires a hot-idle worker once its own ttl_minutes has elapsed since updated_at (last became idle); ttl=0 fa
tests/configstore/runtime_store_postgres_test.go:370
FunctionTestListExpiredHotIdleWorkersSparesReclaimableFlightSessions
Regression: the hot-idle TTL reaper must NOT retire a hot-idle worker that still backs a reclaimable (Active/Reconnecting) Flight session — the custom
tests/configstore/runtime_store_postgres_test.go:423
FunctionTestListExpiredHotIdleWorkersUsesHotIdleSinceNotUpdatedAt
Regression: the hot-idle reaper must measure idle age from hot_idle_since, not updated_at. Lease and credential-refresh writes (BumpWorkerEpoch, MarkC
tests/configstore/runtime_store_postgres_test.go:2627
FunctionTestListLiveControlPlaneInstanceIDsPostgres
(t *testing.T)
tests/configstore/runtime_store_postgres_test.go:817
FunctionTestListOrgsIncludesWarehouse
(t *testing.T)
controlplane/admin/api_test.go:523
FunctionTestListOrphanedAndStuckWorkersPostgres
(t *testing.T)
tests/configstore/runtime_store_postgres_test.go:1105
FunctionTestListOrphanedWorkersExcludesFreshOwnerlessWorker
TestListOrphanedWorkersExcludesFreshOwnerlessWorker guards against over-eager cleanup. The spawn path creates the worker pod first, then inserts the D
tests/configstore/runtime_store_postgres_test.go:1312
FunctionTestListOrphanedWorkersExcludesWorkersWithActiveFlightSessions
TestListOrphanedWorkersExcludesWorkersWithActiveFlightSessions: a worker whose owning CP has expired is normally an orphan-cleanup candidate. But if a
tests/configstore/runtime_store_postgres_test.go:1717
FunctionTestListOrphanedWorkersIncludesDanglingOwnerWorkers
TestListOrphanedWorkersIncludesDanglingOwnerWorkers covers the "owner_cp_instance_id is set but no matching cp_instances row exists" case — the CP row
tests/configstore/runtime_store_postgres_test.go:1281
FunctionTestListOrphanedWorkersIncludesOwnerlessIdleWorkers
TestListOrphanedWorkersIncludesOwnerlessIdleWorkers seeds a row that reproduces the mw-dev incident: an unassigned idle worker whose owner_cp_instance
tests/configstore/runtime_store_postgres_test.go:1211
FunctionTestListOrphanedWorkersIncludesWorkersWithExpiredFlightSessions
TestListOrphanedWorkersIncludesWorkersWithExpiredFlightSessions: once the Flight session record has been moved to a terminal state (expired or closed)
tests/configstore/runtime_store_postgres_test.go:1832
FunctionTestListOrphanedWorkersIncludesWorkersWithReconnectingFlightSessions
TestListOrphanedWorkersIncludesWorkersWithReconnectingFlightSessions: the reconnecting state means a Flight client is mid-handshake for a token-backed
tests/configstore/runtime_store_postgres_test.go:1777
FunctionTestListWorkerLifecycleStatsPostgres
(t *testing.T)
tests/configstore/runtime_store_postgres_test.go:145
FunctionTestListWorkersDueForCredentialRefreshScopesByOwner
TestListWorkersDueForCredentialRefreshScopesByOwner: only workers owned by the calling CP are returned. Workers owned by another CP — even if their cr
tests/configstore/runtime_store_postgres_test.go:1443
FunctionTestListWorkersDueForCredentialRefreshSkipsHealthyAndUnassigned
TestListWorkersDueForCredentialRefreshSkipsHealthyAndUnassigned: - Healthy row (expiry comfortably in the future): not returned. - Unassigned row (org
tests/configstore/runtime_store_postgres_test.go:1563
FunctionTestListWorkersDueForCredentialRefreshSkipsReservedAndActivatingRows
TestListWorkersDueForCredentialRefreshSkipsReservedAndActivatingRows protects the initial activation path. Reserved/activating rows are org-bound befo
tests/configstore/runtime_store_postgres_test.go:1518
FunctionTestListWorkersDueForCredentialRefreshTreatsNullAsDue
TestListWorkersDueForCredentialRefreshTreatsNullAsDue: a row with s3_credentials_expires_at = NULL needs immediate refresh. This covers pre-migration
tests/configstore/runtime_store_postgres_test.go:1486
FunctionTestLiteralTransform_BitString
(t *testing.T)
transpiler/transform/literals_test.go:46
FunctionTestLiteralTransform_ByteaEscapeLeftAlone
(t *testing.T)
transpiler/transform/literals_test.go:37
FunctionTestLiteralTransform_ByteaHex
(t *testing.T)
transpiler/transform/literals_test.go:26
FunctionTestLiteralTransform_NonLiteralUnchanged
(t *testing.T)
transpiler/transform/literals_test.go:58
FunctionTestLiveControlPlaneManifestsReadinessProbeTargetsAPIHealthEndpoint
(t *testing.T)
k8s_manifest_test.go:32
FunctionTestLiveWorkerCountLocked
(t *testing.T)
controlplane/worker_mgr_process_test.go:627
FunctionTestLiveWorkerStats
(t *testing.T)
controlplane/headroom_test.go:360
FunctionTestLoadArtifactsParsesSummaryAndResults
(t *testing.T)
tests/perf/publisher/publisher_test.go:69
FunctionTestLoadArtifactsRejectsSummaryFinishedBeforeStarted
(t *testing.T)
tests/perf/publisher/publisher_test.go:128
FunctionTestLoadArtifactsRejectsSummaryMissingStartedAt
(t *testing.T)
tests/perf/publisher/publisher_test.go:110
FunctionTestLoadArtifactsRejectsUnexpectedHeader
(t *testing.T)
tests/perf/publisher/publisher_test.go:96
← previousnext →4,601–4,700 of 5,901, ranked by callers