Skip to content

Make health checks runnable locally#390

Merged
mosuem merged 11 commits into
mainfrom
makeRunnableLocally
Feb 2, 2026
Merged

Make health checks runnable locally#390
mosuem merged 11 commits into
mainfrom
makeRunnableLocally

Conversation

@mosuem
Copy link
Copy Markdown
Member

@mosuem mosuem commented Jan 30, 2026

Fixes #379, or at least tries to go there. Still plenty of room for improvement, but a good start.

TODOs for future PRs:

  • The list of files should be obtained by diffing the current git branch to the main branch instead of using all files as done right now.
  • The user should be allowed to specify more output formats.

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.

@mosuem mosuem requested a review from sigurdm January 30, 2026 16:30
@github-actions github-actions Bot added package:firehose type-infra A repository infrastructure change or enhancement labels Jan 30, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 30, 2026

PR Health

License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

This check can be disabled by tagging the PR with skip-license-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
firehose None 0.11.0 0.13.0 0.11.0 ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

Unused Dependencies ✔️
Package Status
firehose ✔️ All dependencies utilized correctly.

For details on how to fix these, see dependency_validator.

This check can be disabled by tagging the PR with skip-unused-dependencies-check.

Coverage ✔️
File Coverage
pkgs/firehose/lib/src/health/coverage.dart 💚 77 %
pkgs/firehose/lib/src/health/health.dart 💚 93 %
pkgs/firehose/lib/src/local_github_api.dart 💚 46 %

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check.

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

if (hasTests) {
print('''
Get coverage for ${package.name} by running coverage in ${package.directory.path}''');
final coverageDir =
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid cluttering the users directory with folders - we didn't care about that when this only ran in CI

FileStatus.added, Directory.current),
)
.toList();
githubApi = LocalGithubApi(prLabels: [], files: files);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, we can add more configurability to this.


const apiToolHash = '8654b768219d5707cdade72fdd80cf915e9d46b8';
// ignore: constant_identifier_names
const dart_apitoolHash = '906fa0f3dca24d81d1c26ee71c884ecbb6234ecf';
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating after a small bug fix bmw-tech/dart_apitool#254

explanation: versionMap['explanation'].toString(),
);
} else {
log('Report was not created for $package at $reportPath');
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to make sure that errors are nicely surfaced.

Comment thread pkgs/firehose/README.md

To run the health workflow locally, simply run
```
dart pub global activate --source git https://github.com/dart-lang/ecosystem --git-path pkgs/firehose/
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully soon this will be:

dart run 'firehose@{git: {url: https://github.com/dart-lang/ecosystem, path: pkgs/firehose}}'

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as there is a good help page shown when I have a typo (which I will have ;) )

@mosuem mosuem requested a review from sigurdm February 2, 2026 14:13
Copy link
Copy Markdown

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT
Would it make sense to publish this on pub, and recommend it as a dev-dependency?

@mosuem
Copy link
Copy Markdown
Member Author

mosuem commented Feb 2, 2026

We used to publish it, but stopped at some point because there was no use. We can start publishing again.

@mosuem mosuem merged commit 08eb60a into main Feb 2, 2026
15 checks passed
@mosuem mosuem deleted the makeRunnableLocally branch February 2, 2026 14:19
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 2, 2026

Package publishing

Package Version Status Publish tag (post-merge)
package:dart_flutter_team_lints 3.6.0-wip WIP (no publish necessary)
package:firehose 0.13.0 ready to publish firehose-v0.13.0

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package:firehose skip-do-not-submit-check type-infra A repository infrastructure change or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[infra] Migrate some health checks to tool/ci.dart

2 participants