cloudfoundry / python-buildpack

Cloud Foundry buildpack for the Python Language
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
119 stars 277 forks source link

Cf push fails in the buildpack compile phase with a sha256 mismatch #937

Closed JoschuaGoetz closed 1 month ago

JoschuaGoetz commented 1 month ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? Cloud foundry version: v40.12.0 cf version: 8.7.11+b1b4068.2024-07-09

What version of the buildpack you are using? v1.8.27

Pushing an app with cf push -f manifest.yml <app-name> fails in the compile phase right after downloading go 1.19 with a sha256 mismatch. Updating the cli and trying different buidpack versions does not work. Logs :

Applying manifest file manifest.yml...

Updating with these attributes...
  ---
  applications:
  - name: ingestor-sq-v5-match-data
    disk-quota: 1024M
-   health-check-type: process
+   health-check-type: none
    instances: 1
    path: .
    memory: 1024M
+   default-route: true
    buildpacks:
      https://github.com/cloudfoundry/python-buildpack#v1.8.27
    command: python services/run_match_data.py
    services:
      environment-ingestor-sq-v5
Manifest applied
Packaging files to upload...
Uploading files...
 522.85 KiB / 522.85 KiB [==========================================================================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Cell 1c075d24-1794-4a14-b7ea-6a05d3ecfa1a creating container for instance 82e9ec61-417d-4dcf-8436-f9a579e21452
   Security group rules were updated
   Cell 1c075d24-1794-4a14-b7ea-6a05d3ecfa1a successfully created container for instance 82e9ec61-417d-4dcf-8436-f9a579e21452
   Downloading build artifacts cache...
   Downloading app package...
   Downloaded app package (525.2K)
   Downloaded build artifacts cache (303M)
   -----> Download go 1.19
   **ERROR** SHA256 mismatch: got f877f4092fa8da6c46927a54709b44aa787c1a5bb2776e36be3810b363aff666, expected 7e231ea5c68f4be7fea916d27814cc34b95e78c4664c3eb2411e8370f87558bd
   Failed to compile droplet: Failed to run all supply scripts: exit status 1
   Exit status 223
BuildpackCompileFailed - App staging failed in the buildpack compile phase
FAILED

Please confirm where necessary:

JoschuaGoetz commented 1 month ago

This issue is only occurring when using a git url as buildpack. Using just python_buildpack works.

ghost91- commented 1 month ago

You are likely using an offline buildpack in that case, right? That only works if you actually have that offline buildpack in your Cloud Foundry instance. And it also needs to match the version you actually need...

JoschuaGoetz commented 1 month ago

Yeah i agree this "workaround" is very conditional. But might just work if you need a version deployed. I assume i was just lucky to have the versions i need cached on the cf instance

JoschuaGoetz commented 1 month ago

Seems like this issue magically disappeared. So closing this.