qwik icon indicating copy to clipboard operation
qwik copied to clipboard

feat(qwik-city): init Fastly adapter

Open kalebpace opened this issue 1 year ago • 6 comments

Overview

Hi everyone,

I've initialized a Qwik City adapter for Fastly's Compute@Edge platform based off the Cloudflare adapter. All code for the adapter and e2e usage lives here and is deployed here.

There is a decent amount of work still needed to bring the adapter and starter template up to speed for a proper dev server and production deployment. Though, wanted to open this PR early in the process to get feedback and advice on how best to integrate Fastly specific adapter needs (e.g. adding fastly.d.ts to the root Qwik project since @fastly/js-compute only exposes types for virtual modules like fastly:env).

I have additional work here that is slightly older, but had the intention of opening a PR into the @fastly/js-compute project to address type issues when trying to import functions using static imports, otherwise dynamic imports are needed. Likely the next step to bringing the adapter up to speed.

Thanks in advance for your time, look forward to hearing any feedback!

What is it?

  • [x] Feature / enhancement
  • [ ] Bug
  • [ ] Docs / tests / types / typos

Checklist:

  • [x] My code follows the developer guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have made corresponding changes to the documentation
  • [ ] Added new tests to cover the fix / functionality

kalebpace avatar Dec 09 '23 21:12 kalebpace

Deploy request for qwik-insights pending review.

Visit the deploys page to approve it

Name Link
Latest commit f15a6c0785647b27c03cb23a165c336f3a62f3c2

netlify[bot] avatar Dec 09 '23 21:12 netlify[bot]

Thanks @kalebpace for this integration here you can find the e2e suite to test if the integration covers everything.

gioboa avatar Dec 11 '23 15:12 gioboa

Thanks @gioboa! I'll give this a go soon.

~~If I get things working, should I also open a PR into that repo with a link, plus any other changes, to the environment the E2E tests are run against?~~

~~Oops, will model contributions after the Fastify work here:~~ ~~- https://github.com/BuilderIO/qwik/pull/3282~~ ~~- https://github.com/BuilderIO/qwik-city-e2e/pull/7~~

Update: https://github.com/BuilderIO/qwik-city-e2e/pull/9

kalebpace avatar Dec 11 '23 16:12 kalebpace

@kalebpace do you have any news for this PR?

gioboa avatar Dec 24 '23 19:12 gioboa

@gioboa thanks for checking-in.

Unfortunately the Fastly runtime has a few APIs missing to fully cover the suite.

I've outlined what is missing here: https://github.com/BuilderIO/qwik-city-e2e/pull/9 And opened an issue with Fastly: https://github.com/fastly/js-compute-runtime/issues/711

Waiting to get some feedback/suggestions on whether the adapter is acceptable in its current state, maybe tagged as experimental, or if I need to put this work on pause and coordinate with Fastly until APIs are implemented.

Happy to hear any thoughts you might have on this!

kalebpace avatar Dec 24 '23 19:12 kalebpace

I think it's better to ship the feature only when is complete. This avoids unpleasant issues for missing features/bugs.

gioboa avatar Dec 26 '23 10:12 gioboa

Hi @kalebpace thanks for your help. Is this PR still valid or is it abandoned?

gioboa avatar May 27 '24 03:05 gioboa

It's likely invalid, good to close

kalebpace avatar May 27 '24 03:05 kalebpace