-
Notifications
You must be signed in to change notification settings - Fork 1.1k
WC-4185 Support variable asset count based on claims from upstream #11529
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 9d1e1a1 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
7ba955a to
c9cee82
Compare
| if (fileMap.size > fileCountLimit) { | ||
| throw new FatalError( | ||
| `Error: Pages only supports up to ${MAX_ASSET_COUNT.toLocaleString()} files in a deployment. Ensure you have specified your build output directory correctly.`, | ||
| `Error: Pages only supports up to ${fileCountLimit.toLocaleString()} files in a deployment. Ensure you have specified your build output directory correctly.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this now varies depending on plan, maybe we should say Pages only supports up to N files in a deployment for your current account plan or similar. Also, are we sure we don't need cloudflare-docs change as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes - a docs pr is needed here too. but i want to make sure the approach is ok first
| const fileMap = await validate({ directory }); | ||
| const fileMap = await validate({ | ||
| directory, | ||
| fileCountLimit: isMoreFilesEnabled(process.env.CF_PAGES_UPLOAD_JWT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd personally just give a claim with the actual file limit ({ files: 100_000 } — default 20k). That way we don't need to change Wrangler again if we ever increase this further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was trying to fit into the "features" structure earlier, but i like the flexibility with your approach. updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go Report Card
A web application that generates a report on the quality of an open source Go project. It uses several measures, including gofmt, go vet, go lint and gocyclo. To get a report on your own project, try goreportcard.com.
Sponsors
Support us over on Patreon!
- Cody Wood
- Pascal Wenger
- Jonas Kwiedor
- PhotoPrism
- Kia Farhang
- Patrick DeVivo (MergeStat)
- Alexis Geoffrey
Installation
git clone https://github.com/gojp/goreportcard.git
cd goreportcard
make install
Now run:
GRC_DATABASE_PATH=./db make start
and you should see
Running on :8000...
Navigate to localhost:8000 and you should see the Go Report Card front page.
Command Line Interface
There is also a CLI available for grading applications on your local machine.
Example usage:
git clone https://github.com/gojp/goreportcard.git
cd goreportcard
make install
go install ./cmd/goreportcard-cli
goreportcard-cli
Grade .......... A+ 99.9%
Files ................ 362
Issues ................. 2
gofmt ............... 100%
go_vet ............... 99%
gocyclo .............. 99%
golint .............. 100%
ineffassign ......... 100%
license ............. 100%
misspell ............ 100%
Verbose output:
goreportcard-cli -v
Grade .......... A+ 99.9%
Files ................ 362
Issues ................. 2
gofmt ............... 100%
go_vet ............... 99%
go_vet vendor/github.com/prometheus/client_golang/prometheus/desc.go:25
error: cannot find package "github.com/prometheus/client_model/go" in any of: (vet)
gocyclo .............. 99%
gocyclo download/download.go:22
warning: cyclomatic complexity 17 of function download() is high (> 15) (gocyclo)
golint .............. 100%
ineffassign ......... 100%
license ............. 100%
misspell ............ 100%
Contributing
Go Report Card is an open source project run by volunteers, and contributions are welcome! Check out the Issues page to see if your idea has already been mentioned. Feel free to raise an issue or submit a pull request.
Academic Citation
If you use Go Report Card for academic purposes, please use the following citation:
@Misc{schaaf-smith-goreportcard,
author = {Schaaf, Herman and Smith, Shawn},
title = {Go Report Card: A report card for your Go application},
year = {2015--},
url = {https://www.goreportcard.com/},
note = {[Online; accessed <today>]}
}
License
The code is licensed under the permissive Apache v2.0 license. Read this for a summary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go Report Card
A web application that generates a report on the quality of an open source Go project. It uses several measures, including gofmt, go vet, go lint and gocyclo. To get a report on your own project, try goreportcard.com.
Sponsors
Support us over on Patreon!
- Cody Wood
- Pascal Wenger
- Jonas Kwiedor
- PhotoPrism
- Kia Farhang
- Patrick DeVivo (MergeStat)
- Alexis Geoffrey
Installation
git clone https://github.com/gojp/goreportcard.git
cd goreportcard
make install
Now run:
GRC_DATABASE_PATH=./db make start
and you should see
Running on :8000...
Navigate to localhost:8000 and you should see the Go Report Card front page.
Command Line Interface
There is also a CLI available for grading applications on your local machine.
Example usage:
git clone https://github.com/gojp/goreportcard.git
cd goreportcard
make install
go install ./cmd/goreportcard-cli
goreportcard-cli
Grade .......... A+ 99.9%
Files ................ 362
Issues ................. 2
gofmt ............... 100%
go_vet ............... 99%
gocyclo .............. 99%
golint .............. 100%
ineffassign ......... 100%
license ............. 100%
misspell ............ 100%
Verbose output:
goreportcard-cli -v
Grade .......... A+ 99.9%
Files ................ 362
Issues ................. 2
gofmt ............... 100%
go_vet ............... 99%
go_vet vendor/github.com/prometheus/client_golang/prometheus/desc.go:25
error: cannot find package "github.com/prometheus/client_model/go" in any of: (vet)
gocyclo .............. 99%
gocyclo download/download.go:22
warning: cyclomatic complexity 17 of function download() is high (> 15) (gocyclo)
golint .............. 100%
ineffassign ......... 100%
license ............. 100%
misspell ............ 100%
Contributing
Go Report Card is an open source project run by volunteers, and contributions are welcome! Check out the Issues page to see if your idea has already been mentioned. Feel free to raise an issue or submit a pull request.
Academic Citation
If you use Go Report Card for academic purposes, please use the following citation:
@Misc{schaaf-smith-goreportcard,
author = {Schaaf, Herman and Smith, Shawn},
title = {Go Report Card: A report card for your Go application},
year = {2015--},
url = {https://www.goreportcard.com/},
note = {[Online; accessed <today>]}
}
License
The code is licensed under the permissive Apache v2.0 license. Read this for a summary.
c9cee82 to
1004d6f
Compare
1004d6f to
5fb4f51
Compare
As noted in the comments, normally we'd need to validate this jwt, but since any uploads depend on a valid jwt (and are validated later) it's fine to just decode the jwt and check for this feature
5fb4f51 to
9d1e1a1
Compare
|
✅️🫡 |
1 similar comment
|
✅️🫡 |

As noted in the comments, normally we'd need to validate this jwt, but since any uploads depend on a valid jwt (and are validated later) it's fine to just decode the jwt and check for this feature
For WC-4185
Describe your change...
A picture of a cute animal (not mandatory, but encouraged)