Online Troubleshooting and Retrospective for Code Review and Merge Management: Deployment and Upgrade

Data for this category originates primarily from Git repositories, CI pipelines, static scanning reports, and defect databases. Daily generated

What this category of data looks like

Data for this category originates primarily from Git repositories, CI pipelines, static scanning reports, and defect databases. Daily generated documents include merge requests, code review comments, commit records, and branch strategy descriptions. Each data entry includes fields such as commit hash, reviewer identifier, changed file scope, and defect associated ID. Data update frequency triggers with commit actions, typically generating tens to hundreds of new entries per day. A large volume of temporary and persistent associated data is produced during change impact assessment, review comment communication, and conflict resolution. This category differs from static code scanning because it includes manual business semantic judgment and boundary maintenance steps, so data will contain subjective judgment content from reviewers.

What constraints do these characteristics impose on deployment and upgrades

This category of data relies on multi-source external system integration. Deployment and upgrade steps require configuring access permissions for Git repositories and CI pipelines to ensure normal synchronization of merge request and review data. Since data updates trigger with commit actions, high-frequency changes generate large volumes of temporary and persistent data. Long service interruptions during upgrades must be avoided, as unsynchronized review data may be lost. Additionally, data contains core business semantics and change details from development teams. Recovery after a failed upgrade requires full backups of databases, caches, and storage instances; backing up only application images is insufficient to cover all business data. Furthermore, branch strategy and review rule configurations must be consistent across cluster nodes to avoid inconsistent branch validation logic after upgrades.

How to configure settings

Configuration ItemRecommended ValueRationale
MONGODB_URImongodb://cr-admin:secure-pass@10.0.1.2:27017/fastgpt_cr_db?authSource=adminConnects to the dedicated database storing merge requests, review comments, and commit records
DB_MAX_LINK600 secondsConfigures the maximum idle duration for database connections to accommodate concurrent access demands from high-frequency commits and reviews
REDIS_URLredis://:redis-secure-pass@10.0.1.3:6379/1Caches branch strategies, review statuses, and temporary change data to reduce database access pressure
STORAGE_S3_ENDPOINThttps://s3-cn-beijing.volces.comConfigures the storage endpoint for static scanning reports and large review attachments, adapting to storage needs in offline or public network environments
FILE_TOKEN_KEY32-byte random secure stringGenerates access token keys for review attachments to ensure file access security

Three common mistakes

  • Unable to log in to the system after upgrade, with a 502 Bad Gateway error returned by the interface. The cause is incorrect configuration of database authentication parameters or connection addresses when modifying the MONGODB_URI setting, resulting in failure to read the database instance storing review data.
  • Unable to complete version upgrades in offline environments, with image pull timeouts. The cause is that the default configuration relies on public network image repositories to pull update packages, and no local private image source is configured as a replacement.
  • Merge request data lost after failed upgrade recovery. The cause is that only application images and container data were backed up, and core business data such as review comments and commit records in databases and cache instances were not fully exported.

How to confirm configuration is valid

  • After executing the FastGPT v4.17.0 version upgrade script, check system logs to confirm there are no error messages related to MONGODB_URI authentication failures or connection timeouts.
  • Submit a test merge request, fill in and submit review comments, verify that review comments can be saved and displayed normally, and confirm that the configuration takes effect.
  • Upload a test static scanning report, confirm that the file can be stored normally and associated and displayed in merge requests, and verify that the STORAGE_S3_ENDPOINT configuration is correct.
  • Check monitoring metrics for cache instances, confirm that the cache hit rate for branch strategies and review statuses is normal, and that there are no large numbers of cache misses.

The values provided are common starting points and should be measured against the reader's own samples.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.