Build Image Update #1
Replies: 52 comments 147 replies
-
Looks great! One item of confusion in the community that often appears is around Yarn. Specifically, on the current build image Yarn is only available if a A possible solution to this would be to include Yarn (and PNPM, from what the document above says) at all times, even when there is no lock file. Another point of confusion is around the ability to customize the install command. Leaving it locked at Final thing, and a lot of users seem to have expressed this in the Discord call, the ability to completely opt out of |
Beta Was this translation helpful? Give feedback.
-
Would be cool if Rust was included in the build image - this would make it a lot easier to use something like https://rust-lang.github.io/mdBook/ See if you can tempt more JS devs to Rust :^) |
Beta Was this translation helpful? Give feedback.
-
So excited to see this!
Pinned versions makes 100% sense to me, other than in the case of a security issue. Users can still override versions with
This makes sense to me. I'd expect a large notification in the build log, as well as something on the Pages project itself - perhaps a banner on the dashboard?
This seems great to me. If it's updated every 6 months, that means 1 year of security updates. As long as there's a clear notice in build logs and the pages project that any version I'm using is out of date, this sounds fine.
6 months feels fine to me. Notifications would need to be clear - build logs, pages project alerts, email notifications, etc., but updating once or twice per year is very approachable I think for any maintained project.
This is a great change. There have been SO MANY supply chain attacks in JavaScript over the last few years, due to loose version numbers and npm install. Ignoring vulnerabilities, it’s also completely possible for a build to break from one install to the next, if package versions aren’t pinned. Ideally, I'd love a way to one-click test a new image version, to verify it'll work with my project before upgrading, failing, and then reverting. Open SourceThis was discussed a bit on the community call, but what's the plan for open sourcing? An open source build image would be incredible for testing purposes, and guaranteeing the same build environment. Publishing the image on Docker Hub without open sourcing would be a step in the right direction, but with other competitors entirely open sourcing their image, the Pages one being open source would be awesome to see, and add a massive layer of confidence. Adding your own logs, changes, etc. to the image for very intricate and edge-casey testing would be great, as well as just having a great source for issues, suggestions, etc. Given the nature of Pages, the competition, and the fast moving ecosystems it supports, I think not open sourcing and actively maintaining a repository with issues/discussions, releases, etc. would be a mistake. |
Beta Was this translation helpful? Give feedback.
-
For notifying about deprecations: one possible thing that might make sense is replacing a script with a shell-script right inside the build image. For example, if I tried to use Another thing that would be great would be build image changelogs, similar to the Workers changelogs but perhaps more automated? |
Beta Was this translation helpful? Give feedback.
-
Can node version be extracted from package.json's |
Beta Was this translation helpful? Give feedback.
-
There's been a bit of discussion on Discord already, so to not lose that, I'll link it here. But please continue to post comments and questions on this RFC :) |
Beta Was this translation helpful? Give feedback.
-
My question in the call regarding expanding the build service to support workers as well, the other reason I bring this up is supporting custom images. If you support custom images, many of these questions and challenges about the new build image would be simplified since in the worst case they can use custom. While those builds might be slower at the beginning, this would help identify the most common requirements which could be put into any number of cached/default images. |
Beta Was this translation helpful? Give feedback.
-
I'd really like to see |
Beta Was this translation helpful? Give feedback.
-
The Zola version support in V2 is still "Any version from 0.5.0 to 0.14.0“ but Ubuntu 22.04 should support 0.15.3 I guess. However, the delay between 0.14.0 and the support of 0.15.3 (0.15.3 is already out for almost 6 months) may be a huge problem for people using this tool. |
Beta Was this translation helpful? Give feedback.
-
Thanks for putting this before the community! Two thoughts:
cc: @bep |
Beta Was this translation helpful? Give feedback.
-
Current SQLite is Version 3.39.0 (2022-06-25) |
Beta Was this translation helpful? Give feedback.
-
Will you be reading environment variables from |
Beta Was this translation helpful? Give feedback.
-
Would love to see BunJS added to the supported runtimes. |
Beta Was this translation helpful? Give feedback.
-
With the current build image being referred to as v1, and the new one as v2, I think a better long-term solution is needed to version the images.
Real life example: if you've heard about ubuntu once, you'll recognise To avoid confusion with ubuntu versions specifically, I'd avoid the |
Beta Was this translation helpful? Give feedback.
-
This is mainly about the build image but also Pages in general. Could Pages' configuration be unified in one file, preferably one with a format that can have type completion(think *.config.ts, but doesn't have to be any specific format, just an idea)? It seems odd that every new feature has its configuration, with a format that doesn't always match what the others are doing. This could also be handy for setting up build tool/framework detection since the config file would be able to tell you out of the box what frameworks are supported and how exactly to set a version for them. Here's a proposal for what that could look like that I bashed together in a few minutes. Could probably be improved, but it is just a proof of concept. https://gist.github.com/helloimalastair/a431840311f78a104e03bce945ecbd8c |
Beta Was this translation helpful? Give feedback.
-
Hey folks, PM of Pages here. Thanks for your patience on this. I fully understand the frustration. We are eager to pick up the work again on the Build Image (had to put it down to bring Pages Functions to GA). I'll be sure to communicate a concrete date when we can give you all something to work with. Please drop any specific questions not written in this discussion yet in my thread here. |
Beta Was this translation helpful? Give feedback.
-
Here's an excerpt from the GHA return in my most recent deployment:
|
Beta Was this translation helpful? Give feedback.
-
I couldn't find this mentioned earlier, please pardon me if it has been and I'm blind. |
Beta Was this translation helpful? Give feedback.
-
It would be better if we could have the build file like netlify.toml, so the devs can manage the build settings. |
Beta Was this translation helpful? Give feedback.
-
Any news regarding a possible release date so we can finally use newer versions of Node? |
Beta Was this translation helpful? Give feedback.
-
Good to know the building image would have a major update soon (hopefully). Since Currently the process have to pull all dependencies every time. While on Vercel and Github Actions, dependencies even build cache can be saved and reused for the next build, unless you manually clear it / select to build it clean.🤔 -- Edit: My personal blog (Next.js w/ pnpm, around 30 pages in total) takes around 1m40s on Cloudflare Pages while it takes only 30-40s on Vercel. Even with Github Actions, it only took 1m from environment initiating to upload complete. I love Cloudflare services, but Cloudflare Pages' building image really needs way more improvements. |
Beta Was this translation helpful? Give feedback.
-
I also just realized we are better off deploying via Github Actions since we have to install an extra binary (libvips) for our build. |
Beta Was this translation helpful? Give feedback.
-
Depending on how frequently the image is updated, certain runtimes may have to be updated more frequently. For example, Go 1.18 has already reached EoL as of a week ago. See https://endoflife.date/go |
Beta Was this translation helpful? Give feedback.
-
was going to give cloudflare pages a try... failed at the first hurdle of not supporting node 18... oh well off to a decent provider then :D |
Beta Was this translation helpful? Give feedback.
-
Yesterday as a test I tried pushing the same nextjs git project to aws amplify, vercel, netlify and cloudflare pages.. worked fine deployed and visible with no hassle on all but cloudflare pages. (tiny project and started off with a bunch of server errors, eventually got round those only to run into the CPU limit on a 4 page site!) Not top of the list for sure... |
Beta Was this translation helpful? Give feedback.
-
When is v2 gonna be released? Tried to deploy a Sveltekit app and it requires node 18....At least is there any workaround? |
Beta Was this translation helpful? Give feedback.
-
Waited for more than half a year, switched to Vercel |
Beta Was this translation helpful? Give feedback.
-
Having your own CLI (wrangler) in package.json breaks your pages deploys |
Beta Was this translation helpful? Give feedback.
-
Do u support NodeJS 18 by any chance?
|
Beta Was this translation helpful? Give feedback.
-
Hi folks! Thank you for your feedback in this thread — it was very valuable as we considered what to update with. We're very excited to announce that a v2 beta for Pages' build system in now available to select in your project settings and it comes with a fresh set of defaults, including Node.js 18, pnpm support and Python 3.10! More information is available on the blog post (https://blog.cloudflare.com/moderizing-cloudflare-pages-builds-toolbox/) and documentation (https://developers.cloudflare.com/pages/platform/language-support-and-tools/). Please give it a try and let us know if you have any feedback in the And if you have any questions, we're going to be hosting a Q&A session later today in Discord at 1730 UTC: https://discord.com/invite/cloudflaredev?event=1103324690149298196. Hope to see you there! |
Beta Was this translation helpful? Give feedback.
-
DISCLAIMER: This a document intended for discussion and feedback. This is NOT a definite commitment to what we will deliver. All points below are subject to change.
Overview
The current build image has been out of date for some time. We (the Pages team) would like to:
Current V1
To start with, let's summarise the runtimes and tools (and their versions) we currently include:
Operating System: Ubuntu 16.04 (xenial)
Runtimes
GO_VERSION
NODE_VERSION
.nvmrc
,.node-version
PHP_VERSION
PYTHON_VERSION
runtime.txt
,Pipfile
RUBY_VERSION
.ruby-version
SWIFT_VERSION
.swift-version
Tools
GUTENBERG_VERSION
HUGO_VERSION
NPM_VERSION
YARN_VERSION
ZOLA_VERSION
The goal of this RFC and the discussion it is to explore a list of runtimes and tools we'd like to support in the future.
Proposed v2
Operating System: Ubuntu 22.04 (jammy)
Runtimes
GO_VERSION
JAVA_VERSION
NODE_VERSION
.nvmrc
,.node-version
PHP_VERSION
PYTHON_VERSION
runtime.txt
,Pipfile
RUBY_VERSION
.ruby-version
SWIFT_VERSION
.swift-version
Tools
BowerCaskGUTENBERG_VERSION
HUGO_VERSION
NPM_VERSION
YARN_VERSION
ZOLA_VERSION
EMBEDDED_DART_SASS_VERSION
/EMBEDDED_DART_SASS
Version pinning
As you may have noticed, all the versions in v2 are pinned to a specific one. Pinning is important to always create a reproducible build. By default the output of your build should always be the same. Only installing the latest major (such as 16.x) would mean that between builds, the version can change. This version change can introduce a bug or cause an unintended side effect.
The only time we'll update the defaults is in two cases:
Question for community: Is there any other scenario where you would expect an update to the default to be made?
Deprecations
Deprecations will be done in a major version and removed in the next. For example, deprecating bower in v2 would mean removal in v3 if there are no major objections.
Question for community: How do you feel about the deprecation cadence? How would you like to be notified of deprecation?
Support
We're looking to have support remain for the last 2 major image versions for security updates. Note the latest major will be the one that receives new patch fixes, we are unlikely to backport many changes to the older version unless they're for security.
Question for community: Is the last 2 major image versions enough? Not enough? Too much?
Upgrade Cycle
We are thinking of releasing a new version of the build image every 6 months (not confirmed) in order for new versions to come out and new LTS' to be assigned. The upgrade cycle would only be for breaking changes, new versions being supported or new languages/tools (assuming no breaking change) would continue to be added at any time.
Question for community: How do you feel about the 6-month time frame?
Changes to the installations
npm install
tonpm ci
if apackage-lock.json
is presentWhat defines a breaking change?
A breaking change is something where projects may break. This could be updating the default version of a language/tool or updating the Operating System. This can also happen from doing something which seems harmless like updating the download location (this could lead to a currently supported version not being available for example) so all tests must pass to ensure things are not breaking unexpectedly.
Question for community: How does our definition align with your expectation of a breaking change?
Summary of proposed changes
bower
(do you usebower
? If so, please tell us!)cask
(do you usecask
? If so, please tell us!)pnpm
npm install
tonpm ci
if there's apackage-lock.json
Final note
This RFC outlines our goals and the current plans, these may change due to new releases, technical limitations or other. We will try to keep this RFC as up to date as we can with what the image is looking like during development. User feedback will be critical in these early stages, so please reach out! We want to provide a great build experience for all types of developers, so all ideas/concerns are welcome!
Beta Was this translation helpful? Give feedback.
All reactions