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

Build failure on v1.16.5 - inconsistent vendoring #19196

Closed
MPeti1 opened this issue Mar 24, 2022 · 8 comments
Closed

Build failure on v1.16.5 - inconsistent vendoring #19196

MPeti1 opened this issue Mar 24, 2022 · 8 comments

Comments

@MPeti1
Copy link

MPeti1 commented Mar 24, 2022

Description

While building the Docker.rootless image I receive a go build error.

#12136 and #12080 seem to be similar, but they are closed with a fix and were reported for earlier versions.
The last version that I successfully built is 1.15.4. I don't know if versions between that and 1.16.5 are affected.

This is an issue with the build process.
I've included the logs of the (failing) 5th build step in the log gist.

Gitea Version

v1.16.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/MPeti1/818df081a1e1089497237d8d30b5f6f4

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

I'm selfbuilding Gitea based on the Dockerfile.rootless file, with the following command:

sudo docker buildx build --platform linux/arm/v7 . --output=type=docker,dest=./gitea_1.16.5_img.tar --build-arg GITEA_VERSION=v1.16.5 --file Dockerfile.rootless

Database

No response

@wxiaoguang
Copy link
Contributor

The vendor directory has been dropped since 1.16

@MPeti1
Copy link
Author

MPeti1 commented Mar 24, 2022

Thanks for letting me know, but what causes the error?

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Mar 24, 2022

Maybe delete your local vendor directory and run go mod tidy && go mod vendor

@MPeti1
Copy link
Author

MPeti1 commented Mar 24, 2022

Probably I'm misunderstanding something, but where do I run the go commands?
As far as I know, everything is done by docker buildx in a temporary container with armv7 emulation

@wxiaoguang
Copy link
Contributor

Do you have a vendor directory locally now? If yes, could you try to delete it?

@MPeti1
Copy link
Author

MPeti1 commented Mar 24, 2022

It looks like retrying enough somehow solved the issue, but it might have been something else happening too.

First I checked with git status if there are additional files in the cloned repo's directory, and from the files and dirs it listed as untracked I deleted everything except my wrapper script for the docker buildx command. This alone didn't help.
Then I updated my system (I only use this VM for building Gitea and for a few other things, and I regularly restore it to an older snapshot), retried building 1.16.5 without success, tried if I could still build 1.15.4, and after I've seen that the build process didn't stop at step 5 for that version, retried building 1.16.5 and now it didn't error out, and eventually it successfully built the docker image.

then I restored my said snapshot that has an older docker version (so I may be able to figure out what was wrong), retried building 1.16.5 the same way as I tried for the very first time, and now it works instantly.. even though I still have a vendor directory in the directory where I cloned the gitea repo.

I don't know what went wrong for the first few times, but it looks like the problem has gone away.
Sorry for the noise!

@wxiaoguang
Copy link
Contributor

even though I still have a vendor directory in the directory where I cloned the gitea repo.

Because this time, the vendor has been synced.

@MPeti1
Copy link
Author

MPeti1 commented Mar 24, 2022

Oh, I see it now.

I've just went through the changelogs on github, and I've found this is in the blog post of the update.

@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants