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

Update git in base image to prevent 'The repository will be downloaded using the GitHub REST API' #72

Closed
GabLeRoux opened this issue Feb 7, 2021 · 7 comments

Comments

@GabLeRoux
Copy link
Member

Description

As discussed on Discord;

jonathanperret
Anybody else noticed this message when building on GitHub actions with unityci/editor (using 0.8.0 images)?

Getting Git version info
  Working directory is '/__w/PecoPeco/PecoPeco'
  /usr/bin/git version
  git version 2.17.1
Deleting the contents of '/__w/PecoPeco/PecoPeco'
The repository will be downloaded using the GitHub REST API
To create a local Git repository instead, add Git 2.18 or higher to the PATH

Context

@davidmfinol
Copy link
Member

Would this be fixed by updating to Ubuntu 20.04 for our images?

@GabLeRoux
Copy link
Member Author

GabLeRoux commented Feb 7, 2021

It would, but we used to start with 20.04 as seen here:
1918fe8#diff-b093d34eec92adf6e0cc6e445edb7147ea45d25fb0c98f2f84a60f5aae6f34f7R1

And we had to downgrade since officially supported ubuntu version for Unity is is still 18.04 🤦

ref: * 438d326 - Change to ubuntu 18.04 (#44) (3 months ago)

which solves a nuanced issue with libasound2 and makes our images go back to the officially supported OSes range.

So I'm not sure ubuntu upgrade is the way to go for this.

@bkslasher
Copy link
Contributor

bkslasher commented Feb 7, 2021

And we had to downgrade since officially supported ubuntu version for Unity is is still 18.04 🤦

Just FYI Ubuntu 20 is now officially supported by Unity 2020.2. https://docs.unity3d.com/2020.2/Documentation/Manual/system-requirements.html
Not sure if it's worth maintaining differently built images for different Unity versions though.

@webbertakken
Copy link
Member

Yea it's officially support for the latest unity versions. We tried to go Ubuntu 20.04 but it was creating new bugs for older versions of Unity.

If we have reason to believe that this git error only occurs the latest versions of Unity we might consider creating a second base image for newer versions. Otherwise it will be far simpler to fix the problem across the board, at least for now.

@jonathanperret
Copy link
Contributor

I'm using the latest LTS (long term support) version of Unity which is currently 2019.4.19f1. If this version is only supported on Ubuntu 18.04 I think that should remain the base image.

Here's what I'm doing at the start of my job to update the Git version :

apt-get -qq update && apt-get -qq -o=Dpkg::Use-Pty=0 --no-install-recommends install gnupg1

echo 'deb http://ppa.launchpad.net/git-core/ppa/ubuntu bionic main' > /etc/apt/sources.list.d/git.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E1DD270288B4E6030699E45FA1715D88E1DF1F24

apt-get -qq update && apt-get -qq -o=Dpkg::Use-Pty=0 --no-install-recommends git

The more conventional way to add a PPA is to install software-properties-common and use its add-apt-repository script but I felt it added to much bloat so I just added the minimum necessary to install the additional Git PPA.

One more note: the warning about Git 2.17 only appears if you run the @actions/checkout action in the unityci/editor image. This happens for me because I added container: { image: unityci/editor:2019.4.19f1 } at the job level, for simplicity, so all of my job's steps run under the unityci/editor image. I guess if you only use the Docker image through actions such as https://github.com/marketplace/actions/unity-builder , the @actions/checkout action will run on the host and probably have a recent enough Git version.

@webbertakken
Copy link
Member

Thanks for adding the additional information. I was wondering where the whole GitHub Rest API magic came from :)

In light of this information I would argue that the change should be out of scope for now. As it is indeed not necessary for any of the workflows in the documentation. Adding the latest git above the OSes stability level could technically cause other problems on the way.

Let me know if this would be an acceptable outcome.

@jonathanperret
Copy link
Contributor

That's fine by me, as mentioned I already know how to update Git in the container. 👍

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

No branches or pull requests

5 participants