Skip to content

Conversation

@Tonixhymshiti
Copy link
Contributor

Proposal

This PR introduces a new configuration option that allows users to conditionally apply base64 encoding to Cloud Tasks request bodies. Previously, base64 encoding was always applied, but this may not be necessary or desired in all environments.

Motivation

Having request bodies base64 encoded by default makes the debugging in the GCP console very inconvenient, as one cannot view a task's request body without an additional decoding step (see attachments). This slows down teams and in addition reduces the flexibility that the official google-cloud-tasks gem provides. Since teams are in control of the Tasks' request bodies, why not giving them the ability to decide whether they should be base64 encoded, especially if they aware that they are not providing request bodies consisting of non-ascii characters.

Usage

To disable base64 encoding:

Cloudtasker.configure do |config|
  config.base64_encode_body = false
  # ... other configuration
end

Attachments

Screenshot 2025-12-15 at 10 04 59 Fig.1 No encoding

Screenshot 2025-12-15 at 10 07 38 Fig.2 Base64 encoding

@alachaum
Copy link
Member

alachaum commented Dec 15, 2025

Easy to merge 😉 Thanks for the contribution @Tonixhymshiti

However, please keep in mind that the enqueuing of tasks will fail if the payload contains special characters and base64 encoding is disabled. This was the original reason for implementing base64 encoding.

Ideally, Google Cloud Task should decode the payload in the UI. This would be tremendously useful.

@alachaum alachaum merged commit 00f6ac9 into keypup-io:master Dec 15, 2025
71 checks passed
@Tonixhymshiti
Copy link
Contributor Author

@alachaum when can I expect the new version containing these changes to be released?

@alachaum
Copy link
Member

I'm probably going to make another release candidate today.

I'll let it simmer on the RC for another week or so then make an official release 😊

@Tonixhymshiti
Copy link
Contributor Author

@alachaum very much looking forward to the release candidate :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants