Code Monkey home page Code Monkey logo

checkout-test's Introduction

checkout-test

This repo is minimal test to show that actions/[email protected] introduces a new requirement on consumers to use either a newer version of git or a newer version of other dependencies that need to handle the repositoryformatversion value of 1 in the .git directory.

The difference between actions/[email protected] and actions/[email protected] is that sparse-checkout is disabled explicitly, which depending on the version of git being used, results in a repositoryformatversion value of 1 being written to the .git directory for older versions and a value of 0 for newer versions. What exact git version boundary this change occurs at is not clear. The following table shows the combinations of software and their results:

actions/checkout git repositoryformatversion Test
v4.1.1 2.34.1 0 ✔️ https://github.com/hicksjacobp/checkout-test/actions/runs/8848651950/job/24298891141
v4.1.4 2.34.1 1 https://github.com/hicksjacobp/checkout-test/actions/runs/8848651950/job/24298890845
v4.1.4 2.43.2 0 ✔️ https://github.com/hicksjacobp/checkout-test/actions/runs/8848651950/job/24298890623

The scenario of actions/[email protected] and [email protected] is what has caused us unforeseen pain. This scenario is exacerbated by the fact that actions/[email protected] comes with [email protected] and the default CodeQL workflow uses actions/checkout@v4 (and therefore resolves to actions/[email protected] as of the time of writing). Performing an apt-get install git does NOT update git to a newer version because the base and ancestor images which actions/runner is based off of does not use the apt feed which has newer versions of git, and is rather left behind at 2.34.1.

Resolutions

Update git

In order to update git to newer versions, in Ubuntu at least, you have to perform at least these steps:

apt update
apt install software-properties-common
add-apt-repository -y ppa:git-core/ppa
apt install git

See https://git-scm.com/download/linux for reference.

Tip

Do this in actions/runner?

Update dependencies to handle repositoryformatversion of 1

Personally, I found this issue through referencing [email protected]. With .NET SDK 8, there is now a [email protected] package (along with the transitive dependency which can now handle the repositoryformatversion of 1). See dotnet/sourcelink#772.

Downgrade actions/checkout to v4.1.1

Warning

This may not be possible for your situation, for example using the default CodeQL setup and using a CI infrastructure where updating git has not yet been done and is out of your control.

References

checkout-test's People

Contributors

hicksjacobp avatar

Watchers

 avatar

Forkers

jww3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.