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

Fix invalid JSON in /version endpoint response #538

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

whatyouhide
Copy link
Contributor

The /version endpoint returns invalid JSON, because the \n character at the end of the response is escaped by the backticks. This PR should fix that. I’m no Go expert, so I’m just winging this 🙃

@whatyouhide
Copy link
Contributor Author

I have signed the CLA!

@whatyouhide
Copy link
Contributor Author

Hi @miry! 👋 This seems like a small but nice fix to have in here. Let me know if I can do anything to expedite this 😊

@miry
Copy link
Contributor

miry commented Oct 25, 2023

cc: @abecevello

@iyaz-shaikh
Copy link
Member

This should work, running this playground shows the difference between the two string structures. Once CI passes, I'll also throw an approval on this 👍

@abecevello
Copy link
Member

abecevello commented Oct 25, 2023

@whatyouhide I've run the tests and it looks like TestVersionEndpointReturnsVersion is failing on this branch. Would you be able to update that test so it reflects the change you made?

@whatyouhide
Copy link
Contributor Author

Ah, yes. Sorry, I didn't even run tests locally cause I don't work in Go and had nothing set up for it. I took the laziest approach 😅

Anyways, I pushed a commit that should fix the test 🤞

Copy link
Member

@iyaz-shaikh iyaz-shaikh left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@abecevello abecevello merged commit c3d8bf6 into Shopify:main Oct 25, 2023
7 checks passed
@abecevello
Copy link
Member

@whatyouhide thanks for the fix. I've merged it and I'll see about doing a release that includes this soon.

@whatyouhide whatyouhide deleted the fix-version-endpoint branch October 25, 2023 14:25
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.

4 participants