Thanks to visit codestin.com
Credit goes to github.com

Skip to content

flutter_plugins analyze fails with ProcessException: fatal: Not a valid object name FETCH_HEAD #89805

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

Closed
jmagman opened this issue Sep 9, 2021 · 6 comments · Fixed by #89856
Assignees
Labels
P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels.

Comments

@jmagman
Copy link
Member

jmagman commented Sep 9, 2021

$ SHARD=flutter_plugins SUBSHARD=analyze  dart dev/bots/test.dart
Fetching dependencies...
--packages-for-branch: running on changed packages
Unhandled exception:
ProcessException: fatal: Not a valid object name FETCH_HEAD
  Command: git merge-base FETCH_HEAD HEAD
#0      _throwIfProcessFailed (package:git/src/top_level.dart:39:5)
#1      runGit (package:git/src/top_level.dart:17:5)
<asynchronous suspension>
#2      GitVersionFinder.getBaseSha (package:flutter_plugin_tools/src/common/git_version_finder.dart:77:30)
<asynchronous suspension>
#3      PluginCommand._getAllPackages (package:flutter_plugin_tools/src/common/plugin_command.dart:317:30)
<asynchronous suspension>
#4      Stream.toList.<anonymous closure> (dart:async/stream.dart)
<asynchronous suspension>

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8836524695632600385/+/u/run_test.dart_for_flutter_plugins_shard_and_subshard_analyze/test_stdout

@jmagman jmagman added plugin P0 Critical issues such as a build break or regression labels Sep 9, 2021
@jmagman
Copy link
Member Author

jmagman commented Sep 9, 2021

/cc @stuartmorgan flutter/plugins#4303

Picked up with roll #89803.

@jmagman
Copy link
Member Author

jmagman commented Sep 10, 2021

Turned the test off, reducing priority.

@jmagman jmagman added P1 High-priority issues at the top of the work list and removed P0 Critical issues such as a build break or regression labels Sep 10, 2021
@stuartmorgan-g stuartmorgan-g self-assigned this Sep 10, 2021
@stuartmorgan-g
Copy link
Contributor

I suspect this was an infrastructure change since I don't think we've changed anything about how we are using FETCH_HEAD recently (I thought this might be due to my recent refactoring, but I don't think that should have changed this). But it's probably better to just always do the full analysis re-run when rolling into flutter/flutter rather than doing the PR-style incremental run anyway, so I'll re-write the test.

@stuartmorgan-g
Copy link
Contributor

(Although my refactor is in that delta, so maybe I'm missing a side-effect.)

@stuartmorgan-g
Copy link
Contributor

Oh, it was me. I missed that
BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}"
(which I removed) was using an existing BRANCH_NAME if it was already set. Which our CI never does, but flutter/flutter did.

I still think moving off of tool_runner.sh is the better option though, since having external uses of tool_runner,sh that don't match the repo uses is, as demonstrated by my mistake, fragile.

stuartmorgan-g added a commit to stuartmorgan-g/flutter that referenced this issue Sep 10, 2021
Updates the test to use the repository tooling directly rather than
using tool_runner.sh in a way that flutter/plugins never calls it (and
thus was broken accidentally), and re-enaables it.

Using tool_runner.sh used to be necessary since there was non-trivial
logic in it, but that's no longer the case.

Fixes flutter#89805
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants