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

github actions: consider using checkout@v2 #2683

Closed
dhalbert opened this issue Mar 6, 2020 · 3 comments
Closed

github actions: consider using checkout@v2 #2683

dhalbert opened this issue Mar 6, 2020 · 3 comments

Comments

@dhalbert
Copy link
Collaborator

dhalbert commented Mar 6, 2020

I am running into issues with PR #2666, which is repeatedly failing job re-runs due to "reference is not a tree" errors, even after merging from upstream. This is discussed in actions/checkout#23, which seems to indicate that we should upgrade to checkout@v2. I will try that in #2666.

@dhalbert dhalbert added this to the 5.x.x - Bug Fixes milestone Mar 6, 2020
@dhalbert
Copy link
Collaborator Author

dhalbert commented Mar 6, 2020

Oh blah, submodules: true is not supported in checkout@v2 yet. It's just being tested now: actions/checkout#176. Reverting try in #2666 (which maybe just might fix my own build problems).

We should try this again after actions/checkout#176 succeeds.

@dhalbert
Copy link
Collaborator Author

dhalbert commented Mar 6, 2020

Note also that checkout@v2 by default does a --depth 1 clone, which doesn't work for us, because we use the nearest tag for version information.

To do a full clone, you do:

with:
  fetch-depth: 0

Alternatively, to make sure all the tags are fetched, see https://github.com/actions/checkout/blob/master/README.md#fetch-all-tags. I think that might work and still avoid fetching some of the history.

I spent some time researching whether one could do a shallow clone and then fetch only the tag information, but that's not really how git works.

Another possibility might be to have an initial job before all the board builds that does a complete clone and figures out the version info, and then passes that to the board builds, I guess in an environemtn variable. If they can't find a tag, they would use the info in the env var. That would save some clone time in the board jobs. But I don't think the clone time is all that significant compared to the actual build, so it's not clear it's worth the effort.

@dhalbert dhalbert changed the title github actions "reference is not a tree" github actions: consider using checkout @v2 Mar 6, 2020
@dhalbert dhalbert changed the title github actions: consider using checkout @v2 github actions: consider using checkout@v2 Mar 6, 2020
@dhalbert dhalbert linked a pull request Mar 18, 2020 that will close this issue
@dhalbert
Copy link
Collaborator Author

Fixed by #2765.

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

Successfully merging a pull request may close this issue.

1 participant