microservices-demo icon indicating copy to clipboard operation
microservices-demo copied to clipboard

skaffold build fails with "failed to parse platform" when building loadgenerator

Open chris4474 opened this issue 9 months ago • 6 comments

Describe the bug

Generating tags...

  • loadgenerator -> registry.symphorines.home/microservice/loadgenerator:sic-jss-277-g5f5b66c8 Checking cache...
  • loadgenerator: Not found. Building Starting build... Building [loadgenerator]... Sending build context to Docker daemon 8.192kB Step 1/12 : FROM --platform=$BUILDPLATFORM python:3.12.8-alpine@sha256:54bec49592c8455de8d5983d984efff76b6417a6af9b5dcc8d0237bf6ad3bd20 AS base docker build failure: failed to parse platform : "" is an invalid OS component of "": OSAndVersion specifier component must match "^([A-Za-z0-9_-]+)(?:\(([A-Za-z0-9_.-]*)\))?$": invalid argument. Please fix the Dockerfile and try again..

To Reproduce

$ git clone https://github.com/GoogleCloudPlatform/microservices-demo.git $ cd microservices-demo/ $ skaffold build -b loadgenerator

Logs

(see attachement)

log.log

Screenshots

n/a

Environment

$ skaffold version v2.14.1

$ skaffold config list -a skaffold config: global: default-repo: registry.symphorines.home/microservice survey: last-prompted: "2025-03-03T22:01:45Z" collect-metrics: true update: last-prompted: "2025-03-04T09:27:09+01:00" kubeContexts: []

$ cat /etc/os-release PRETTY_NAME="Ubuntu 24.04.2 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04.2 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logo

$ docker version Client: Docker Engine - Community Version: 28.0.1 API version: 1.48 Go version: go1.23.6 Git commit: 068a01e Built: Wed Feb 26 10:41:12 2025 OS/Arch: linux/amd64 Context: default

Server: Docker Engine - Community Engine: Version: 28.0.1 API version: 1.48 (minimum version 1.24) Go version: go1.23.6 Git commit: bbd0a17 Built: Wed Feb 26 10:41:12 2025 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.25 GitCommit: bcc810d6b9066471b0b6fa75f557a15a1cbf31bb runc: Version: 1.2.4 GitCommit: v1.2.4-0-g6c52b3f docker-init: Version: 0.19.0 GitCommit: de40ad0

$ kubectl config view --minify apiVersion: v1 clusters:

  • cluster: certificate-authority-data: DATA+OMITTED server: https://192.168.1.115:6443 name: rpi contexts:
  • context: cluster: rpi namespace: microservice user: rpi name: rpi current-context: rpi kind: Config preferences: {} users:
  • name: rpi user: client-certificate-data: DATA+OMITTED client-key-data: DATA+OMITTED

$ kubectl version Client Version: v1.32.1 Kustomize Version: v5.5.0 Server Version: v1.31.6+k3s1

Additional context

I can build the other components individually using -b flag

Exposure

It happens all the time (each time I try to build loadgenerator)

chris4474 avatar Mar 04 '25 13:03 chris4474

yeah, I am having the same problem. It seems something broke since the tag v0.10.2. Using the latest release (at this time) seems to work for me though. (v0.10.2)

doucol avatar May 31 '25 14:05 doucol

@chris4474 and @doucol, could you please try this https://github.com/GoogleCloudPlatform/microservices-demo/pull/2986 locally and report back here if it's fixing your issue? Thanks!

mathieu-benoit avatar Jun 04 '25 16:06 mathieu-benoit

@chris4474 and @doucol, could you try this #2986 locally and report back here if it's fixing your issue? Thanks!

Works for me - thank you!

doucol avatar Jun 04 '25 18:06 doucol

@bourgeoisor, JFYI ☝ 👇 , feel free to review and merge the associated PR to fix this issue.

mathieu-benoit avatar Jun 04 '25 20:06 mathieu-benoit

@chris4474 and @doucol, could you try this #2986 locally and report back here if it's fixing your issue? Thanks!

Working for me as well. Thanks

chris4474 avatar Jun 05 '25 15:06 chris4474

@chris4474 and @doucol, could you try this #2986 locally and report back here if it's fixing your issue? Thanks!

Working for me as well. Thanks

Just ran into this and trying #2986 worked for me as well.

sitaramkm avatar Jun 06 '25 01:06 sitaramkm