k3s build issues on master


Diego Sueiro
 

Hi Bruce,

Whilst investigating a build problem on our CI related to sstate mirror of the k3s recipe, I found that the commit "k3s: update to 1.23.1" (8cba065209dd668afe939f878da340a017ecdd7d) didn't change the PV and SRCREV_k3s variables correctly.

I changed those values to v1.23.1+k3s1 and 08d538fb3a04a0fe904b34cf04f7e21191b82449 respectively and now I'm getting the following do_compile error:
```
go: inconsistent vendoring in /kas_build_dir/tmp/work/neoversen1-poky-linux/k3s/v1.23.3+k3s1-r0/k3s-v1.23.3+k3s1/src/import:
    github.com/google/cadvisor@...: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
[...]
    k8s.io/sample-controller: is marked as replaced by github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller@... in vendor/modules.txt, but replaced by github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller@... in go.mod

    To ignore the vendor directory, use -mod=readonly or -mod=mod.
    To sync the vendor directory, run:
        go mod vendor
```

Unfortunately, I have zero knowledge in go and I have no idea how I could fix this.


Diego Sueiro
Staff Software Developer – ARM – Automotive and Industrial Solutions (CE-OSS)


Bruce Ashfield
 



On Thu, Mar 31, 2022 at 12:22 PM Diego Sueiro <Diego.Sueiro@...> wrote:
Hi Bruce,

Whilst investigating a build problem on our CI related to sstate mirror of the k3s recipe, I found that the commit "k3s: update to 1.23.1" (8cba065209dd668afe939f878da340a017ecdd7d) didn't change the PV and SRCREV_k3s variables correctly.

I changed those values to v1.23.1+k3s1 and 08d538fb3a04a0fe904b34cf04f7e21191b82449 respectively and now I'm getting the following do_compile error:
```
go: inconsistent vendoring in /kas_build_dir/tmp/work/neoversen1-poky-linux/k3s/v1.23.3+k3s1-r0/k3s-v1.23.3+k3s1/src/import:
    github.com/google/cadvisor@...: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
[...]
    k8s.io/sample-controller: is marked as replaced by github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller@... in vendor/modules.txt, but replaced by github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller@... in go.mod

    To ignore the vendor directory, use -mod=readonly or -mod=mod.
    To sync the vendor directory, run:
        go mod vendor
```


The short log is wrong, the SRCREV and PV are correct. There's some fundamental issues with 1.23.x that prevented it from building inside or outside of bitbake, so I scaled back the version bump at the last minute to stay in 1.22.x series.

And yes, there's no more vendoring in k3s, so you can't just bump the SRCREV and PV, we have to adjust all of the git clones and shuffling to make it build.

I have some more changes to that recipe pending, so I'll do a minor cleanup, with a shortlog that makes things clear.

Cheers,

Bruce

 
Unfortunately, I have zero knowledge in go and I have no idea how I could fix this. 

Diego Sueiro
Staff Software Developer – ARM – Automotive and Industrial Solutions (CE-OSS)



--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


Diego Sueiro
 

Hi Bruce,

From: Bruce Ashfield <bruce.ashfield@...>
Sent: 31 March 2022 17:38
To: Diego Sueiro <Diego.Sueiro@...>
Cc: meta-virtualization@... <meta-virtualization@...>; nd <nd@...>
Subject: Re: k3s build issues on master
 


On Thu, Mar 31, 2022 at 12:22 PM Diego Sueiro <Diego.Sueiro@...> wrote:
Hi Bruce,

Whilst investigating a build problem on our CI related to sstate mirror of the k3s recipe, I found that the commit "k3s: update to 1.23.1" (8cba065209dd668afe939f878da340a017ecdd7d) didn't change the PV and SRCREV_k3s variables correctly.

I changed those values to v1.23.1+k3s1 and 08d538fb3a04a0fe904b34cf04f7e21191b82449 respectively and now I'm getting the following do_compile error:
```
go: inconsistent vendoring in /kas_build_dir/tmp/work/neoversen1-poky-linux/k3s/v1.23.3+k3s1-r0/k3s-v1.23.3+k3s1/src/import:
    github.com/google/cadvisor@...: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
[...]
    k8s.io/sample-controller: is marked as replaced by github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller@... in vendor/modules.txt, but replaced by github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller@... in go.mod

    To ignore the vendor directory, use -mod=readonly or -mod=mod.
    To sync the vendor directory, run:
        go mod vendor
```


The short log is wrong, the SRCREV and PV are correct. There's some fundamental issues with 1.23.x that prevented it from building inside or outside of bitbake, so I scaled back the version bump at the last minute to stay in 1.22.x series.

In this case it seems that thev1.22.6+k3s1 tag is pointing to 3228d9cb9a4727d48f60de4f1ab472f7c50df904.

Cheers,

Diego

And yes, there's no more vendoring in k3s, so you can't just bump the SRCREV and PV, we have to adjust all of the git clones and shuffling to make it build.

I have some more changes to that recipe pending, so I'll do a minor cleanup, with a shortlog that makes things clear.

Cheers,

Bruce

 
Unfortunately, I have zero knowledge in go and I have no idea how I could fix this. 

Diego Sueiro
Staff Software Developer – ARM – Automotive and Industrial Solutions (CE-OSS)



--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


Bruce Ashfield
 



On Thu, Mar 31, 2022 at 2:05 PM Diego Sueiro <Diego.Sueiro@...> wrote:
Hi Bruce,

From: Bruce Ashfield <bruce.ashfield@...>
Sent: 31 March 2022 17:38
To: Diego Sueiro <Diego.Sueiro@...>
Cc: meta-virtualization@... <meta-virtualization@...>; nd <nd@...>
Subject: Re: k3s build issues on master
 


On Thu, Mar 31, 2022 at 12:22 PM Diego Sueiro <Diego.Sueiro@...> wrote:
Hi Bruce,

Whilst investigating a build problem on our CI related to sstate mirror of the k3s recipe, I found that the commit "k3s: update to 1.23.1" (8cba065209dd668afe939f878da340a017ecdd7d) didn't change the PV and SRCREV_k3s variables correctly.

I changed those values to v1.23.1+k3s1 and 08d538fb3a04a0fe904b34cf04f7e21191b82449 respectively and now I'm getting the following do_compile error:
```
go: inconsistent vendoring in /kas_build_dir/tmp/work/neoversen1-poky-linux/k3s/v1.23.3+k3s1-r0/k3s-v1.23.3+k3s1/src/import:
    github.com/google/cadvisor@...: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
[...]
    k8s.io/sample-controller: is marked as replaced by github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller@... in vendor/modules.txt, but replaced by github.com/k3s-io/kubernetes/staging/src/k8s.io/sample-controller@... in go.mod

    To ignore the vendor directory, use -mod=readonly or -mod=mod.
    To sync the vendor directory, run:
        go mod vendor
```


The short log is wrong, the SRCREV and PV are correct. There's some fundamental issues with 1.23.x that prevented it from building inside or outside of bitbake, so I scaled back the version bump at the last minute to stay in 1.22.x series.

In this case it seems that thev1.22.6+k3s1 tag is pointing to 3228d9cb9a4727d48f60de4f1ab472f7c50df904.

The SRCREV is as intended. It is not intended to be that tag exactly, it is the tip of the 1.22.x branch (and that's what all of them have been throughout the history of the recipes).

We can use +git${SRCPV} in the recipe, but honestly, that's not the biggest challenge with the go mod chaos, but I'll add it as part of my next update.

Cheers,

Bruce

 

Cheers,

Diego

And yes, there's no more vendoring in k3s, so you can't just bump the SRCREV and PV, we have to adjust all of the git clones and shuffling to make it build.

I have some more changes to that recipe pending, so I'll do a minor cleanup, with a shortlog that makes things clear.

Cheers,

Bruce

 
Unfortunately, I have zero knowledge in go and I have no idea how I could fix this. 

Diego Sueiro
Staff Software Developer – ARM – Automotive and Industrial Solutions (CE-OSS)



--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II



--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II