apiVersion: jenkins.io/v1 kind: PipelineActivity metadata: annotations: lighthouse.jenkins-x.io/cloneURI: https://github.com/greencapitaltrade/bifrost.git lighthouse.jenkins-x.io/job: release pipeline.jenkins-x.io/traceID: 7c98c5e7031fe72b8aa3b799bb24f0b6 creationTimestamp: "2026-05-21T08:14:53Z" generation: 8 labels: branch: main build: "97" context: release created-by-lighthouse: "true" event-GUID: 0dfe9ef2-54ed-11f1-8af9-6e8c67495d56 lighthouse.jenkins-x.io/baseSHA: d1fa6bc8436f7b3551a4d5961c8490e6d5e3fbbc lighthouse.jenkins-x.io/branch: main lighthouse.jenkins-x.io/buildNum: "1779351293215" lighthouse.jenkins-x.io/context: release lighthouse.jenkins-x.io/id: apitaltrade-bifrost-main-release-4zk2r lighthouse.jenkins-x.io/job: release lighthouse.jenkins-x.io/lastCommitSHA: d1fa6bc8436f7b3551a4d5961c8490e6d5e3fbbc lighthouse.jenkins-x.io/refs.org: greencapitaltrade lighthouse.jenkins-x.io/refs.repo: bifrost lighthouse.jenkins-x.io/type: postsubmit owner: greencapitaltrade podName: apitaltrade-bifrost-main-release-vv7xd-from-build-pack-pod provider: github repository: bifrost tekton.dev/pipeline: apitaltrade-bifrost-main-release-vv7xd managedFields: - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:labels: f:branch: {} f:context: {} f:owner: {} f:provider: {} f:repository: {} f:spec: f:lastCommitMessage: {} f:lastCommitSHA: {} f:releaseNotesURL: {} f:version: {} manager: jx-changelog-0.10.18 operation: Update time: "2026-05-21T08:24:29Z" - apiVersion: jenkins.io/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: .: {} f:lighthouse.jenkins-x.io/cloneURI: {} f:lighthouse.jenkins-x.io/job: {} f:pipeline.jenkins-x.io/traceID: {} f:labels: .: {} f:build: {} f:created-by-lighthouse: {} f:event-GUID: {} f:lighthouse.jenkins-x.io/baseSHA: {} f:lighthouse.jenkins-x.io/branch: {} f:lighthouse.jenkins-x.io/buildNum: {} f:lighthouse.jenkins-x.io/context: {} f:lighthouse.jenkins-x.io/id: {} f:lighthouse.jenkins-x.io/job: {} f:lighthouse.jenkins-x.io/lastCommitSHA: {} f:lighthouse.jenkins-x.io/refs.org: {} f:lighthouse.jenkins-x.io/refs.repo: {} f:lighthouse.jenkins-x.io/type: {} f:podName: {} f:tekton.dev/pipeline: {} f:spec: .: {} f:baseSHA: {} f:batchPipelineActivity: {} f:build: {} f:buildLogsUrl: {} f:completedTimestamp: {} f:context: {} f:gitBranch: {} f:gitOwner: {} f:gitRepository: {} f:gitUrl: {} f:message: {} f:pipeline: {} f:startedTimestamp: {} f:status: {} f:steps: {} manager: jx-build-controller operation: Update time: "2026-05-21T08:25:54Z" name: greencapitaltrade-bifrost-main-97 namespace: jx resourceVersion: "37305228" uid: 5564770f-c053-477d-9bcd-1797591e99b4 spec: baseSHA: d1fa6bc8436f7b3551a4d5961c8490e6d5e3fbbc batchPipelineActivity: {} build: "97" buildLogsUrl: s3://logs-gct-prod-20260425045301534100000007/jenkins-x/logs/greencapitaltrade/bifrost/main/97.log completedTimestamp: "2026-05-21T08:25:47Z" context: release gitBranch: main gitOwner: greencapitaltrade gitRepository: bifrost gitUrl: https://github.com/greencapitaltrade/bifrost.git lastCommitMessage: | fix(boot): serialize addon update via Postgres advisory lock During an mcu rollout three pods restart simultaneously: bifrost-bifrost web (2 replicas) + bifrost-bifrost-cron (Recreate strategy, 1 replica). Each runs `odoo --update= --stop-after-init` in gct_entrypoint.sh and they race for row locks on ir_module_module_dependency. With the default 10s lock_timeout the losers crash; worse, a losing pod that's killed mid-transaction leaves an `idle in transaction` PG orphan that blocks every subsequent boot until manually pg_terminate_backend'd. Hit twice in one day. - New odoo_update_with_lock.py wraps the update step. Acquires a session-scoped advisory lock keyed on the DB name (CRC32 → signed 32-bit), runs `odoo --update --stop-after-init`, releases. - If the wrapper itself dies (SIGKILL, OOM), PG drops the lock with the connection — no orphan. - lock_timeout=0 during acquisition: queue forever instead of timing out at 10s. Migrations themselves still use Odoo's default. - Lock key derived from DB name so multi-DB clusters can roll different Odoo apps concurrently. - Both code paths in gct_entrypoint.sh's main() use the wrapper — fresh-DB install (ODOO_INIT_ADDONS) and existing-DB upgrade (check_addon_versions). - Dockerfile copies the wrapper into /odoo_update_with_lock.py. Companion fix in jx3-terraform-eks#8 sets idle_in_transaction_session_timeout=5min on the RDS parameter group, so even pre-existing orphans (or any future ones we miss) self-clean within 5 min instead of needing manual intervention. Co-Authored-By: Claude Opus 4.7 lastCommitSHA: c1305f8a766834842b101e087fc3056d7a3df655 message: 'Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0' pipeline: greencapitaltrade/bifrost/main releaseNotesURL: https://github.com/greencapitaltrade/bifrost/releases/tag/v6.65.5 startedTimestamp: "2026-05-21T08:14:53Z" status: Succeeded steps: - kind: Stage stage: completedTimestamp: "2026-05-21T08:25:47Z" name: from build pack startedTimestamp: "2026-05-21T08:17:46Z" status: Succeeded steps: - completedTimestamp: "2026-05-21T08:18:12Z" name: Git Clone startedTimestamp: "2026-05-21T08:17:46Z" status: Succeeded - completedTimestamp: "2026-05-21T08:18:18Z" name: Next Version startedTimestamp: "2026-05-21T08:18:12Z" status: Succeeded - completedTimestamp: "2026-05-21T08:18:22Z" name: Jx Variables startedTimestamp: "2026-05-21T08:18:18Z" status: Succeeded - completedTimestamp: "2026-05-21T08:18:25Z" name: Setup Npm Nexus startedTimestamp: "2026-05-21T08:18:25Z" status: Succeeded - completedTimestamp: "2026-05-21T08:18:35Z" name: Setup Pip Cache startedTimestamp: "2026-05-21T08:18:31Z" status: Succeeded - completedTimestamp: "2026-05-21T08:18:36Z" name: Process Config Templates startedTimestamp: "2026-05-21T08:18:36Z" status: Succeeded - completedTimestamp: "2026-05-21T08:18:37Z" name: Update Fleet Management Version startedTimestamp: "2026-05-21T08:18:37Z" status: Succeeded - completedTimestamp: "2026-05-21T08:18:43Z" name: Check Registry startedTimestamp: "2026-05-21T08:18:41Z" status: Succeeded - completedTimestamp: "2026-05-21T08:24:04Z" name: Build Container Build startedTimestamp: "2026-05-21T08:18:53Z" status: Succeeded - completedTimestamp: "2026-05-21T08:24:29Z" name: Promote Changelog startedTimestamp: "2026-05-21T08:24:04Z" status: Succeeded - completedTimestamp: "2026-05-21T08:24:32Z" name: Promote Helm Release startedTimestamp: "2026-05-21T08:24:29Z" status: Succeeded - completedTimestamp: "2026-05-21T08:25:47Z" name: Promote Jx Promote startedTimestamp: "2026-05-21T08:24:33Z" status: Succeeded - kind: Promote promote: environment: staging pullRequest: pullRequestURL: https://github.com/greencapitaltrade/mcu/pull/3945 startedTimestamp: "2026-05-21T08:25:15Z" status: Succeeded startedTimestamp: "2026-05-21T08:25:15Z" status: Succeeded - kind: Promote promote: environment: production pullRequest: pullRequestURL: https://github.com/greencapitaltrade/mcu/pull/3946 startedTimestamp: "2026-05-21T08:25:44Z" status: Succeeded startedTimestamp: "2026-05-21T08:25:44Z" status: Succeeded version: 6.65.5 status: {}