Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent-spawner: base64 encoding one more time #156

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

praiskup
Copy link
Owner

The base64 encoding is worth doing on the dispatcher side, and store strings to Redis, instead of decoding and encoding it once more in worker (see #155).

Fixes: #155

praiskup added a commit that referenced this pull request Mar 14, 2024
The base64 encoding is worth doing on the dispatcher side, and store
strings to Redis, instead of decoding and encoding it once more in
worker (see #155).

Fixes: #155, #156
The base64 encoding is worth doing on the dispatcher side, and store
strings to Redis, instead of decoding and encoding it once more in
worker (see #155).

Fixes: #155, #156
# The ticket.output is bytes(), and we don't plan to touch the data at
# all, we are just going to "forward" the data base64 encoded to our
# hook scripts. Encode it now, and never change again.
return base64.b64encode(ticket.output.data).decode("ascii")
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need decode() here?

Copy link
Owner Author

Choose a reason for hiding this comment

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

b64encode returns bytes, yes

@siteshwar
Copy link
Contributor

siteshwar commented Mar 15, 2024

I have not tested this change, but if it works. Please merge.

EDIT: I managed to test it later and it works.

@praiskup praiskup merged commit 853ab09 into main Mar 15, 2024
3 checks passed
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