batches: Changeset Spec Exceeds Database Limit
Created by: BolajiOlajide
Closes #39242 (closed)
Test plan
Before #39471, we ran into an edge case where a batch change that generated a large changeset couldn't be saved in the database. The error gotten was
ERROR: string too long to represent as jsonb string (SQLSTATE 54000)
This happened because the size limit for the jsonb
field in the changeset_specs
table was around 256MB, so running a batch spec (example attached below) would return an error.
# Generates 676.3 MB changeset spec
name: large-changeset
description: Add Hello World to READMEs
on:
- repositoriesMatchingQuery: file:README.md repo:^github.com/odoo/odoo$
steps:
- run: find . -name "*.po" -exec sed -i 's/b/c/g' {} \;
container: alpine:3
changesetTemplate:
title: Hello World
body: My first batch change!
branch: hello-world-1 # Push the commit to this branch.
commit:
message: Append Hello World to all README.md files
published: false # Do not publish any changes to the code hosts yet
This PR adds a check to inform the user to make use of transformChanges if the size of the changeset gets too large. Since #39471, that limit has increased to 1G.