Skip to content
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

Some files get pulled from wrong commit #38

Closed
sbaranov opened this issue Aug 16, 2018 · 4 comments
Closed

Some files get pulled from wrong commit #38

sbaranov opened this issue Aug 16, 2018 · 4 comments
Assignees
Labels

Comments

@sbaranov
Copy link

https://cirrus-ci.com/task/6596254498816000

This log shows failure related to 'compilationTraceFilePath' code that was NOT in associated commit:
flutter/flutter@393f927

The 'compilationTraceFilePath' code was introduced in a later commit:
flutter/flutter@2c0329a

Moreover, it seems that only one file (gradle.dart) from the later commit got pulled into the earlier run, otherwise this log would be showing more of similar errors.

P.S. I guess I could imagine a problem with the specific build task itself that it always pulls certain file(s) from HEAD regardless of what Cirrus tell it to? I don't know enough about Cirrus yet to tell if something like this would be possible.

@fkorotkov
Copy link
Contributor

Weird. Logs for clone command clearly indicates that the right SHA was cloned. It cloned a newer SHA but then hard reseted to the right one. Cirrus CI is using go-git for cloning purpose. go-git is pretty sophisticated and widely used. I will try to reproduce the issue.

@fkorotkov fkorotkov added the bug label Aug 16, 2018
@fkorotkov fkorotkov self-assigned this Aug 16, 2018
@fkorotkov
Copy link
Contributor

@sbaranov I was able to reproduce the failure on my fork but I also added git status in git_fetch_script and it showed:

git status
On branch master
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
nothing to commit, working tree clean

So seems Cirrus Agent cloned and reseted the repository correctly. Now I wonder if Flutter's setup scripts accidentally do git pull but I don't know these scripts good enough. Maybe @gspencergoog can help?

Just a little bit more details for @gspencergoog: there were two merges to master within 3 minutes. So when Windows Containers from the first commit finally started the second commit was already on master, so Cirrus CI Agent cloned the latest master and hard reseted to the first SHA. But according to the logs from @sbaranov some of the files remained from the later commit.

@fkorotkov
Copy link
Contributor

My fix for the edge case got merged and Cirrus CI agent got also updated. There was a bug in respecting .gitignore. The issue should be fixed now.

Thanks for reporting!

@gspencergoog
Copy link
Contributor

Sorry, I didn't see this sooner: I'm pretty sure we don't do any "pull". The only thing we do is to call 'git fetch' to set the FETCH_HEAD, but there are no resets, merges, rebases, or pulls anywhere in our setup code (that I can find, or know of).

Sounds like you found something that may have caused the problem, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants