-
Notifications
You must be signed in to change notification settings - Fork 992
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
The CI improvements we need [tracking issue] #1886
Comments
I intentionally left out the topic of "Performance: Benchmarks and Checks". I have some ideas and examples to draw from. For me, this feels like the next step after the kinds of CI improvements I mentioned above. |
Regarding Windows I'm seeing Windows' file system is slower than Linux's, so when reading or writing lots of small files, Windows is going to see a lot worse performance than Linux. And guess what Googling around a bit, I found this thread https://travis-ci.community/t/yarn-network-troubles/333 The suggest disabling Windows Defender. Combining the info there, with these Windows Defender instructions for Github Actions could be worth exploring. actions/runner-images#855 |
Here's my e2e (cypress) GitHub workflow:
|
Cypress on Windows has a bug that we'd have to work around if we want to get cypress tests running on both ubuntu and windows cypress-io/cypress#789 |
Bummer all around regarding these Windows issues.
I previously did try implementing several of the settings mentioned in this thread, which did not resolve the connection issue for me. Definitely worth a second-round attempt with better documentation this time. Also, I could only test via the GitHub action since I’m on Mac — testing on your local machine first would be a very helpful. |
Was getting errors on the "windows-latest | Node 14" GH actions run for a PR, and found this issue that matches the error I saw yarnpkg/yarn#8242 The error I was seeing is And the this is why yarn closed the issue on their end
So, not "fixed", but "less susceptible". |
added to OP |
@Tobbe re: Cypress on Windows bug mentioned by you above: Based on this comment in the Issue you linked, it seems possible for us to add a Windows runner to our Cypress CI, yes? Or am I misunderstanding the related Windows issues. |
@thedavidprice I haven't tried. Latest version of cy I've tested with is 6.4.0. That comment you linked is about 6.5.0. But looking at the changelog for v6.5.0 I don't see anything that should affect this issue. What makes me cautiously optimistic is that she says it works using cmd and ps, but is broken on git-bash. I've only tried git-bash. So maybe it would have worked for me as well had I been using ps. Do we know what shell the Windows runner is using? Could be worth it to just try, and see how/where/if it breaks. |
@Tobbe looks like we have three options. Not sure how we choose, but I'm optimistic this makes it possible. I'd definitely like to give it a go as the feels like a huge hole in our CI right now: |
If we build the script in this RFC #2218, I think we are only a few steps away from being able to automate deployment testing. |
Update: added , Scaffold CSS, and Toast checks here #2164 |
All three seems to be based on bash. The shells Sandra said it worked in were TS and Cmd, i.e. not bash based. I'll take a look tonight at rewriting those |
@Tobbe check out this (almost) successful test PR: #2227 I possibly verified that the GitHub Action
FYI: currently I've re-added the step to start rw dev Could you take a stab at diagnosing the issue with the rw dev step? Also, I welcome alternatives to setting 'bash' and/or using a conditional to run Windows-specific commands. |
I'm afraid getting Cypress to start is the easy part. What's going to be difficult is getting the tests to pass. I tried here: #2228. They're super flaky, but maybe we can improve that. What really got me stuck though is deleting the dev db file. File locks don't work the same way on Linux and Windows. |
Services to manage updating and deploying projectsPrisma has a great CI + Actions set up to test deploys and automatically update versions of project:
|
Happy to help out with any Renovate or Prisma e2e-tests related questions - we are pretty happy with this setup and it helps us catch loads of things on our side and on the side of partners as well 👍 (@janpio on shared Slack or Prisma Slack) |
Added to OP |
Made good progress on Deploy Automation in #4484 Remaining TO DO (post v1):
|
Update: Deployment AutomationThis CI project is complete! Repo here: https://github.com/redwoodjs/deploy-target-ci What it does
🚀 |
Goal
The process of drafting and publishing a new release (with high quality confidence) should take no more than 2-3 hours.
Current Problems
Improvements and Solutions
Cypress E2E runner
Current Cypress test covers Tutorial parts 1 - 6. It's available to run manually against either the current branch or against a specific project using the packages installed in the project:
Improvements
dataMigrate
,setup auth [netlify]
,setup deploy [netlify]
(note: just need to confirm commands run and complete; not sure if we need to then test functionality of each at this point)Test and Storybook Commands
For full automation, ideally, we would create a project using the E2E runner. If passing, we would then run these checks:
rw test
against a project that has passing Web and API testsrw storybook
against a project with Cells, pages, Layout, etc. and then use Cypress to confirm one of each component is displaying correctly (including states for Cells)Prerender
Need to determine testing for pretender. Both during dev and deploy:
Next Priorities (additions to original list)
ts-to-js
transpiling within create-redwood-app.js (instead of the current separate CLI command) #1954yarn rw serve
db seed
to E2EDeployment + API/DB Connection
I'm currently running manual Netlify and Vercel deploys, which requires 1) checking build logs for clean build and 2) checking deployed site to confirm API connection and DB are working accordingly.
We need to automate deploy and API/DB tests:
Release Notes
At this time, I don't believe we need specific automation for drafting the Release Notes themselves. We have a good process, and manually reviewing and writing feels like helpful practice at this point in the project.
What would be helpful is consolidating where we draft Release Notes and possibly automating distribution (e.g. GitHub, Forums, and Twitter).
Why do PR checks take so much time to complete?
We currently have the following PR checks:
yarn install
yarn build
yarn lint
yarn test
And we run a matrix against Node.js [v12, v14] && OS [Windows, Linux]. So there are 4 runners in parallel.
Linux runners complete in 3-4 minutes. ✅
Windows runners complete in 9-10 minutes. ⛔️
Why, Windows? WHY?
TS
TS build takes time. It's not terrible though
Windows: Caching and Connection Timeouts
Take a look at a Windows run, which is often around 10 minutes in total. The bulk of the time (4 minutes) is
yarn install
with theyarn build
andyarn test
tieing for 2nd place at 2 minutes.Windows
node_modules
cache is unreliableWe are able to use the GitHub Action
node_modules
cache on Linux. However, last time we tried the Windows cache was unreliable and would often have false negatives when checking if cache needed to be updated -- this led to stalenode_modules
being used, which threw confusing errors (e.g. if a package was added or upgraded, the runner wouldn't be using the latest).However, even without the cache, I was surprised to find out the real problem adding to total time is a connection error.
"There appears to be trouble with your network connection..."
I've watched and timed the installation process, and it turns out a connection error takes 1-2 minutes of time per installation:
You can see it here:
About 3-4 months ago, I spent at least 4 hours attempting to diagnose and resolve this connection error. Unsuccessfully. I determined it was either a bug with Yarn on Windows or it's an issue with GitHub's networking for the Windows runners.
I owe 🍻 to whoever can figure this one out.
The text was updated successfully, but these errors were encountered: