teamhephy / builder

MIT License
3 stars 12 forks source link

Go mod init #73

Open kingdonb opened 2 years ago

kingdonb commented 2 years ago

It looks like upgrading to the latest hephy/go-dev image means upgrading to go 1.16, which means using go mod instead of glide, so I went ahead and did that, I think it works 🤞

I will rebase and amend these commits to have proper messages in a bit, I am just trying to get a working builder image out of this right now, since I think there are some mandatory upgrades that we are missing, (and it impacts updates to the Hephy blog, which uses builder buildpacks to deploy Jekyll on Ruby processes)

kingdonb commented 2 years ago

Welp, the issue I was having turned out to be a completely different reason (it helps if you believe the error message when you are reading it and it tells you what the problem is) – my git remote was wrong, which should have been the first thing I had guessed, as it was the last thing I had changed!

No matter, it was time to do these upgrades anyway.

I found a storage issue caused by this change:

$ git push deis main
Enumerating objects: 1661, done.
Counting objects: 100% (1661/1661), done.
Delta compression using up to 8 threads
Compressing objects: 100% (816/816), done.
Writing objects: 100% (1661/1661), 26.08 MiB | 12.33 MiB/s, done.
Total 1661 (delta 808), reused 1648 (delta 800), pack-reused 0
remote: Resolving deltas: 100% (808/808), done.
remote: 2021-12-30 21:15:25.094083 I | Error running git receive hook [uploading /home/git/blog.git/blog.tar.gz to home/blog:git-e83246d3/tar (s3aws: invalid path: home/blog:git-e83246d3/tar)]
To ssh://deis-builder.deis.hephy.pro:2222/blog.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'ssh://deis-builder.deis.hephy.pro:2222/blog.git'

The error was

Error running git receive hook [uploading /home/git/blog.git/blog.tar.gz to home/blog:git-e83246d3/tar (s3aws: invalid path: home/blog:git-e83246d3/tar)]

Either caused by something I changed, or by simply building again, (but as I could not get this to build anymore without changes I basically had no choice but to make them all.)

It works without glide now, at least it seems that way! But there are storage issues, my backend is minio and this new canary release of builder that I'm running is the only thing that changed. I'll work it out, then rebase, clean up my commit messages, and see you on the other side of 2021... 🎉 🌮

kingdonb commented 2 years ago

This is still broken (setting as draft so it does not get merged yet)

kingdonb commented 2 years ago

It looks like the meaning of s3aws: invalid path: home/blog:git-e83246d3/tar) is, it cannot have a colon in the path. I'm going to assume that one of these go mod updates I had to opt into in order to get on a later version of Go and using go mod made colons illegal in s3 paths. I'm not sure what s3aws refers to, as there seem to be several s3-related packages

Screen Shot 2021-12-30 at 5 51 29 PM

We do keep files with a colon in the path. We could pretty easily stop doing that, but it would make a lot of older storage inaccessible to accept this change from upstream. (I don't see how we have a choice, but maybe there's an adapter we can include so we don't have to make a permanently new storage epoch and tell everyone about a breaking change, as this will otherwise break rollbacks for everyone...)