edge-runtime icon indicating copy to clipboard operation
edge-runtime copied to clipboard

Request for Update to Deno 2.1

Open sandeepuno opened this issue 1 year ago • 13 comments

It has been over a month since the release of Deno 2.1, which is now the latest stable version. Could you please provide an update on when we can expect the Supabase Edge Runtime to be updated to this version?

The current version used in Edge Runtime seems to be lagging behind, and adopting the latest Deno version would help in resolving some dependency issues and leveraging new features.

Any information or timeline on this update would be greatly appreciated. Thank you!

sandeepuno avatar Dec 23 '24 11:12 sandeepuno

Hello 😀

We've already started working on this, but we can't give you a timeline for when it will be done for now.

I can tell you that we are making this a higher priority. We'll keep you posted if there's some progress.

nyannyacha avatar Dec 23 '24 13:12 nyannyacha

Really looking forward to this update!

alberto-abarzua avatar Dec 24 '24 23:12 alberto-abarzua

Thanks for the update. Kudos

sandeepuno avatar Dec 25 '24 08:12 sandeepuno

Amazing to see that this is worked on. We are blocked by not being able to integrate with other local node-based packages due to this. Discovering after a days of work that following the tutorial installs a very different version of Deno (2.1) than the runtime is able to execute sucks. Everything works fine locally and everything fails during the deployment with errors that send you in circles regarding modules not found and paths...

smndtrl avatar Jan 08 '25 16:01 smndtrl

That's awesome @nyannyacha! Is there an unstable branch where we can help with early testing?

vinerz avatar Jan 11 '25 20:01 vinerz

Is there an unstable branch where we can help with early testing?

Sorry, I want to say the work has not yet progressed sufficiently enough for early testing.

Work is in progress on the branch that exists in my fork.

I can tell you that the work has not progressed far enough to pass the compilation. This work involves a major refactoring of the repository, so there is a lot to review. But I will keep you guys updated on any meaningful progress.

nyannyacha avatar Jan 13 '25 02:01 nyannyacha

@nyannyacha Could you consider releasing support for Deno 1.46 in the meantime? Version 1.46 includes a fix for an issue with Firebase Admin.

RCVZ avatar Jan 28 '25 20:01 RCVZ

Hi @RCVZ 😄

consider releasing support for Deno 1.46 in the meantime?

I'm sorry. As work on Deno 2 has already started, I think there will not be enough bandwidth for that.

You mentioned that there's a problem with Firebase Admin. Can I know what the problem is?

nyannyacha avatar Jan 28 '25 21:01 nyannyacha

Thanks for your work towards Deno 2 @nyannyacha

During work to support webpush with a Supabase Edge function I observed the following bug: https://github.com/denoland/deno/issues/23693

This is fixed in 1.46.2 as per https://github.com/denoland/deno/releases/tag/v1.46.2

Currently I had to workaround by importing a static ece.js file. Using a node package like web-push would be much nicer to not having to implement everything on my own. So I'm happily waiting for a newer edge runtime. 🙂

christianfl avatar Feb 10 '25 17:02 christianfl

The develop branch is now on Deno 2.1. More changes will continue to be pushed in this branch during testing over the next few weeks, but you can start using it right now for testing purposes.

If you find any problems, please let us know. Thank you!

nyannyacha avatar Feb 24 '25 11:02 nyannyacha

The develop branch is now on Deno 2.1. More changes will continue to be pushed in this branch during testing over the next few weeks, but you can start using it right now for testing purposes.

If you find any problems, please let us know. Thank you!

Is this experimental feature supported in this version? https://github.com/denoland/deno/pull/28512

Revadike avatar Apr 20 '25 20:04 Revadike

Is this experimental feature supported in this version? denoland/deno#28512

The dev branch partially supports Deno 2.1.4 (some things have been deactivated, some not activated), which was released on Dec 11, 2024. It appears that the PR you are referring to is from last month. I'm not aware of anything like this backported.

AntonOfTheWoods avatar Apr 20 '25 23:04 AntonOfTheWoods

Is this experimental feature supported in this version? denoland/deno#28512

The dev branch partially supports Deno 2.1.4 (some things have been deactivated, some not activated), which was released on Dec 11, 2024. It appears that the PR you are referring to is from last month. I'm not aware of anything like this backported.

Initial support for using local npm packages landed in Deno 2.2.5

Is it possible to use this Deno version somehow?

Revadike avatar Apr 22 '25 12:04 Revadike

@nyannyacha @laktek - has the migration to 2+ been abandoned? The problem is that the 2.1 LTS branch you guys released compatibility with is now officially EOL. There are lots of bug fixes and new interesting features for real workloads in later versions. The new LTS - 2.2 (utterly moronic on their part but anyway...) - was released a long time ago and we are already on the next non-LTS (2.3).

I realise that the team might be small but if you guys don't have a basically automated application of your version patches then that would seem to pose lots of reliability and security issues moving forward. If you do, then that should mean you can update easily and quickly... Yet we are many months on, and we still don't even have support for the EOL 2.1.

The issue is more than a little frustrating as recent versions of deno update to a new lock file version (5) - this means that tooling is now also a pain as we can't use deno tools. Unless of course we have to use an EOL that is missing many new features.

AntonOfTheWoods avatar May 21 '25 08:05 AntonOfTheWoods

Hi @AntonOfTheWoods 💚 Pls check mine as well Nya comments on the issue #532

kallebysantos avatar May 21 '25 09:05 kallebysantos

@kallebysantos , @nyannyacha , just like the Deno maintainers, seem to be adamantly refusing to say anything clear and logical about what Deno LTS is going to be, and what this repo is going to follow. If this project is going to choose randomly from the Deno LTS releases then they should say so. Deno 2.1 WAS an LTS (it is now officially EOL), 2.2 is the current LTS, and 2.4 will be the next LTS. I linked to Deno maintainers saying as much in the other ticket. Their graphic is still incomplete (probably) but at least it shows that.

2.4 is planned to be released at the end of July 2025 and is planned to receive support until the end of July 2026. Given where we are now, that is probably the most relevant information for everyone here to keep in mind.

That and if the current 2.1-based version is ever released, it will already be EOL and may have known security issues that will not be patched upstream.

AntonOfTheWoods avatar May 21 '25 10:05 AntonOfTheWoods

Hi @AntonOfTheWoods 🙏

will not be patched upstream.

That's not really true, like I described here: https://github.com/supabase/edge-runtime/issues/532#issuecomment-2897460035

Deno itself is composed by multiples crates (sub-packages) so in fact theses LTS are just a version pins over all theses crates, it means that is possible to upgrade theses packages deps gradually. Also the edge-runtime is not a directly 1:1 with upstream and a loot of things was cherry-picked/cloned and customised. This also applies for security patches and bug fixes, so even on 2.1 we can still grab something from latest.


btw, lets keep commenting on this current issue to avoid duplicate answers

kallebysantos avatar May 21 '25 10:05 kallebysantos

Stuck in an annoying spot due right now.

Deno V2 support in hosted environments is not ready.

I'm facing an issue which is resolved in Deno 1.46 but it was decided that you'll skip 1.46 to focus on 2.

However that was 6 months ago and V2 isn't available and Supabase Edge Runtime is stuck on 1.45. If you're foreseeing that there will continue to be delays with the official support of V2, it makes sense to take the time to give customers an upgrade to 1.46.3, otherwise we're stuck without any options.

alasano avatar Jun 08 '25 15:06 alasano

@alasano , I suggest you look at the merged commits to this repo over the past six months. There may be a lot of activity on personal branches and we're going to get a flurry of merges soon but... edge-runtime clearly is not something Supabase (the company) has decided to put lots of people on. Probably better to investigate alternatives. I am already deeply regretting migrating everything to it!

AntonOfTheWoods avatar Jun 09 '25 11:06 AntonOfTheWoods

The DX is horrible. And with the hard limits of 2 seconds CPU time, anything that involves data or media is impossible. For this and the same reasons above, I have already started migrating from edge functions. I really wanted them to work for my use case :(.

alberto-abarzua avatar Jun 15 '25 04:06 alberto-abarzua

Hi @alberto-abarzua 💚 Is sadly to read that you're facing issues with the current edge runtime 😔 If is there anything I could help you it? please open a new issue or ask on discord community for guidance.

kallebysantos avatar Jun 15 '25 12:06 kallebysantos

@kallebysantos I think there is a fundamental trust issue now. We are going to start pushing a year with deno 2 availability and you still don't have a version in prod yet. There seems to be something not working right with your dev to prod pipeline. There is definitely a huge issue (company-wide) with documentation. It's about setting an achievable set of goals that align with the community and company objectives, and then just doing it. Supabase (like many youngish companies unfortunately) seem to be putting all their energies into utterly useless "AI" features, and leaving the proper engineering and documentation as an afterthought. I'm not blaming you, it's management/ownership of course... Young devs need leadership and it looks like the Supabase founders are just trying to get bought, rather than actually build anything meaningful.

AntonOfTheWoods avatar Jun 16 '25 00:06 AntonOfTheWoods

I'm very sorry for the lack of progress and communication regarding the Deno 2.1 migration on the hosted environment. The work is not abandoned, but is progressing more slowly than we initially planned. We have revised the approach to complete the migration within the next 4 weeks.

Edge Functions experienced a massive usage growth in the last couple of months from the popularity of AI builders (Lovable, Bolt, etc). We've had to ensure the hosted platform scales to match this demand while staying stable. These efforts do take a considerable amount of developer time.

We have to ensure the existing Functions continue to work when we upgrade the hosted platform to Deno 2.1 (there is a lot of legacy code, and we have the right escape hatches for it). This requires more planning, developing and testing on our end.

Additionally, given the complexity of these upgrades (especially with Deno LTS having very short lifespans), we have also begun re-evaluating how we offer runtimes for Edge Functions. We are looking into a container-based approach where we can allow multiple runtimes and multiple versions (eg: allowing to run 1.4X and 2.X in parallel without users explicitly needing to upgrade to 2.X). It's very early in these efforts to provide any concrete information. But after completing the Deno 2.1 upgrade, this would be the direction we'd like to take. This would have better pay-offs in terms of DX plus flexibility of the Edge Functions platform.

I will provide an update in GitHub Changelog and Supabase blog when we are ready to migrate Functions to Deno 2.1 in the hosted platform (if all goes according to the plan, it should be within the next 4 weeks 🤞)

laktek avatar Jun 16 '25 02:06 laktek

You can now preview Deno 2.1 on our hosted platform. Please try and give feedback. That'll help accerlate the full rollout https://github.com/orgs/supabase/discussions/36814

laktek avatar Jul 01 '25 23:07 laktek

@laktek @kallebysantos v1.68.0 was released yesterday - is this the Deno v2 version that has been/will be deployed to prod?

AntonOfTheWoods avatar Jul 18 '25 05:07 AntonOfTheWoods

@AntonOfTheWoods prod deploy will happen within next 2 weeks. You can try it on our preview cluster: https://github.com/orgs/supabase/discussions/36814

laktek avatar Jul 18 '25 05:07 laktek

In the meantime, 2.4 has been released, also an LTS (2.1 is already EOL), with lots of nice goodies that would make everyone's life more beautiful... Sniff...

AntonOfTheWoods avatar Jul 27 '25 08:07 AntonOfTheWoods

FYI: Deno 2.1 is fully released on hosted environment https://github.com/orgs/supabase/discussions/37941

(We wil merge the develop branch to main next week and then close this issue)

laktek avatar Aug 15 '25 06:08 laktek

The develop branch has been merged into the main branch, so I will close this issue. First release of Deno 2.1 on the main branch is v1.69.1.

nyannyacha avatar Aug 20 '25 05:08 nyannyacha