[VEG-2395] axios fetch adapter #253
Conversation
luis-almeida
left a comment
There was a problem hiding this comment.
Thanks for all this work! 🙏🏼
👍🏼 for the "themes" changes.
EmilyBie
left a comment
There was a problem hiding this comment.
Looks good to me, just a minor unblocking question.
JeanMarcGoepfert
left a comment
There was a problem hiding this comment.
Not sure exactly what the issue is, but I'm seeing the following after a quick test:
When running the following on master:
ZENDESK_SUBDOMAIN=z3n-jgoepfert ZENDESK_EMAIL=jgoepfert@zendesk.com ZENDESK_API_TOKEN=my_api_key yarn dev apps:package test_app
I get a successful response:
Package created at test_app/tmp/app-20240902003558758.zip
On the af/axios-fetch-adapter branch, I get:
› Error: AxiosError: Request failed with status code 500
error Command failed with exit code 2.
c23b556 to
9c8d179
Compare
|
@luis-almeida I have had to make a few changes to the themes code base with regards to file operations (in the last few commits) Happy to address nits but a little hesitant to do more. I have tested this change with themes import and publish with the copenhagen theme. If it looks alright it would be great if you can do a QA for themes.
|
There was a problem hiding this comment.
Confirmed the issue I was seeing previously is no longer happening.
Also tested all the other apps commands with credentials provided via env vars and profile - all works fine. Login/profile commands all work fine too. So all good from my end once tests are passing.
@luis-almeida Any manual testing you'd like to do on your end considering there are a few changes to theme related code here?
luis-almeida
left a comment
There was a problem hiding this comment.
@anushkafka @JeanMarcGoepfert I manually tested all the theme commands and it all looks good!
Didn't test with all the supported env vars but we have good unit and functional test coverage so we should've seen it fail if there was any issue there.
All code changes look good and make sense so nothing to point out 👍🏼
Only nit would be to squash for a cleaner history since it's all related.
EmilyBie
left a comment
There was a problem hiding this comment.
I've reviewed the code changes, and everything looks good to me 👍. Great job on the fix!
Just a friendly suggestion: you might want to consider using Semantic Commit Messages and git fixup & autosquash for maintaining a cleaner branch history in your future PRs.

Description
dced827fix create part 1af15f40fix create part 2746775efix update535f22fupdate1468f51working apps package tests8b2a1d6working apps validate func testsbd824e7Working themes delete tests959fe54working import testsb3cac14working themes list tests9993eaaworking themes publish testscddd8cefix themes preview func tests7a01ce5working request unit testsc07dc9erestore package.json087e0cbFix lint9741a0cwipeacda19loginInteractively test fix wip8698cd8auth tests wip904f5ddworking auth tests3980774Restore package.json original test scripts3eb9e72Remove nock from the main package4c895f3Update form data7fb536dFix linting9c8d179Tidy up test file2586471Update tests after rebasecf3d908Themes change wipf2a6f18Working themes code5377c27Clean up code48d5ea1Adjust themes testsb67950bFix linting6ece334Clean upDetail
This card requests the use of fetch instead of axios to make API calls.
To accomodate this request I have opted to use the new fetch adapter available through axios instead of removing it entirely due to the comparatively lower code changes to the core functionality.
A few things to note,
archive.finalize(). It does not indicate the stream is finished. Here is an excerpt from the documentationfinalize the archive (ie we are done appending files but streams have to finish yet). 'close', 'end' or 'finish' may be fired right after calling this method so register to them beforehand. I believe this change set contains the proper use of archiver.Jira: https://zendesk.atlassian.net/browse/VEG-2395
Checklist