NET Core Buildpack Stuck on 3.8.2, Need Upgrade to 3.9.x
search cancel

NET Core Buildpack Stuck on 3.8.2, Need Upgrade to 3.9.x

book

Article ID: 421712

calendar_today

Updated On:

Products

VMware Tanzu Platform - Kubernetes

Issue/Introduction

We need to upgrade the dotnet on the tanzu build service

We have installed and configured the Tanzu Application Platform with profile with automatic dependency updates following https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/install-online-profile.html

We do not see the desired latest dotnet buildpack (3.9.3) but older one 3.8.2 

Check to .NET Core Buildpack for VMware Tanzu  confirms that curren latest version is 3.9.3 where discrepancy is observed to confirm latest version of the images:

imgpkg tag list   --image tanzu-build.packages.broadcom.com/tanzu-dotnet-core-buildpack/dotnet-core   --registry-username "TOKEN" | sort -V

   ....

...
3.9.2
3.9.3

To confirm the dependency updater version:

imgpkg tag list \
  --image tanzu-build.packages.broadcom.com/build-service-dependency-updater/package-repo \
  --registry-username "[email protected]" \
  --registry-password "TOKEN"

Where latest tag is 1.12.234

...
1.12.232
1.12.233
1.12.234

 

Environment

Tanzu Application Platform 1.12.x

 

Cause

It looks like the repository is picking the latest version 1.12.234 this version contains dependency to prior dotnet build 3.8.2

To confirm this behaviour create temporarily a new repo:

apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
  finalizers:
  - finalizers.packagerepository.packaging.carvel.dev/delete
  name: test-repo
  namespace: tap-install
spec:
  fetch:
    imgpkgBundle:
      image: tanzu-build.packages.broadcom.com/build-service-dependency-updater/package-repo
      secretRef:
        name: broadcom-registry-creds
      tagSelection:
        semver: {}

And if needed to apply use the secret in the following format:

apiVersion: v1
kind: Secret
metadata:
  name: broadcom-registry-creds
  namespace: tap-install
type: Opaque
stringData:
  username: "<EMAIL-REGISTERED-TO-BROADCOM-PORTAL"
  password: "TOKEN"

Once the repo is fetched follwing can be seen in the status:

kubectl get pkgr -n tap-install   test-repo -oyaml | grep net
      ^            dotnet-core-lite.buildpacks.tanzu.vmware.com.3.8.2         Package  -    create  fallback on update or noop  -        -   -
      ^            dotnet-core.buildpacks.tanzu.vmware.com.3.8.2              Package  -    create  fallback on update or noop  -        -   -
      10:59:31AM: create package/dotnet-core-lite.buildpacks.tanzu.vmware.com.3.8.2 (data.packaging.carvel.dev/v1alpha1) namespace: tap-install
      10:59:31AM: create package/dotnet-core.buildpacks.tanzu.vmware.com.3.8.2 (data.packaging.carvel.dev/v1alpha1) namespace: tap-install
      10:59:32AM: ok: noop package/dotnet-core-lite.buildpacks.tanzu.vmware.com.3.8.2 (data.packaging.carvel.dev/v1alpha1) namespace: tap-install
      10:59:32AM: ok: noop package/dotnet-core.buildpacks.tanzu.vmware.com.3.8.2 (data.packaging.carvel.dev/v1alpha1) namespace: tap-install

In conclusion the latest repo available is tagged with older version of dotnet buildpack.

Resolution

The solution to this problem is addressed and is pending a new version that will contain the latest buildpacks in order to get latest buildpack and out of band Cluster have to be created with sample below:

 

apiVersion: kpack.io/v1alpha2
kind: ClusterBuildpack
metadata:
  name: out-of-band-dotnet-3-9-3
spec:
  image: tanzu-build.packages.broadcom.com/tanzu-dotnet-core-buildpack/dotnet-core:3.9.3
  serviceAccountRef:
    name: <NAME of the Service account to be used>
    namespace: <NAMESPACE>

Creating this object is picked by the builder and when a new build is executed the latest dotnet version is taking place and application is build with it.

Additional Information

https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-application-platform/1-12/tap/install-online-profile.html