-
Notifications
You must be signed in to change notification settings - Fork 185
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
Merge mono_pkg steps to avoid blocking tests with analyze issues #914
base: master
Are you sure you want to change the base?
Conversation
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
The main reason for this behavior is just to save on CI compute resources - not running the more expensive jobs (tests) when it is known that the overall run will fail anyways. In the days of Travis, we had a limited number of available jobs as a pool for the whole dart-lang org and so this was more important. It is still kind of nice to do just to be a good steward but I do understand that it can also be annoying to not have the tests run sometimes. Ultimately it is up to you. |
Thanks for the background. Since testing packages in this repo are not done by just Secondly, analyze step gets broken by changes outside of this repo, because it uses the latest SDK available, rather than some fixed SDK version specified in the repo. With this PR I want to fix (1), but I think (2) is also worth fixing. (we can still have a separate analyze step with the latest SDK, but it should not be reported as "failure" and it should not block anything) If we fix (2), then (1) becomes less of a problem, but I would argue that it's still a problem and worth fixing, because it costs engineer time when I can't get tests results because e.g. I used single quote instead of double in a string literal. |
Fwiw, there is a
You could consider splitting out analysis into two jobs, one with Presumably most of these failures are just related to info messages not warnings/errors? |
That's great, except I don't think it will work for anyone. Dart 3.3.0 is a supported version, but
It looks like it's looking for the minimum supported SDK version and doesn't test at all if you have another but still supported version. I doubt anyone will contribute patches using SDK 2.19.
Right now a deprecation warning blocks testsing, which we can't really fix, as 3.3.0 doesn't have the replacement for the deprecated member. |
You should add an |
If you were testing on latest stable, it would also run tests though right? It wouldn't be a bad idea to test that as well. But yes this is generally an issue, that it will only run tests that roughly match your actual SDK, because otherwise they might just be invalid. |
Done in #915. |
Not sure if you'd like a review from me here? I'm a little less familiar w/ configuring FWIW, for smaller mono-repos repos (like this one w/ 4 packages), I've gotten pretty far w/ brief, manually written github action configs. They're easy to read + understand for people coming upon them, and straightforward to customize for specific repo / package's needs. |
Just to counterpoint this, mono_repo made the transition from travis ci -> github actions far smoother than it would have been otherwise. So I am a strong proponent of having a layer of abstraction between your actual CI system and how you configure your jobs because of that experience. I would argue for mono_repo even in a single package repo just for that (when we have dozens of repos especially). |
Currently if analyze step fails we don't run tests.
With this we now run tests even when analyze fails.
Analyze step can start to fail without any changes in this repo (e.g. when a new SDK comes with a new deprecation).
However regardless of why analyze fails, it doesn't make sense to stop testing just because there's a warning.