Uh oh!
There was an error while loading. Please reload this page.
build: try to speed up Github workflows - #12090
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@## master #12090 +/- ##
==========================================
- Coverage 67.14% 59.22% -7.93%
==========================================
Files 1002 951 -51 Lines 49300 46658 -2642 Branches 5010 4312 -698 ==========================================
- Hits 33103 27633 -5470 - Misses 16072 19025 +2953 + Partials 125 0 -125
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
16a2754 to
c6ddbbfCompare03494b0 to
1c4aba0Compare1c4aba0 to
3ca6ea6Comparee8faa48 to
98e3922Compare35c8d68 to
29df9f4CompareAdd a script to cancel previous GitHub workflows and optimize the workflows in hope to speed up CI. - Skip dependabot for python jobs - Merge Prefer TypeScript and License Check - Cancel all tests in one workflow
29df9f4 to
85993fdCompare| continue-on-error: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: |
There was a problem hiding this comment.
This check is essentially useless since the comments will never work for PRs coming from forks (due to the GITHUB_TOKEN access). This would be a good candidate to port over to the workflow_run approach mentioned in https://securitylab.github.com/research/github-actions-preventing-pwn-requests. Obviously, out of scope for this PR
villebro
left a comment
There was a problem hiding this comment.
A few non-blocking comments, LGTM.
| from typing import Iterable, List, Optional, Union | ||
| import click | ||
| import requests |
There was a problem hiding this comment.
Whenever possible, we should probably try to use urllib3 over requests to avoid licensing issues.
There was a problem hiding this comment.
Isn't it using Apache 2.0 License as well?
There was a problem hiding this comment.
Oh wow, they've apparently relicensed. There was a refactor effort some time ago to remove explicit dependency on requests as it wasn't Apache compatible back then (see #7643). Good to know.
There was a problem hiding this comment.
Hmm, I can't find any reference of it ever having been anything but Apache 2.0. Apparently I'm misremembering something or this has been a major misunderstanding.
There was a problem hiding this comment.
I couldn't let this one go.. 😄 I read old mailing list archives and turned up this: https://lists.apache.org/thread.html/49c4d03d3aadab5c2d1c20ccf1cb7ca02edbc94961e6429dbf6a082b%40%3Cdev.superset.apache.org%3E Turns out requests was pulling in chardet which is LGPL, which was the problem. Turns out chardet was dropped as of 09/2020: encode/httpx#1269 🎉
There was a problem hiding this comment.
So it means it's OK to use requests again, I guess?
There was a problem hiding this comment.
Uhh, I went down a link in this issue without noticing that it was pointing to another project: psf/requests#4848 Apparently requests still uses chardet, and there are no plans to remove it. As long as this is the case we're not allowed to reference requests as a required dependency, but it's ok to be had as an optional dependency. As long as we restrict the usage to development scripts we're fine, but we shouldn't use it in the core code.
There was a problem hiding this comment.
Got it. Thanks for the clarification and investigation!
| @@ -0,0 +1,141 @@ | |||
| # Python MySQL unit tests | |||
There was a problem hiding this comment.
I'm mostly indifferent to having these split up versus all in one file, but I'd like to avoid shuffling these around unnecessarily to avoid losing the git history.
There was a problem hiding this comment.
There was a hypothesis that there are overheads involved in scheduling multiple workflows vs running them in one. Not sure how much it helps but I still think it makes sense to combine these three considering they are very similar in nature and not particularly expensive to run.
SUMMARY
CI has been slow recently. This PR is the latest effort in trying to mitigate:
Update the Cancel Previous Run job added in build: cancel previous github action runs #11940 to cancel future jobs as well.
Skip dependabot branches when possible (e.g. don't run Python jobs for npm updates).
Merge lighter actions (Prefer Typescript and License Check) into one workflow (there are overheads in starting a job).
Add a script to allow committers to manually cancel CI jobs in queue. This is useful on a busy day when the CI pipeline got clogged by continuous new commits to open PRs. Users have to configure
GITHUB_TOKENin their env variables in order to use this.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TEST PLAN
Test locally and CI
ADDITIONAL INFORMATION