Closed gaaclarke closed 3 years ago
The image being used is big-sur-xcode-12.4
https://github.com/flutter/packages/blob/8da24ab81e3354fc973ba6f319d9e2dfff27bc10/.cirrus.yml#L93
That hasn't changed recently and should have Android Studio (and by extension Java) installed.
cc @fkorotkov
It does have in on the PATH. Maybe your tests using a custom PATH?
It does have a custom PATH, but it references the existing PATH:
task:
name: local_tests
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
image: big-sur-xcode-12.4
env:
PATH: $PATH:/usr/local/bin
matrix:
CHANNEL: "master"
CHANNEL: "stable"
<< : *FLUTTER_UPGRADE_TEMPLATE
clang_format_setup_script:
- brew install clang-format
build_script:
- ./script/local_tests.sh
None of that has changed for us in the past 5 months. I was out for vacation 2 weeks and when I came back it was failing if that's any clue. I don't think anything else could have broken it other than some change to that yaml file.
I guess any script between Cirrus and my script could be messing up the PATH, it seems like Cirrus should be good based on the test. Let me dig deeper.
Java is being used successfully somewhere else from PATH, like here: https://github.com/gaaclarke/packages/blob/4d5e1d8f0766a62ccac1f8f6f609f3d0ef1ec2b4/packages/pigeon/run_tests.sh#L155:L155
This appears to be a bug with flutter format
's ability to find java.
As of 2.4.0-0.0.pre flutter format
is pretty much directly just calling dart format
https://github.com/flutter/flutter/pull/84273. The last master local_tests
successful run was well past that on d3c3b891c9 https://cirrus-ci.com/task/5517917665099776?logs=upgrade_flutter#L535.
Thanks @jmagman. That means the bug is probably in flutter_plugin_tools
. The call to flutter format
before the error is probably a red herring.
Thanks @jmagman. That means the bug is probably in
flutter_plugin_tools
. The call toflutter format
before the error is probably a red herring.
That message is definitely from flutter_plugin_tools; I added it recently.
It's printed if java --version
either fails to run at all, or exits with something other than 0. Perhaps that version of java
doesn't handle --version
, only -version
? It works for me locally, but I have a totally different version of Java than what that bot is showing. I can do some debugging tomorrow morning.
Hm, something else is going on here as well though. I added that more recently than the last time I rolled the flutter/packages tool pin. Your run shows Activated flutter_plugin_tools 0.1.4.
, but that error message didn't exist until 0.4.0.
@gaaclarke The fact that this broke out of band is a bug in Pigeon:
This makes that test script behave unpredictably in the face of breaking changes in flutter_plugin_tools
. All the other uses are pinned so this kind of thing doesn't happen, and would instead show up in a PR to update the tool pin.
Perhaps that version of
java
doesn't handle--version
, only-version
?
This is indeed the problem.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
example failure: https://github.com/flutter/packages/pull/398/checks?check_run_id=3107661154
cc @stuartmorgan