Skip to content

fix(bg_jobs): store job argument as a text, increase length cap to 32000#59029

Merged
provokateurin merged 2 commits intomasterfrom
fix/58913/bg-job-argument-type-text
Mar 19, 2026
Merged

fix(bg_jobs): store job argument as a text, increase length cap to 32000#59029
provokateurin merged 2 commits intomasterfrom
fix/58913/bg-job-argument-type-text

Conversation

@Antreesy
Copy link
Contributor

Summary

After internal discussion it comes up, that $argument_hash is used in DB queries for references, and $argument should be safe to store as a Type::TEXT. That should allow to increase the max length of JSON encoded string without breaking the DB 🤞🏽

TODO

  • Sanity check for changes
  • Manual tests
  • Decision for backport?

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@Antreesy Antreesy added this to the Nextcloud 34 milestone Mar 18, 2026
@Antreesy Antreesy self-assigned this Mar 18, 2026
@Antreesy Antreesy requested a review from a team as a code owner March 18, 2026 10:43
@Antreesy Antreesy added the 3. to review Waiting for reviews label Mar 18, 2026
@Antreesy Antreesy removed the request for review from a team March 18, 2026 10:43
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I question a bit why you'd need so much space for arguments, maybe some kind of reference should be passed instead?

@Antreesy
Copy link
Contributor Author

I question a bit why you'd need so much space for arguments, maybe some kind of reference should be passed instead?

Maybe, but I don't know if that's up to app developers to handle? IIRC and see ref issues, webhook_listeners are expecting to have complete information, e.g. there could be usecases like:

  • Tables - table rich text and metadata - we hit the limit here, cc @enjeck
  • Talk - supports chat messages up to 32K characters as well - nobody reported such case, but might be possible

To my understanding, current PR would be the less invasive approach to support larger data arrays?

@Antreesy Antreesy force-pushed the fix/58913/bg-job-argument-type-text branch from 2cf72ad to 746fddf Compare March 18, 2026 11:21
nickvergessen

This comment was marked as resolved.

@Antreesy

This comment was marked as resolved.

@provokateurin

This comment was marked as resolved.

@nickvergessen

This comment was marked as resolved.

…4000 to 32000

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy force-pushed the fix/58913/bg-job-argument-type-text branch from 904c45d to 0c5feae Compare March 18, 2026 14:51
@Antreesy

This comment was marked as resolved.

@Antreesy
Copy link
Contributor Author

/backport to stable33

@Antreesy
Copy link
Contributor Author

/backport to stable32

@provokateurin provokateurin merged commit 95f22bc into master Mar 19, 2026
188 of 195 checks passed
@provokateurin provokateurin deleted the fix/58913/bg-job-argument-type-text branch March 19, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Background jobs with extended data support > 4000 bytes

4 participants