Skip to content
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

Fix notFound false pages returning 404 #19861

Merged
merged 2 commits into from
Jan 4, 2021

Conversation

jvarho
Copy link
Contributor

@jvarho jvarho commented Dec 5, 2020

Currently pages with notFound: false from getServerSideProps behave the same as notFound: true, i.e. just having the key is enough to result in a 404. This fixes the check in render.tsx and adds tests for it.

@ijjk ijjk added the type: next label Dec 5, 2020
@vercel vercel bot temporarily deployed to Preview December 5, 2020 06:30 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 5, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary jvarho/next.js allow-notfound-false Change
buildDuration 9.7s 10s ⚠️ +368ms
nodeModulesSize 82.4 MB 82.4 MB ⚠️ +55 B
Page Load Tests Overall decrease ⚠️
vercel/next.js canary jvarho/next.js allow-notfound-false Change
/ failed reqs 0 0
/ total time (seconds) 2.343 2.351 ⚠️ +0.01
/ avg req/sec 1066.93 1063.49 ⚠️ -3.44
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.244 1.251 ⚠️ +0.01
/error-in-render avg req/sec 2010.43 1998.79 ⚠️ -11.64
Client Bundles (main, webpack, commons)
vercel/next.js canary jvarho/next.js allow-notfound-false Change
677f882d2ed8..34b9.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-f501b4a..c42e.js gzip 6.56 kB 6.56 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary jvarho/next.js allow-notfound-false Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-01375..90b6.js gzip 3.69 kB 3.69 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.27 kB 8.27 kB
Client Build Manifests
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Rendered Page Sizes
vercel/next.js canary jvarho/next.js allow-notfound-false Change
index.html gzip 614 B 614 B
link.html gzip 621 B 621 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary jvarho/next.js allow-notfound-false Change
buildDuration 11.5s 11.4s -64ms
nodeModulesSize 82.4 MB 82.4 MB ⚠️ +55 B
Client Bundles (main, webpack, commons)
vercel/next.js canary jvarho/next.js allow-notfound-false Change
677f882d2ed8..34b9.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-f501b4a..c42e.js gzip 6.56 kB 6.56 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary jvarho/next.js allow-notfound-false Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-01375..90b6.js gzip 3.69 kB 3.69 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.27 kB 8.27 kB
Client Build Manifests
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_error.js 1 MB 1 MB ⚠️ +15 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB ⚠️ +15 B
link.js 1.06 MB 1.06 MB ⚠️ +15 B
routerDirect.js 1.05 MB 1.05 MB ⚠️ +15 B
withRouter.js 1.05 MB 1.05 MB ⚠️ +15 B
Overall change 5.16 MB 5.16 MB ⚠️ +75 B
Commit: 5ab13a1

@ijjk
Copy link
Member

ijjk commented Jan 4, 2021

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary jvarho/next.js allow-notfound-false Change
buildDuration 10.2s 10.3s ⚠️ +133ms
nodeModulesSize 80.6 MB 80.6 MB ⚠️ +55 B
Page Load Tests Overall increase ✓
vercel/next.js canary jvarho/next.js allow-notfound-false Change
/ failed reqs 0 0
/ total time (seconds) 2.085 2.06 -0.02
/ avg req/sec 1198.93 1213.73 +14.8
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.332 1.27 -0.06
/error-in-render avg req/sec 1877.57 1968.89 +91.32
Client Bundles (main, webpack, commons)
vercel/next.js canary jvarho/next.js allow-notfound-false Change
677f882d2ed8..396f.js gzip 13 kB 13 kB
framework.HASH.js gzip 39 kB 39 kB
main-6b712d3..3360.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.3 kB 59.3 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary jvarho/next.js allow-notfound-false Change
polyfills-81..14d7.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_app-b6fc6bc..222c.js gzip 1.28 kB 1.28 kB
_error-e2ffa..0f3f.js gzip 3.46 kB 3.46 kB
hooks-010c20..8411.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-705099c..c35d.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes
vercel/next.js canary jvarho/next.js allow-notfound-false Change
index.html gzip 615 B 615 B
link.html gzip 620 B 620 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary jvarho/next.js allow-notfound-false Change
buildDuration 12.4s 12.4s -22ms
nodeModulesSize 80.6 MB 80.6 MB ⚠️ +55 B
Client Bundles (main, webpack, commons)
vercel/next.js canary jvarho/next.js allow-notfound-false Change
677f882d2ed8..396f.js gzip 13 kB 13 kB
framework.HASH.js gzip 39 kB 39 kB
main-6b712d3..3360.js gzip 6.63 kB 6.63 kB
webpack-50be..df5b.js gzip 751 B 751 B
Overall change 59.3 kB 59.3 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary jvarho/next.js allow-notfound-false Change
polyfills-81..14d7.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_app-b6fc6bc..222c.js gzip 1.28 kB 1.28 kB
_error-e2ffa..0f3f.js gzip 3.46 kB 3.46 kB
hooks-010c20..8411.js gzip 887 B 887 B
index-bbee2f..528b.js gzip 227 B 227 B
link-705099c..c35d.js gzip 1.64 kB 1.64 kB
routerDirect..bf84.js gzip 303 B 303 B
withRouter-a..5826.js gzip 302 B 302 B
Overall change 8.09 kB 8.09 kB
Client Build Manifests
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles Overall increase ⚠️
vercel/next.js canary jvarho/next.js allow-notfound-false Change
_error.js 1 MB 1 MB ⚠️ +15 B
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 MB ⚠️ +15 B
link.js 1.06 MB 1.06 MB ⚠️ +15 B
routerDirect.js 1.05 MB 1.05 MB ⚠️ +15 B
withRouter.js 1.05 MB 1.05 MB ⚠️ +15 B
Overall change 5.17 MB 5.17 MB ⚠️ +75 B
Commit: e34addf

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants