GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add smoke test for flight fixture by eps1lon · Pull Request #28350 · react/react

Conversation

@eps1lon

@eps1lon eps1lon commented Feb 15, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Not working in CI yet. Needs Node.js 20

Summary

The test just opens the page for now and asserts that no console errors or uncaught errors happens. This would've caught the breakage that was fixed in #28352

How did you test this change?

  • CI
  • yarn build && cd fixtures/flight && yarn && yarn build && yarn build && yarn test

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 15, 2024
@react-sizebot

react-sizebot commented Feb 15, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Comparing: 59fe6c3...0a7acc5

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.86 kB 176.86 kB = 55.14 kB 55.14 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 179.00 kB 179.00 kB = 55.78 kB 55.78 kB
facebook-www/ReactDOM-prod.classic.js = 591.78 kB 591.78 kB = 104.51 kB 104.51 kB
facebook-www/ReactDOM-prod.modern.js = 575.07 kB 575.07 kB = 101.51 kB 101.51 kB
test_utils/ReactAllWarnings.js Deleted 66.50 kB 0.00 kB Deleted 16.27 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 66.50 kB 0.00 kB Deleted 16.27 kB 0.00 kB

Generated by 🚫 dangerJS against 0a7acc5

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eps1lon
eps1lon force-pushed the test/fixture-flight branch from 220c0f7 to bf65cbe Compare February 15, 2024 22:06
@sebmarkbage

sebmarkbage commented Feb 16, 2024

Copy link
Copy Markdown
Contributor

You can test it against
#28352
and
#28353

It should still have first one but pass after both.

There's still an issue that you have to run yarn build before yarn dev because of a babel cache poisoning issues.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eps1lon eps1lon mentioned this pull request Feb 16, 2024
Add regression test to attribute-behavior fixture #28349
Open
2 tasks done
@eps1lon
eps1lon force-pushed the test/fixture-flight branch 2 times, most recently from 418f4da to 51401ff Compare February 16, 2024 10:45
@eps1lon

eps1lon commented Feb 16, 2024

Copy link
Copy Markdown
Collaborator Author

#28353

It should still have first one but pass after both.

Not sure what #28353 fixes. Is there a specific interaction that's broken? From opening the fixture and clicking around I can't immediately see what's broken.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

eps1lon
eps1lon commented Feb 16, 2024
View reviewed changes
Comment thread .circleci/config.yml Outdated
working_directory: fixtures/flight
command: |
yarn build
# Need to build twice for unknown reasons

@eps1lon eps1lon Feb 16, 2024

Copy link
Copy Markdown
Collaborator Author

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.

Otherwise we get https://app.circleci.com/pipelines/github/facebook/react/50479/workflows/7727b75f-e654-4558-9294-a2a710b8ebbd/jobs/783757/steps

Which the fixture also catches

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@unstubbable unstubbable Feb 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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 believe if you set FAST_REFRESH=false, you can skip the build step completely. This is how I verified this locally: rm -rf build ./node_modules/.cache && FAST_REFRESH=false yarn test. My understanding is that this avoids needing to transform the node_modules/react-refresh ES modules (which seems to occur too late on the first run).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@unstubbable unstubbable Feb 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

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.

On the other hand, this would just mask the issue that users might run into when trying to run the flight fixture locally. Is fast refresh that useful for the fixture? If not, we could also disable it in fixtures/flight/config/env.js, and not only in the CI.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@unstubbable

unstubbable commented Feb 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

#28353
It should still have first one but pass after both.

Not sure what #28353 fixes. Is there a specific interaction that's broken? From opening the fixture and clicking around I can't immediately see what's broken.

Without the fix from #28353 I do get hydration mismatches because the chunk script tags (mentioned as "preloads" in the PR) are rendered outside of <html> in the server, and inside of <head> in the client.

<script src="/static/js/client2.chunk.js" async=""></script>
<script src="/static/js/client3.chunk.js" async=""></script>
<script src="/static/js/client8.chunk.js" async=""></script>
<script src="/static/js/client7.chunk.js" async=""></script>
<script src="/static/js/client6.chunk.js" async=""></script>
<script src="/static/js/client0.chunk.js" async=""></script>
<script src="/static/js/client4.chunk.js" async=""></script>
<script src="/static/js/client1.chunk.js" async=""></script>
<script src="/static/js/client9.chunk.js" async=""></script>
<!DOCTYPE html>
<html lang="en">
    <head>
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@unstubbable unstubbable mentioned this pull request Feb 16, 2024
Disable fast-refresh in flight fixture tests eps1lon/react#9
Closed
@eps1lon

eps1lon commented Feb 17, 2024

Copy link
Copy Markdown
Collaborator Author

Without the fix from #28353 I do get hydration mismatches

Could you clarify how this manifests other than having to manually inspect the produced HTML? I get no console warnings which you'd usually get for hydration mismatches.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eps1lon
eps1lon force-pushed the test/fixture-flight branch from 1c182d4 to d036d62 Compare February 17, 2024 14:19
@unstubbable

unstubbable commented Feb 17, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Without the fix from #28353 I do get hydration mismatches

Could you clarify how this manifests other than having to manually inspect the produced HTML? I get no console warnings which you'd usually get for hydration mismatches.

That's strange. When I check out 4a54e8a (so before the fix), I get the expected console errors.

rm -rf build ./node_modules/.cache && FAST_REFRESH=false yarn dev:

Screenshot 2024-02-17 at 16 43 21

rm -rf build ./node_modules/.cache && FAST_REFRESH=false yarn start:

Screenshot 2024-02-17 at 16 45 36
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@unstubbable

unstubbable commented Feb 17, 2024

Copy link
Copy Markdown
Collaborator

For what it's worth, even with the console errors, and the "Hello World" expectation that was added later, I can't get the tests to fail consistently. Only when I add await page.reload(); after await page.goto('/'); it fails consistently (sometimes with two sets of errors though). Hopefully there's a better fix for this flakiness.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eps1lon

eps1lon commented Feb 18, 2024

Copy link
Copy Markdown
Collaborator Author

Can you post the exact instructions how you get the fixture running for you on a fresh clone?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@unstubbable

unstubbable commented Feb 18, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

With the following steps I got the fixture running on a fresh clone:

  • git clone https://github.com/facebook/react.git
  • cd react
  • yarn
  • RELEASE_CHANNEL=experimental node scripts/rollup/build.js --type=NODE_DEV,NODE_PROD,NODE_ES2015,ESM_PROD
    (Because I'm not patient enough for a full build, and I don't know a better way to do this.)
  • cd fixtures/flight
  • yarn
  • adjust the flight package.json because of the custom build step:
    diff --git a/fixtures/flight/package.json b/fixtures/flight/package.json
    index 3d4574778..d33affd88 100644
    --- a/fixtures/flight/package.json
    +++ b/fixtures/flight/package.json
    @@ -64 +64 @@
    -    "predev": "cp -r ../../build/oss-experimental/* ./node_modules/",
    +    "predev": "cp -r ../../build/node_modules/* ./node_modules/",
  • FAST_REFRESH=false yarn dev

And with that, I got a running flight fixture, strangely now without any hydration mismatches. 🙄
Please don't ask me what the difference is to my other clone where I do get the hydration mismatches. 🤷‍♂️

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eps1lon

eps1lon commented Feb 18, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator Author

FAST_REFRESH=false yarn dev

I was missing that bit. Fast Refresh randomly starts working after a couple of failed yarn build && yarn dev.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eps1lon
eps1lon marked this pull request as ready for review February 18, 2024 15:09
@unstubbable

unstubbable commented Feb 18, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

And with that, I got a running flight fixture, strangely now without any hydration mismatches. 🙄 Please don't ask me what the difference is to my other clone where I do get the hydration mismatches. 🤷‍♂️

Ah, I didn't realise that #28353 was merged into main. That explains why the hydration mismatches are gone now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

unstubbable
unstubbable reviewed Feb 18, 2024
View reviewed changes

@unstubbable unstubbable left a comment

Copy link
Copy Markdown
Collaborator

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.

For what it's worth, even with the console errors, and the "Hello World" expectation that was added later, I can't get the tests to fail consistently. Only when I add await page.reload(); after await page.goto('/'); it fails consistently (sometimes with two sets of errors though). Hopefully there's a better fix for this flakiness.

@eps1lon Since this is not addressed yet, I believe there will be false positive test results whenever a console error may appear due to some changes in the code base.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@eps1lon

eps1lon commented Feb 18, 2024

Copy link
Copy Markdown
Collaborator Author

I believe there will be false positive test results whenever a console error may appear due to some changes in the code base.

The idea is that we prevent these from creeping in since that's an error. console.errors are not false positives. If they are expected, they can be added to the assertion.

I'll try the page.reload(). Thank your for the tip

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@unstubbable

unstubbable commented Feb 18, 2024

Copy link
Copy Markdown
Collaborator

I believe there will be false positive test results whenever a console error may appear due to some changes in the code base.

The idea is that we prevent these from creeping in since that's an error. console.errors are not false positives. If they are expected, they can be added to the assertion.

I meant "false positive test results" as in there might be a successful test despite console errors occurring, due to the test exiting before the calls could have been collected.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@unstubbable

unstubbable commented Feb 18, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

For what it's worth, even with the console errors, and the "Hello World" expectation that was added later, I can't get the tests to fail consistently. Only when I add await page.reload(); after await page.goto('/'); it fails consistently (sometimes with two sets of errors though). Hopefully there's a better fix for this flakiness.

@eps1lon Since this is not addressed yet, I believe there will be false positive test results whenever a console error may appear due to some changes in the code base.

I tested the latest version of this PR again, but without d37ca84, and now I do get consistent test failures, as expected. So maybe there's no need to change the test, after all.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sebmarkbage
sebmarkbage approved these changes Feb 21, 2024
View reviewed changes
eps1lon and others added 4 commits February 21, 2024 23:34
@eps1lon Sebastian Silbermann
Add smoke test to flight fixture
e110488
@eps1lon Sebastian Silbermann
Debug webserver in CI
561495b
@eps1lon Sebastian Silbermann
Fix CI value
be08cc5
Sebastian Silbermann
Better webserver debugging
9aa8c4e
Sebastian Silbermann added 7 commits February 21, 2024 23:34
Sebastian Silbermann
Ensure dependency constraints are fulfilled
3a94495
Sebastian Silbermann
yarn build is required
99466f8
Sebastian Silbermann
Add hint for require Node.js version
bdbbce8
Sebastian Silbermann
Ensure correct Node.js version is used
0320dd3
Sebastian Silbermann
Ensure build completed
76fc01c
Sebastian Silbermann
Fix build
0bf35c3
Sebastian Silbermann
Fix bundle error
0a7acc5
@eps1lon
eps1lon force-pushed the test/fixture-flight branch from 03660c7 to 0a7acc5 Compare February 21, 2024 22:34
@eps1lon

eps1lon commented Feb 21, 2024

Copy link
Copy Markdown
Collaborator Author

Didn't detect any flakiness while running locally so let's see how CI treats it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@eps1lon eps1lon changed the title Add smoke test to flight fixture Add smoke test for flight fixture Feb 21, 2024
@eps1lon
eps1lon merged commit 81d2a51 into react:main Feb 21, 2024
@eps1lon
eps1lon deleted the test/fixture-flight branch February 21, 2024 22:47
@huozhi huozhi mentioned this pull request Feb 26, 2024
Upgrade vendored react vercel/next.js#62549
Merged
huozhi added a commit to vercel/next.js that referenced this pull request Feb 26, 2024
@huozhi
Upgrade vendored react (#62549)
87015ac
### React upstream changes

- react/react#28438
- react/react#28436
- react/react#25954
- react/react#28434
- react/react#28433
- react/react#28432
- react/react#28415
- react/react#27903
- react/react#28430
- react/react#28424
- react/react#28400
- react/react#28422
- react/react#28423
- react/react#28412
- react/react#28418
- react/react#28421
- react/react#28417
- react/react#28399
- react/react#28408
- react/react#28350
- react/react#28387
- react/react#28403
- react/react#28384
- react/react#28409
- react/react#28398
- react/react#28405
- react/react#28328
- react/react#28402
- react/react#28386
- react/react#28388
- react/react#28379
- react/react#28383
- react/react#28390
- react/react#28389
- react/react#28382
- react/react#28348



Closes NEXT-2600
@ztanner ztanner mentioned this pull request Mar 19, 2024
(backport) Update React from 60a927d04 to 14898b6a9 vercel/next.js#63442
Closed
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
@eps1lon @AndyPengc12
Add smoke test for flight fixture (react#28350)
3357bea
bigfootjon pushed a commit that referenced this pull request Apr 18, 2024
@eps1lon
Add smoke test for flight fixture (#28350)
4683bd9
DiffTrain build for commit 81d2a51.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@eps1lon
Add smoke test for flight fixture (react#28350)
0034fbd
This was referenced Oct 5, 2026
Prevent focused tests from bypassing Flight fixture CI coverage #37756
Closed
[Closed] Reject focused Playwright tests on CI chengchuu/react#3
Closed
[Flight fixture] Reject focused Playwright tests on CI chengchuu/react#4
Closed
[ci] Reject focused Playwright tests in Flight fixture #37757
Merged
eps1lon pushed a commit that referenced this pull request Oct 6, 2026
@chengchuu
[ci] Reject focused Playwright tests in Flight fixture (#37757)
ac35e99
## Summary

Change the Flight fixture’s `forbidOnly` from `!isCI` to `isCI` to
reject `.only` on CI and allow focused debugging locally. This prevents
CI from passing while accidentally excluding other tests and matches the
existing comment.

The inverted condition dates to
[#28350](#28350).

## How did you test this change?

- Temporarily added `test.only()` and confirmed `CI=true yarn test`
rejects it with exit code `1`.
- Removed `.only` and ran the full Flight fixture suite from the
repository root:

```bash
yarn && yarn build && cd fixtures/flight && yarn && yarn playwright install chromium && CI=true yarn test
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@unstubbable unstubbable unstubbable left review comments
+1 more reviewer
@sebmarkbage sebmarkbage sebmarkbage approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@eps1lon @react-sizebot @sebmarkbage @unstubbable @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.