Is building more involved than 'make build' (or: why is my custom build broken?) #61

Closed
opened 2023-07-19 17:34:06 +00:00 by fasterthanlime · 7 comments

I checked out this commit: 35f432bd64 and built it locally with make build on linux-amd64.

This gave me a ~17MB executable. When I use that one instead of one of the official 2.3.0 artifacts (from https://code.forgejo.org/forgejo/runner/releases/tag/v2.3.0) my job fails to even checkout the code.

Attached are two job logs:

  • rust-check-77.log is with the official v2.3.0 artifact, and checks out the code properly (the job fails for unrelated reasons)
  • rust-check-88.log is with my own build, which fails to even check out the code
I checked out this commit: https://code.forgejo.org/forgejo/runner/commit/35f432bd649386401067cb2c0393672077b1c003 and built it locally with `make build` on linux-amd64. This gave me a ~17MB executable. When I use that one instead of one of the official 2.3.0 artifacts (from https://code.forgejo.org/forgejo/runner/releases/tag/v2.3.0) my job fails to even checkout the code. Attached are two job logs: * rust-check-77.log is with the official v2.3.0 artifact, and checks out the code properly (the job fails for unrelated reasons) * rust-check-88.log is with my own build, which fails to even check out the code
Member

Can you try to clear your cache rm -fr /home/forgejo-runner/.cache/act? It would help to read the workflow that failed.

There is nothing more complicated to do than what you did.

Can you try to clear your cache `rm -fr /home/forgejo-runner/.cache/act`? It would help to read the workflow that failed. There is nothing more complicated to do than what you did.
Author

Nevermind, the problem was I was building with go 1.20.6 which broke the docker package because of a backported fix re: host sanitization.

cf. https://github.com/nektos/act/issues/1908 if you're curious.

Nevermind, the problem was I was building with go 1.20.6 which broke the docker package because of a backported fix re: host sanitization. cf. https://github.com/nektos/act/issues/1908 if you're curious.
Member

Thanks for the update. This 1.20.6 broke things in an interesting way but I would have not figured out that was the issue here.

Thanks for the update. This 1.20.6 broke things in an interesting way but I would have not figured out that was the issue here.
Author

Thanks for the update. This 1.20.6 broke things in an interesting way but I would have not figured out that was the issue here.

It took me several days too!

Adding extra logging to "act" ended up printing "http: invalid Host header", and from there a quick google search led me to that act issue. Upgrading to a docker/docker pre-version fixes the issue (even on go 1.20.6).

> Thanks for the update. This 1.20.6 broke things in an interesting way but I would have not figured out that was the issue here. It took me several days too! Adding extra logging to "act" ended up printing "http: invalid Host header", and from there a quick google search led me to that act issue. Upgrading to a docker/docker pre-version fixes the issue (even on go 1.20.6).

I'm still getting the failed to attach to exec: http: invalid Host header error, even when using the latest commit (ab564ca25dd631f40c2a64e68509b72b4ff18b86).

However, when using the gitea-runner 0.2.5 it works without any problems.

I'm not sure if this is related to Alpine Linux, but according to the aports, the docker version (Docker version 24.0.5, build ced099660009713e0e845eeb754e6050dbaa45d0) was patched.

(I used the same build process, and the same workflow for the forgejo and gitea runner)

I'm still getting the `failed to attach to exec: http: invalid Host header` error, even when using the latest commit (`ab564ca25dd631f40c2a64e68509b72b4ff18b86`). However, when using the [gitea-runner 0.2.5](https://gitea.com/gitea/act_runner/releases/tag/v0.2.5) it works without any problems. I'm not sure if this is related to Alpine Linux, but according to the aports, the docker version (`Docker version 24.0.5, build ced099660009713e0e845eeb754e6050dbaa45d0`) was patched. (I used the same build process, and the same workflow for the forgejo and gitea runner)
Member

That's unfortunate. Could you open a separate issue for that?

That's unfortunate. Could you open a separate issue for that?

I just realized that I wasn't using the correct version label (I packaged the version as 2.3.0 but later renamed it to 0.2.3 which is why the package didn't update itself)

It appears to be working with the latest commit now.
Not sure if this is what fixed it, or if rebuilding it in a different folder solved it.

I just realized that I wasn't using the correct version label (I packaged the version as 2.3.0 but later renamed it to 0.2.3 which is why the package didn't update itself) It appears to be working with the latest commit now. Not sure if this is what fixed it, or if rebuilding it in a different folder solved it.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: forgejo/runner#61
No description provided.