Skip to content

Commit 289fd43

Browse files
authored
firehose: echo any error output from dependencies task on failure (#393)
Also fix flutter install logic Also fix a lint
1 parent 1d2ce83 commit 289fd43

File tree

9 files changed

+17
-15
lines changed

9 files changed

+17
-15
lines changed

.github/workflows/health.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ on:
9393
required: false
9494
flutter_packages:
9595
description: List of packages depending on Flutter.
96-
default: "\"\""
96+
default: ""
9797
required: false
9898
type: string
9999
ignore_license:

.github/workflows/health_base.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ on:
3939
type: boolean
4040
required: false
4141
flutter_packages:
42-
default: '""'
42+
default: ""
4343
required: false
4444
type: string
4545
ignore_license:
@@ -173,7 +173,7 @@ jobs:
173173
${{ fromJSON('{"true":"--coverage_web","false":""}')[inputs.coverage_web] }} \
174174
--fail_on ${{ inputs.fail_on }} \
175175
--warn_on ${{ inputs.warn_on }} \
176-
--flutter_packages ${{ inputs.flutter_packages }} \
176+
--flutter_packages "${{ inputs.flutter_packages }}" \
177177
--ignore_packages ${{ inputs.ignore_packages }} \
178178
--ignore_license ${{ inputs.ignore_license }} \
179179
--ignore_changelog ${{ inputs.ignore_changelog }} \

pkgs/corpus/lib/pub.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ class Pub {
6666

6767
for (;;) {
6868
final targetUri = uri.replace(
69-
queryParameters: {
70-
'q': query,
71-
'page': page.toString(),
72-
if (sort != null) 'sort': sort,
73-
},
69+
queryParameters: {'q': query, 'page': page.toString(), 'sort': ?sort},
7470
);
7571

7672
final map = await _getJson(targetUri);

pkgs/firehose/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.13.2-wip
2+
3+
- Echo any error output from dependencies task on failure
4+
(avoids silent failures).
5+
16
## 0.13.1
27

38
- Fix an issue with a nullable neededVersion

pkgs/firehose/lib/src/health/health.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class Health {
204204
logStdout: false,
205205
);
206206

207-
final (result, _, _) = runDashProcess(
207+
final (result, out, err) = runDashProcess(
208208
flutterPackages,
209209
package,
210210
[
@@ -219,7 +219,8 @@ class Health {
219219

220220
if (result.exitCode != 0) {
221221
hasError = true;
222-
final output = (result.stderr as String).replaceAll('\n', '<br>');
222+
final output = (err.trim().isNotEmpty ? err.trim() : out.trim())
223+
.replaceAll('\n', '<br>');
223224
results.add('''
224225
| ${package.name} | <details><summary>:exclamation: Show Issues</summary><pre>$output</pre></details> |''');
225226
} else {

pkgs/firehose/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: firehose
22
description: A tool to automate publishing of Pub packages from GitHub actions.
3-
version: 0.13.1
3+
version: 0.13.2-wip
44
repository: https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose
55

66
environment:

pkgs/firehose/test_data/golden/comment_unused-dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| :--- | :--- |
88
| package1 | :heavy_check_mark: All dependencies utilized correctly. |
99
| package2 | :heavy_check_mark: All dependencies utilized correctly. |
10-
| package5 | <details><summary>:exclamation: Show Issues</summary><pre>These packages may be unused, or you may be using assets from these packages:<br> * lints<br></pre></details> |
10+
| package5 | <details><summary>:exclamation: Show Issues</summary><pre>These packages may be unused, or you may be using assets from these packages:<br> * lints</pre></details> |
1111

1212
For details on how to fix these, see [dependency_validator](https://pub.dev/packages/dependency_validator).
1313

pkgs/firehose/test_data/golden/comment_unused-dependencies_healthchanged.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
| package1 | :heavy_check_mark: All dependencies utilized correctly. |
99
| package2 | :heavy_check_mark: All dependencies utilized correctly. |
1010
| package3 | :heavy_check_mark: All dependencies utilized correctly. |
11-
| package4 | <details><summary>:exclamation: Show Issues</summary><pre>These packages may be unused, or you may be using assets from these packages:<br> * http<br> * intl<br> * lints<br> * path<br></pre></details> |
12-
| package5 | <details><summary>:exclamation: Show Issues</summary><pre>These packages may be unused, or you may be using assets from these packages:<br> * lints<br></pre></details> |
11+
| package4 | <details><summary>:exclamation: Show Issues</summary><pre>These packages may be unused, or you may be using assets from these packages:<br> * http<br> * intl<br> * lints<br> * path</pre></details> |
12+
| package5 | <details><summary>:exclamation: Show Issues</summary><pre>These packages may be unused, or you may be using assets from these packages:<br> * lints</pre></details> |
1313

1414
For details on how to fix these, see [dependency_validator](https://pub.dev/packages/dependency_validator).
1515

pkgs/firehose/test_data/golden/comment_unused-dependencies_ignore_package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| Package | Status |
77
| :--- | :--- |
88
| package2 | :heavy_check_mark: All dependencies utilized correctly. |
9-
| package5 | <details><summary>:exclamation: Show Issues</summary><pre>These packages may be unused, or you may be using assets from these packages:<br> * lints<br></pre></details> |
9+
| package5 | <details><summary>:exclamation: Show Issues</summary><pre>These packages may be unused, or you may be using assets from these packages:<br> * lints</pre></details> |
1010

1111
For details on how to fix these, see [dependency_validator](https://pub.dev/packages/dependency_validator).
1212

0 commit comments

Comments
 (0)