Repository navigation
Gold flake: user does not have permission to list objects #49917
Copy link
Copy link
Closed
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passTests that sometimes, but not always, incorrectly passdependency: skiaSkia team may need to help usSkia team may need to help usframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-infraOwned by Infrastructure teamOwned by Infrastructure teamwaiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
02:51 +1116 ~1: /tmp/flutter sdk/packages/flutter/test/material/radio_test.dart: Radio ink ripple is displayed correctly
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following _Exception was thrown while running async test code:
Exception: Unexpected Gold tryjobAdd failure.
Tryjob execution for golden file test material.radio.ink_ripple.png failed for
a reason unrelated to pixel comparison.
Debug information for Gold:
stdout: Given image with hash 2887f99f7ebb5fda0580e7a4afa32f21 for test material.radio.ink_ripple
Expectation for test: 2887f99f7ebb5fda0580e7a4afa32f21 (positive)
Expectation for test: e0700bcc1503b6e84be54f433dea6ae9 (positive)
stderr: ERROR: logging before flag.Parse: I0131 21:03:52.169569 7736 exec.go:221] exec.go:221
Executing 'gsutil cp /tmp/flutter
sdk/bin/cache/pkg/skia_goldens7708/packages/flutter/test/material/temp/dm.json
gs://skia-gold-flutter/trybot/dm-json-v1/2020/01/31/21/f202972e4b8e923e0c9b938943bb8545c2cc54b9/6530858593026048/1580504632/dm-1580504632169051403.json'
(where gsutil is /usr/bin/gsutil)
Error running command: ''Error uploading JSON file to GCS path
skia-gold-flutter/trybot/dm-json-v1/2020/01/31/21/f202972e4b8e923e0c9b938943bb8545c2cc54b9/6530858593026048/1580504632/dm-1580504632169051403.json:
running gsutil. Got output
AccessDeniedException: 403 [email protected] does not have
storage.objects.list access to skia-gold-flutter.
: Command exited with exit status 1: gsutil cp /tmp/flutter
sdk/bin/cache/pkg/skia_goldens7708/packages/flutter/test/material/temp/dm.json
gs://skia-gold-flutter/trybot/dm-json-v1/2020/01/31/21/f202972e4b8e923e0c9b938943bb8545c2cc54b9/6530858593026048/1580504632/dm-1580504632169051403.json.
At gcs.go:101 gcs.go:77 gcs.go:66 goldclient.go:422 goldclient.go:346 errgroup.go:57
asm_amd64.s:1357. At goldclient.go:423 goldclient.go:346 errgroup.go:57 asm_amd64.s:1357''
When the exception was thrown, this was the stack:
#0 SkiaGoldClient.tryjobAdd (package:flutter_goldens_client/skia_client.dart:371:9)
<asynchronous suspension>
#1 _AuthorizedFlutterPreSubmitComparator.compare (package:flutter_goldens/flutter_goldens.dart:374:23)
<asynchronous suspension>
#2 MatchesGoldenFile.matchAsync.<anonymous closure> (package:flutter_test/src/_matchers_io.dart:82:57)
<asynchronous suspension>
#3 AutomatedTestWidgetsFlutterBinding.runAsync.<anonymous closure> (package:flutter_test/src/binding.dart:924:22)
#6 AutomatedTestWidgetsFlutterBinding.runAsync (package:flutter_test/src/binding.dart:922:26)
#7 MatchesGoldenFile.matchAsync (package:flutter_test/src/_matchers_io.dart:72:20)
#9 MatchesGoldenFile.matchAsync (package:flutter_test/src/_matchers_io.dart:52:28)
#10 _expect (package:test_api/src/frontend/expect.dart:116:26)
#11 expectLater (package:test_api/src/frontend/expect.dart:75:5)
#12 expectLater (package:flutter_test/src/widget_tester.dart:385:10)
#13 main.<anonymous closure> (file:///tmp/flutter%20sdk/packages/flutter/test/material/radio_test.dart:281:11)
#26 AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1102:17)
#28 AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1090:35)
(elided 31 frames from class _FakeAsync, dart:async, dart:async-patch, and package:stack_trace)
════════════════════════════════════════════════════════════════════════════════════════════════════
02:51 +1116 ~1 -1: /tmp/flutter sdk/packages/flutter/test/material/popup_menu_test.dart: PopupMenu positioning
02:51 +1116 ~1 -1: /tmp/flutter sdk/packages/flutter/test/material/radio_test.dart: Radio ink ripple is displayed correctly [E]
Test failed. See exception logs above.
The test description was: Radio ink ripple is displayed correctly
https://cirrus-ci.com/task/6530858593026048
/cc @Piinks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passTests that sometimes, but not always, incorrectly passdependency: skiaSkia team may need to help usSkia team may need to help usframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-infraOwned by Infrastructure teamOwned by Infrastructure teamwaiting for PR to land (fixed)A fix is in flightA fix is in flight
Activity
Piinks commentedon Jan 31, 2020
cc/ @kjlubick
It looks like it is trying to authenticate with an unknown service account (
[email protected]?). I don't know why it would be doing this. Could Cirrus be providing the wrong service account?I saw this for the first time the other day on #49334. It did not reproduce on that PR or any other.
dnfield commentedon Jan 31, 2020
This was my PR, so it should have had access to whatever encrypted credentials we have.
shihaohong commentedon Jan 31, 2020
This seems to be happening on my most recent PR as well: #49913
Cirrus task that is failing: https://cirrus-ci.com/task/5942114139766784
Piinks commentedon Jan 31, 2020
Yeah, it would say 'ENCRYPTED' if it were a permissions issue, but that service account is not the one associated with Gold. I have no idea where it came from or why it is trying to authenticate with that account. 🤔
dnfield commentedon Feb 1, 2020
https://api.cirrus-ci.com/v1/task/5558371025682432/logs/main.log seems similar
kjlubick commentedon Feb 3, 2020
527266040592-compute might be a default service-account for the project with # 527266040592. Perhaps the logic that loads in the service account to Cirrus needs examination?
For debugging, maybe print out the hash of the service account file and compare good runs to bad runs?
dnfield commentedon Feb 3, 2020
@kjlubick these runs generally succeed on a second try. Cirrus is always giving us the same account. Could this be a quota issue?
kjlubick commentedon Feb 3, 2020
Hang on, I see the error message says goldctl is using gsutil (which is probably using the wrong service account). gsutil is not meant for production usage. Please check that you are properly calling goldctl auth and specifying a service account every time. Otherwise, goldctl falls back to using gsutil.
Piinks commentedon Feb 3, 2020
cc/ @fkorotkov in case this may be a Cirrus issue.
Here's what I can tell thus far
framework_tests-libraries-linuxandframework_tests-widgets-linux_AuthorizedFlutterPreSubmitComparator, which is only used when the service account is available from Cirrus.GOLD_SERVICE_ACCOUNTauth._UnauthorizedFlutterPresubmitComparator(used for empty auth, does not run tryjobs)First,
authis calledgoldctl auth --service-account serviceAccount.json --work-dir $workDirectoryThen
imgtest initfor tryjobFinally
imgtest addto add the tryjobI'll see about adding more logging here if it can be helpful to further diagnose. 🤒 Let me know what ya'll think about where along this path I can get more helpful information.
15 remaining items
dnfield commentedon Feb 4, 2020
There's at least one report of this flake happening after the revert, but it's not super clear to me yet what happened there. Let's keep an eye on it today - if it's still happening we should revert the revert.
Piinks commentedon Feb 4, 2020
Do you have a PR/task/log we can see where it is still happening?
a14n commentedon Feb 4, 2020
https://cirrus-ci.com/task/6059363425058816?command=main#L1268
christopherfujino commentedon Feb 4, 2020
Another instance https://cirrus-ci.com/task/5085804800245760?command=main#L927
Piinks commentedon Feb 4, 2020
Is it possible some reoccurrences could be from branches that need to be updated?
christopherfujino commentedon Feb 4, 2020
@Piinks: I just checked, and both have the reverted version of the dockerfile :/
Piinks commentedon Feb 4, 2020
From this log: https://api.cirrus-ci.com/v1/task/6064140468879360/logs/main.log
It looks like this is happening when
auth_opt.json(created by goldctl during auth) already exists. The SkiaClient checks to see if it is already there so it won't re-authenticate if unnecessary.However, this does not happen every time, as there are other cases where everything seems to be ok:
The
GOLD_SERVICE_ACCOUNTseems to also be ok, confirmed the service account is present with the right information in every test (checked client_email).Piinks commentedon Feb 4, 2020
I think I know what this is now. 🎉
To solve #46687, #47551 added the empty auth option for
goldctlso we could use thecheckfeature. When using empty auth, no tryjobs are run/nothing is done that actually requires authentication.I'm guessing that empty auth would create an auth_opt.json file like the first mentioned above where
GSUtil:trueThese files are all created in randomly generated directories to maintain thread safety.
If they are being cached, which I think they are (the 🐞 ), then future test runs that randomly choose the same directory that need to be authenticated don't because they see that the file is there and assume it's already set up, and therefore end up using gsutil.
kjlubick commentedon Feb 5, 2020
Yep, that sounds like it would be it - I guess the solution is to clean up the temporary Gold folder after you are done?
christopherfujino commentedon Feb 5, 2020
@Piinks thanks for tracking this down and fixing!
github-actions commentedon Aug 13, 2021
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 -vand a minimal reproduction of the issue.