Pipeline: dropNetworking function doesn't compile when building Tekton release

Created on 8 Dec 2020  路  6Comments  路  Source: tektoncd/pipeline

In https://github.com/tektoncd/pipeline/pull/3582 we added a function that has this code:

    cmd.SysProcAttr.GidMappings = []syscall.SysProcIDMap{
        {
            ContainerID: 0,
            HostID:      0,

            //  Map all groups
            Size: 4294967295,
        },

Unfortunately the value for size is too big for some systems! I guess that the machines we build on must use int32 instead of int64? Not sure exactly but long story short @jerop and I tried to make a release today and when ko ran it errored with:

[publish-images : run-ko]2020/12/08 20:23:14 Unexpected error running "go build": exit status 2
[publish-images : run-ko] # github.com/tektoncd/pipeline/cmd/entrypoint
[publish-images : run-ko] cmd/entrypoint/namespaces_linux.go:32:4: constant 4294967295 overflows int
[publish-images : run-ko] cmd/entrypoint/namespaces_linux.go:47:4: constant 4294967295 overflows int

I'm gonna revert this for now until we can fix it, I dunno if we can just cast the value to int64 or if we need to do something to update the images we build on (maybe both)?

At the very least we should know at PR time that this kind of thing is going to fail so maybe in the long run we can invoke the same Task in our end to end tests :S

kinbug

Most helpful comment

Thanks! It looks like this happens because we're cross compiling for 32-bit architectures. We don't currently build that in pre-submit tests. I think that would have to go somewhere in here:
https://github.com/tektoncd/pipeline/blob/master/vendor/github.com/tektoncd/plumbing/scripts/presubmit-tests.sh#L200

All 6 comments

Do you know how this ran? What cluster/task was it in? I'm trying to repro now.

Do you know how this ran? What cluster/task was it in? I'm trying to repro now.

Thanks! It looks like this happens because we're cross compiling for 32-bit architectures. We don't currently build that in pre-submit tests. I think that would have to go somewhere in here:
https://github.com/tektoncd/pipeline/blob/master/vendor/github.com/tektoncd/plumbing/scripts/presubmit-tests.sh#L200

pre-submit check: build: run ko resolve on build presubmit 馃檭 #3621

@bobcatfish shall we close this issue (#3612)

@nikhil-thomas I think we should yes.
/close

@vdemeester: Closing this issue.

In response to this:

@nikhil-thomas I think we should yes.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings